paul j3 added the comment:

Examples of datetime types from Stackoverflow:

http://stackoverflow.com/questions/21437258/defining-python-argparse-arguments
The suggested answer (but not accepted) is 'type=lambda s: 
datetime.datetime.strptime(s, '%Y-%m-%d')'

another
http://stackoverflow.com/questions/12462074/python-argparse-create-timedelta-object-from-argument

which references
https://gist.github.com/jnothman/4057689
'timedeltatype.py: An argparse type factory that produces datetime.timedelta 
objects'

and
http://stackoverflow.com/questions/25470844/specify-format-for-input-arguments-argparse-python
with a type function

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23884>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to