Created
July 26, 2013 02:36
-
-
Save yuugit/6085647 to your computer and use it in GitHub Desktop.
a python template for auto-insert
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
# -*- coding: utf-8 -*- | |
def main(): | |
(options, args) = parse_options() | |
def parse_options(): | |
import optparse | |
parser = optparse.OptionParser() | |
parser.add_option("--foo", type = "str", default = "FOO", help = "fooooooo!", | |
dest = "foo") | |
parser.add_option("--bar", type = "int", default = 83, help = "83", | |
dest = "bar") | |
return parser.parse_args() | |
if __name__ == '__main__': | |
main() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment