superscript v 0.8.5

This commit is contained in:
Arthur Lu 2021-04-10 06:08:18 +00:00
parent f211d00f2d
commit d10c16d483
2 changed files with 71 additions and 52 deletions

2
.gitignore vendored
View File

@ -7,3 +7,5 @@
**/*.egg-info/ **/*.egg-info/
**/config.json **/config.json
**/tra_analysis/ **/tra_analysis/
**/errorlog.txt

View File

@ -3,11 +3,14 @@
# Notes: # Notes:
# setup: # setup:
__version__ = "0.8.4" __version__ = "0.8.5"
# changelog should be viewed using print(analysis.__changelog__) # changelog should be viewed using print(analysis.__changelog__)
__changelog__ = """changelog: __changelog__ = """changelog:
0.84: 0.8.5:
- added more gradeful KeyboardInterrupt exiting
- redirected stderr to errorlog.txt
0.8.4:
- added better error message for missing config.json - added better error message for missing config.json
- added automatic config.json creation - added automatic config.json creation
- added splash text with version and system info - added splash text with version and system info
@ -138,6 +141,7 @@ from pathlib import Path
from multiprocessing import Pool from multiprocessing import Pool
import platform import platform
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
import sys
from concurrent.futures import ThreadPoolExecutor from concurrent.futures import ThreadPoolExecutor
import time import time
import warnings import warnings
@ -148,12 +152,16 @@ def main():
global exec_threads global exec_threads
sys.stderr = open("errorlog.txt", "w")
warnings.filterwarnings("ignore") warnings.filterwarnings("ignore")
splash() splash()
while (True): while (True):
try:
current_time = time.time() current_time = time.time()
print("[OK] time: " + str(current_time)) print("[OK] time: " + str(current_time))
@ -214,6 +222,15 @@ def main():
print_hrule() print_hrule()
except KeyboardInterrupt:
print("\n[OK] caught KeyboardInterrupt, killing processes")
exec_threads.terminate()
print("[OK] processes killed, exiting")
exit()
else:
pass
#clear() #clear()
def clear(): def clear():