aboutsummaryrefslogblamecommitdiffstats
path: root/delf.py
blob: 27b574f6a01010f26c96b417cb092c60406d4a4b (plain) (tree)
1
2
3
4
5
6
7

                  
           
             

                                                         
 






                              

                                







                                                           
 

                          
#!/usr/bin/python3

import code
import signal
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()