Last active
December 17, 2015 21:39
-
-
Save ryunhe/5676357 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage: | |
# | |
# $ tornado.options.py -port=7777 | |
# listen: 7777 | |
# | |
# $ tornado.options.py -help | |
# --port Run on the given port (default 8888) | |
from tornado.options import define, options, parse_command_line | |
define("port", default=8888, help="Run on the given port", type=int) | |
def main(): | |
parse_command_line() | |
print options.port | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment