Mercurial > hg > config
comparison python/jsonex.py @ 836:0fa456446fea
use module docstring for description, as intended
| author | Jeff Hammel <k0scist@gmail.com> |
|---|---|
| date | Thu, 09 Mar 2017 14:22:32 -0800 |
| parents | 80c47cc35f37 |
| children |
comparison
equal
deleted
inserted
replaced
| 835:891c38647775 | 836:0fa456446fea |
|---|---|
| 18 return obj[int(key)] | 18 return obj[int(key)] |
| 19 | 19 |
| 20 def main(args=sys.argv[1:]): | 20 def main(args=sys.argv[1:]): |
| 21 | 21 |
| 22 # command line | 22 # command line |
| 23 parser = argparse.ArgumentParser(description='__doc__') | 23 parser = argparse.ArgumentParser(description=__doc__) |
| 24 parser.add_argument('input', nargs='?', | 24 parser.add_argument('input', nargs='?', |
| 25 help="input file or url (read from stdin if ommitted)") | 25 help="input file or url (read from stdin if ommitted)") |
| 26 parser.add_argument('object', nargs='*', | 26 parser.add_argument('object', nargs='*', |
| 27 help="object in dotted notation") | 27 help="object in dotted notation") |
| 28 | 28 |
