Mercurial > hg > config
comparison .emacs @ 625:e92bd004b906
STUB: .emacs python/example/func_args.py
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Wed, 12 Feb 2014 16:00:32 -0800 |
parents | cd51786972c4 |
children | d37391e845f5 |
comparison
equal
deleted
inserted
replaced
624:b0144a39086d | 625:e92bd004b906 |
---|---|
162 | 162 |
163 here = os.path.dirname(os.path.realpath(__file__)) | 163 here = os.path.dirname(os.path.realpath(__file__)) |
164 | 164 |
165 def main(args=sys.argv[1:]): | 165 def main(args=sys.argv[1:]): |
166 | 166 |
167 parser = argparse.ArgumentParser(usage=usage, description=__doc__) | 167 parser = argparse.ArgumentParser(description=__doc__) |
168 parser.add_option('input', nargs='?', | 168 parser.add_option('input', nargs='?', |
169 type=argparse.FileType('r'), default=sys.stdin, | 169 type=argparse.FileType('r'), default=sys.stdin, |
170 help='input file, or read from stdin if ommitted') | 170 help='input file, or read from stdin if ommitted') |
171 options = parser.parse_args(args) | 171 options = parser.parse_args(args) |
172 | 172 |