Skip to content

Instantly share code, notes, and snippets.

@baojie
Created February 28, 2014 23:54
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 baojie/9282442 to your computer and use it in GitHub Desktop.
Save baojie/9282442 to your computer and use it in GitHub Desktop.
import begin
@begin.subcommand
def add():
print "add"
@begin.subcommand
def dele():
print "dele"
@begin.start
def main():
# statements here will be run before subcommands
# print "do something in main"
pass
if begin.start():
# statements here will be run after command execution
# print "do something in the end"
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment