def main():
<EOL>locale.setlocale(locale.LC_ALL, '<STR_LIT>')<EOL>if str == bytes:  <EOL><INDENT>writer = codecs.getwriter(locale.getpreferredencoding())<EOL>o_stdout, o_stderr = sys.stdout, sys.stderr<EOL>sys.stdout = writer(sys.stdout)<EOL>sys.stdout.buffer = o_stdout<EOL>sys.stderr = writer(sys.stderr)<EOL>sys.stderr.buffer = o_stderr<EOL><DEDENT>else:  <EOL><INDENT>sys.stdin = sys.stdin.buffer<EOL><DEDENT>def add_runtime_option(opt):<EOL><INDENT>opt.add_argument(<EOL>'<STR_LIT>', '<STR_LIT>', action='<STR_LIT:store>',<EOL>help="<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>")<EOL><DEDENT>def add_destination_option(opt):<EOL><INDENT>opt.add_argument('<STR_LIT>', action='<STR_LIT:store>',<EOL>help="<STR_LIT>")<EOL>opt.add_argument('<STR_LIT>', action='<STR_LIT:store>', default=DEFAULT_TEJ_DIR,<EOL>help="<STR_LIT>")<EOL><DEDENT>parser = argparse.ArgumentParser(<EOL>description="<STR_LIT>")<EOL>parser.add_argument('<STR_LIT>', action='<STR_LIT:version>',<EOL>version="<STR_LIT>" % tej_version)<EOL>parser.add_argument('<STR_LIT>', '<STR_LIT>', action='<STR_LIT:count>', default=<NUM_LIT:1>,<EOL>dest='<STR_LIT>',<EOL>help="<STR_LIT>")<EOL>subparsers = parser.add_subparsers(title="<STR_LIT>", metavar='<STR_LIT>')<EOL>parser_setup = subparsers.add_parser(<EOL>'<STR_LIT>',<EOL>help="<STR_LIT>")<EOL>add_destination_option(parser_setup)<EOL>add_runtime_option(parser_setup)<EOL>parser_setup.add_argument('<STR_LIT>', action='<STR_LIT>',<EOL>dest='<STR_LIT>')<EOL>parser_setup.add_argument('<STR_LIT>', action='<STR_LIT>',<EOL>dest='<STR_LIT>', const=DEFAULT_TEJ_DIR)<EOL>parser_setup.add_argument('<STR_LIT>', action='<STR_LIT:store_true>')<EOL>parser_setup.add_argument('<STR_LIT>', action='<STR_LIT:store_true>')<EOL>parser_setup.set_defaults(func=_setup)<EOL>parser_submit = subparsers.add_parser(<EOL>'<STR_LIT>',<EOL>help="<STR_LIT>")<EOL>add_destination_option(parser_submit)<EOL>add_runtime_option(parser_submit)<EOL>parser_submit.add_argument('<STR_LIT>', action='<STR_LIT:store>',<EOL>help="<STR_LIT>")<EOL>parser_submit.add_argument('<STR_LIT>', action='<STR_LIT:store>',<EOL>help="<STR_LIT>"<EOL>"<STR_LIT>")<EOL>parser_submit.add_argument('<STR_LIT>', action='<STR_LIT:store>',<EOL>help="<STR_LIT>")<EOL>parser_submit.set_defaults(func=_submit)<EOL>parser_status = subparsers.add_parser(<EOL>'<STR_LIT:status>',<EOL>help="<STR_LIT>")<EOL>add_destination_option(parser_status)<EOL>parser_status.add_argument('<STR_LIT>', action='<STR_LIT:store>',<EOL>help="<STR_LIT>")<EOL>parser_status.set_defaults(func=_status)<EOL>parser_download = subparsers.add_parser(<EOL>'<STR_LIT>',<EOL>help="<STR_LIT>")<EOL>add_destination_option(parser_download)<EOL>parser_download.add_argument('<STR_LIT>', action='<STR_LIT:store>',<EOL>help="<STR_LIT>")<EOL>parser_download.add_argument('<STR_LIT>', action='<STR_LIT:store>',<EOL>nargs=argparse.ONE_OR_MORE,<EOL>help="<STR_LIT>")<EOL>parser_download.set_defaults(func=_download)<EOL>parser_kill = subparsers.add_parser(<EOL>'<STR_LIT>',<EOL>help="<STR_LIT>")<EOL>add_destination_option(parser_kill)<EOL>parser_kill.add_argument('<STR_LIT>', action='<STR_LIT:store>',<EOL>help="<STR_LIT>")<EOL>parser_kill.set_defaults(func=_kill)<EOL>parser_delete = subparsers.add_parser(<EOL>'<STR_LIT>',<EOL>help="<STR_LIT>")<EOL>add_destination_option(parser_delete)<EOL>parser_delete.add_argument('<STR_LIT>', action='<STR_LIT:store>',<EOL>help="<STR_LIT>")<EOL>parser_delete.set_defaults(func=_delete)<EOL>parser_list = subparsers.add_parser(<EOL>'<STR_LIT:list>',<EOL>help="<STR_LIT>")<EOL>add_destination_option(parser_list)<EOL>parser_list.set_defaults(func=_list)<EOL>args = parser.parse_args()<EOL>setup_logging(args.verbosity)<EOL>try:<EOL><INDENT>args.func(args)<EOL><DEDENT>except Error as e:<EOL><INDENT>logger.critical(e)<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>sys.exit(<NUM_LIT:0>)<EOL>
Entry point when called on the command-line.