aboutsummaryrefslogtreecommitdiffstats
path: root/delf.py
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2018-06-26 10:31:10 +0000
committerbloodstalker <thabogre@gmail.com>2018-06-26 10:31:10 +0000
commit4a471ef1b289300032c2a5f40d0fd290bf33e906 (patch)
tree46eece53122e4dc00fed118cfb60129a233eb7a1 /delf.py
parentInitial commit (diff)
downloaddelf-4a471ef1b289300032c2a5f40d0fd290bf33e906.tar.gz
delf-4a471ef1b289300032c2a5f40d0fd290bf33e906.zip
first commit
Diffstat (limited to '')
-rwxr-xr-xdelf.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/delf.py b/delf.py
new file mode 100755
index 0000000..60b2697
--- /dev/null
+++ b/delf.py
@@ -0,0 +1,27 @@
+#!/usr/bin/python3
+
+import argparse
+import code
+import readline
+import signal
+import sys
+from load import premain, CLIArgParser, SigHandler_SIGINT
+
+def main():
+ argparser = CLIArgParser()
+ if argparser.args.dbg:
+ try:
+ premain(argparser)
+ except Exception as e:
+ print(e.__doc__)
+ if e.message: print(e.message)
+ signal.signal(signal.SIGINT, SigHandler_SIGINT)
+ variables = globals().copy()
+ variables.update(locals())
+ shell = code.InteractiveConsole(variables)
+ shell.interact(banner="DELF REPL")
+ else:
+ premain(argparser)
+
+if __name__ == "__main__":
+ main()