def main():
import colorama<EOL>import argparse<EOL>import logging<EOL>import sys<EOL>import os<EOL>parser = argparse.ArgumentParser(prog="<STR_LIT>",<EOL>description="<STR_LIT>")<EOL>parser.add_argument("<STR_LIT>", "<STR_LIT>",<EOL>action="<STR_LIT:version>",<EOL>version="<STR_LIT>")<EOL>parser.add_argument("<STR_LIT>", "<STR_LIT>",<EOL>action="<STR_LIT:store>",<EOL>default=os.getcwd(),<EOL>help="<STR_LIT>"<EOL>"<STR_LIT>")<EOL>parser.add_argument("<STR_LIT>",<EOL>action="<STR_LIT:store>",<EOL>choices=["<STR_LIT>", "<STR_LIT>"],<EOL>default="<STR_LIT>",<EOL>metavar="<STR_LIT>",<EOL>nargs="<STR_LIT:?>",<EOL>help="<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>")<EOL>args = parser.parse_args()<EOL>os.chdir(args.directory)<EOL>sys.path.append(os.getcwd())<EOL>if os.environ.get("<STR_LIT>") == "<STR_LIT>":<EOL><INDENT>del os.environ["<STR_LIT>"]<EOL>colorama.init()<EOL>os.environ["<STR_LIT>"] = "<STR_LIT>"<EOL><DEDENT>else:<EOL><INDENT>colorama.init()<EOL><DEDENT>try:<EOL><INDENT>old, sys.dont_write_bytecode = sys.dont_write_bytecode, True<EOL>import build<EOL><DEDENT>except ImportError:<EOL><INDENT>sys.exit("<STR_LIT>")<EOL><DEDENT>finally:<EOL><INDENT>sys.dont_write_bytecode = old<EOL><DEDENT>try:<EOL><INDENT>logging.basicConfig(level=build.LOGGING,<EOL>format="<STR_LIT>")<EOL><DEDENT>except AttributeError:<EOL><INDENT>logging.basicConfig(level=logging.INFO,<EOL>format="<STR_LIT>")<EOL><DEDENT>reactor = Reactor(build.SRC, build.DEST)<EOL>for handler in build.HANDLERS:<EOL><INDENT>reactor.add_handler(handler)<EOL><DEDENT>reactor.run(args.mode == "<STR_LIT>")<EOL>
Entry point for command line usage.