Skip to content

Instantly share code, notes, and snippets.

@suzaku
Created December 16, 2012 12:50
Show Gist options
  • Save suzaku/4306895 to your computer and use it in GitHub Desktop.
Save suzaku/4306895 to your computer and use it in GitHub Desktop.
try plac
import plac
import random
@plac.annotations(name="your name")
def hello(name):
"Greet you half of the time, and otherwise * you"
if random.randint(0, 10) > 5:
print "Hello %s" % name
else:
print "Screw you. I'm ... going ... home~"
if __name__ == '__main__':
plac.call(hello)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment