"""Entry point. python -m bolt_console the window python -m bolt_console --cli the terminal REPL python -m bolt_console -p MESSAGE one message in the terminal, then exit python -m bolt_console --doctor [--deep] (--auto works with the window and the terminal) """ import sys def main(argv=None): args = list(sys.argv[1:] if argv is None else argv) if "--doctor" in args: from bolt_console.doctor import main as doctor return doctor(args) if "--cli" in args or "-p" in args or "-h" in args or "--help" in args: from bolt_console.console import run return run([a for a in args if a != "--cli"]) from bolt_console.gui.window import run return run(args) if __name__ == "__main__": sys.exit(main())