Skip to content

Instantly share code, notes, and snippets.

@Senix
Created May 11, 2011 02:24
Show Gist options
  • Save Senix/965798 to your computer and use it in GitHub Desktop.
Save Senix/965798 to your computer and use it in GitHub Desktop.
ook@look-T3646:~/workspace/star-chan/src$ ^C
look@look-T3646:~/workspace/star-chan/src$ python sysargv.py
usage: -r -c
look@look-T3646:~/workspace/star-chan/src$ python sysargv.py -c
thats the letter c bro
look@look-T3646:~/workspace/star-chan/src$ python sysargv.py -r
ready
look@look-T3646:~/workspace/star-chan/src$ ^C
look@look-T3646:~/workspace/star-chan/src$
#!/bin/usr/python
import sys
if (len(sys.argv) > 1):
if(sys.argv[1] == '-r' ):
print "ready"
elif(sys.argv[1] == '-c' ):
print "thats the letter c bro"
else:
print "usage: -r -c"
else:
print "usage: -r -c"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment