Created
June 11, 2012 05:25
-
-
Save dirn/2908622 to your computer and use it in GitHub Desktop.
Switches example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""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