Skip to content

Instantly share code, notes, and snippets.

@neilkod
Created June 9, 2010 20:18
Show Gist options
  • Save neilkod/432109 to your computer and use it in GitHub Desktop.
Save neilkod/432109 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
import sys
# command line arguments are stored in list sys.argv
# sys.argv[0] is the name of the python program itself.
print sys.argv
print "done!"
# example
# nkodner$ python commandLineArguments.py foo bar baz cheezburger
# ['commandLineArguments.py', 'foo', 'bar', 'baz', 'cheezburger']
# done!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment