Skip to content

Instantly share code, notes, and snippets.

@berdario
Created August 27, 2014 16:05
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 berdario/9e748f154f0473e1f5e2 to your computer and use it in GitHub Desktop.
Save berdario/9e748f154f0473e1f5e2 to your computer and use it in GitHub Desktop.
import click
@click.group()
def pew():
pass
mkvenv_command = lambda f: pew.command()(
click.option('--python', '-p', default='python')(
click.option('-i', multiple=True)(f)))
@mkvenv_command
@click.argument('envname')
def new(envname, python, i):
print(envname, python, i)
@mkvenv_command
def mktmpenv(python, i):
print(python, i)
if __name__ == '__main__':
pew()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment