diff options
author | bloodstalker <thabogre@gmail.com> | 2018-07-01 08:28:44 +0000 |
---|---|---|
committer | bloodstalker <thabogre@gmail.com> | 2018-07-01 08:28:44 +0000 |
commit | 7a9c4c9f7acf9fae1f17369637860ea521efe087 (patch) | |
tree | b88b2117897baedeb644e8279fe5422a11cb714c /faultreiber.py | |
parent | update (diff) | |
download | faultreiber-7a9c4c9f7acf9fae1f17369637860ea521efe087.tar.gz faultreiber-7a9c4c9f7acf9fae1f17369637860ea521efe087.zip |
update
Diffstat (limited to 'faultreiber.py')
-rwxr-xr-x | faultreiber.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/faultreiber.py b/faultreiber.py new file mode 100755 index 0000000..4db5be1 --- /dev/null +++ b/faultreiber.py @@ -0,0 +1,27 @@ +#!/usr/bin/python3 +# _*_ coding=utf-8 _*_ + +import argparse +import code +import readline +import signal +import sys +from main import premain, Argparser, SigHandler_SIGINT + +def main(): + argparser = Argparser() + if argparser.args.dbg: + try: + premain(argparser) + except Exception as e: + print(e.__doc__) + if e.message: print(e.message) + variables = globals().copy() + variables.update(locals()) + shell = code.InteractiveConsole(variables) + shell.interact(banner="DEBUG REPL") + else: + premain(argparser) + +if __name__ == "__main__": + main() |