Skip to content

Instantly share code, notes, and snippets.

@amitkot
Created September 17, 2014 10:47
Show Gist options
  • Save amitkot/a1570ff356cee9a77dcc to your computer and use it in GitHub Desktop.
Save amitkot/a1570ff356cee9a77dcc to your computer and use it in GitHub Desktop.
Script for Modules and Packages lab - Python Course 2014
from optparse import OptionParser
def main():
parser = OptionParser()
parser.add_option("-f", "--file", dest="filename",
help="write report to FILE", metavar="FILE")
# ADD YOUR OPTION HERE:
(options, args) = parser.parse_args()
print 'options are', options
print 'args are', args
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment