Skip to content

Instantly share code, notes, and snippets.

@kevinballard
Created May 22, 2013 22:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevinballard/5631323 to your computer and use it in GitHub Desktop.
Save kevinballard/5631323 to your computer and use it in GitHub Desktop.
Example script for commandr.
from commandr import command, Run
@command('greet')
def Hi(name, title='Mr.', times=1):
'''Greet someone.
Arguments:
name - Name to greet.
title - Title of the person to greet.
times - Number of times to say the greeting. '''
greeting = 'Hi %s %s!' % (title, name)
for _ in xrange(times):
print greeting
if __name__ == '__main__':
Run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment