Skip to content

Instantly share code, notes, and snippets.

@neilkod
Created September 3, 2010 18:12
Show Gist options
  • Save neilkod/564299 to your computer and use it in GitHub Desktop.
Save neilkod/564299 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
""" prints hello followed by the value of the first command-line parameter """
import sys
try:
print "hello %s" % sys.argv[1]
except IndexError:
print "usage: parameter.py name"
MacBookPro:commonTweeps nkodner$ ./parameter.py
usage: parameter.py name
MacBookPro:commonTweeps nkodner$ ./parameter.py neil
hello neil
MacBookPro:commonTweeps nkodner$
built for @andturntwo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment