Created
January 13, 2015 22:01
-
-
Save dnomadb/3b22654e58405db2ee05 to your computer and use it in GitHub Desktop.
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
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