()
Call this to run the interactive shell.  It automatically passes
    in sys.argv[1:] and exits Python when done.
Call this to run the interactive shell.  It automatically passes
    in sys.argv[1:] and exits Python when done.
Call this to run the interactive shell . It automatically passes in sys . argv [ 1 : ] and exits Python when done .
def main():
    # Docstring must start on second line so dedenting works correctly
    """
    Call this to run the interactive shell.  It automatically passes
    in sys.argv[1:] and exits Python when done.

    """
    try:
        s = Shell()
        _, _, cmds = s.process_args(sys.argv[1:])
        if len(cmds) == 0:
            s.cmdloop()
    except:
        v = sys.exc_info()[1]
        if getattr(v, "_handle_exception_saw_this", False):
            pass
        else:
            # Where did this exception come from?
            import traceback
            traceback.print_exc()
        sys.exit(1)
def main ( ) : # Docstring must start on second line so dedenting works correctly try : s = Shell ( ) _ , _ , cmds = s . process_args ( sys . argv [ 1 : ] ) if len ( cmds ) == 0 : s . cmdloop ( ) except : v = sys . exc_info ( ) [ 1 ] if getattr ( v , "_handle_exception_saw_this" , False ) : pass else : # Where did this exception come from? import traceback traceback . print_exc ( ) sys . exit ( 1 )