Mercurial > hg > config
comparison python/epoch2date.py @ 673:1b8ea91f00a0
STUB: python/epoch2date.py
| author | Jeff Hammel <k0scist@gmail.com> |
|---|---|
| date | Tue, 06 May 2014 14:26:05 -0700 |
| parents | bcf5781b615e |
| children | 1e1bed921c08 |
comparison
equal
deleted
inserted
replaced
| 672:0eff3f3658ed | 673:1b8ea91f00a0 |
|---|---|
| 18 import os | 18 import os |
| 19 import subprocess | 19 import subprocess |
| 20 import sys | 20 import sys |
| 21 import time | 21 import time |
| 22 | 22 |
| 23 try: | |
| 24 # use dateutil parser if available | |
| 25 from dateutil.parser import parse as parse_date | |
| 26 except ImportError: | |
| 27 parse_date = None | |
| 28 | |
| 29 | |
| 23 def main(args=sys.argv[1:]): | 30 def main(args=sys.argv[1:]): |
| 24 """CLI""" | 31 """CLI""" |
| 25 | 32 |
| 26 # parse command line | 33 # parse command line |
| 27 parser = argparse.ArgumentParser(description=__doc__) | 34 parser = argparse.ArgumentParser(description=__doc__) |
