Major refactor
This commit is contained in:
@@ -1,6 +1,16 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
|
||||
# Python imports
|
||||
import argparse
|
||||
import argparse, faulthandler, traceback
|
||||
from setproctitle import setproctitle
|
||||
|
||||
import tracemalloc
|
||||
tracemalloc.start()
|
||||
|
||||
|
||||
# Lib imports
|
||||
|
||||
|
||||
# Application imports
|
||||
from __init__ import Main
|
||||
@@ -8,12 +18,19 @@ from __init__ import Main
|
||||
|
||||
if __name__ == "__main__":
|
||||
try:
|
||||
# import web_pdb
|
||||
# web_pdb.set_trace()
|
||||
|
||||
setproctitle('Shellmen')
|
||||
faulthandler.enable() # For better debug info
|
||||
parser = argparse.ArgumentParser()
|
||||
# Add long and short arguments
|
||||
parser.add_argument("--theme", "-t", default="default", help="The theme to use for the menu. (default, orange, red, purple, green)")
|
||||
|
||||
# Read arguments (If any...)
|
||||
args = parser.parse_args()
|
||||
main = Main(args)
|
||||
args, unknownargs = parser.parse_known_args()
|
||||
|
||||
Main(args, unknownargs)
|
||||
except Exception as e:
|
||||
print( repr(e) )
|
||||
traceback.print_exc()
|
||||
quit()
|
||||
|
||||
Reference in New Issue
Block a user