From 7a9c4c9f7acf9fae1f17369637860ea521efe087 Mon Sep 17 00:00:00 2001 From: bloodstalker Date: Sun, 1 Jul 2018 12:58:44 +0430 Subject: update --- faultreiber.py | 27 +++++++++++++++++++++++++++ run.sh | 2 ++ 2 files changed, 29 insertions(+) create mode 100755 faultreiber.py create mode 100755 run.sh 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() diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..3759542 --- /dev/null +++ b/run.sh @@ -0,0 +1,2 @@ +#!/bin/sh +"./main.py" -- cgit v1.2.3