Skip to content

Instantly share code, notes, and snippets.

@dirn
Created June 11, 2012 05:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dirn/2908622 to your computer and use it in GitHub Desktop.
Save dirn/2908622 to your computer and use it in GitHub Desktop.
Switches example
"""Build a script with Switches"""
from switches import command, commandline
@command
def spam(eggs):
"""This function prints the value of eggs"""
print eggs
@command
def eggs(spam='spam'):
"""This function prints the value of spam"""
print spam
if __name__ == '__main__':
commandline(__doc__)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment