Skip to content

Instantly share code, notes, and snippets.

@dnomadb
Created January 13, 2015 22:01
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 dnomadb/3b22654e58405db2ee05 to your computer and use it in GitHub Desktop.
Save dnomadb/3b22654e58405db2ee05 to your computer and use it in GitHub Desktop.
import click, fiona
@click.command()
@click.argument('input', default='-', required=False)
def example(input):
try:
src = click.open_file(input).readlines()
except IOError:
src = [input]
click.echo(src)
if __name__ == '__main__':
example()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment