<s> import argparse <EOL> from tornado . ioloop import IOLoop <EOL> from tornado . wsgi import WSGIContainer <EOL> from tornado . httpserver import HTTPServer <EOL> from werkzeug . serving import run_simple <EOL> from osrc import create_app <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> parser = argparse . ArgumentParser ( ) <EOL> parser . add_argument ( "<STR_LIT>" , "<STR_LIT>" , default = <NUM_LIT> , type = int , <EOL> help = "<STR_LIT>" ) <EOL> parser . add_argument ( "<STR_LIT>" , "<STR_LIT>" , action = "<STR_LIT:store_true>" , <EOL> help = "<STR_LIT>" ) <EOL> parser . add_argument ( "<STR_LIT>" , "<STR_LIT>" , <EOL> default = None , <EOL> help = "<STR_LIT>" ) <EOL> args = parser . parse_args ( ) <EOL> print ( "<STR_LIT>" . format ( args . port ) ) <EOL> app = create_app ( args . filename ) <EOL> if args . debug : <EOL> run_simple ( "<STR_LIT>" , args . port , app , use_reloader = True , <EOL> use_debugger = True ) <EOL> else : <EOL> http_server = HTTPServer ( WSGIContainer ( app ) ) <EOL> http_server . listen ( args . port ) <EOL> IOLoop . instance ( ) . start ( ) </s>
