Am Mon, 23 Dec 2013 16:30:35 -0800 schrieb Igor Korot <ikoro...@gmail.com>:
> > Now, it looks that the python way of validating the date/time of the > string is to call strptime(). However looking at the docs and trying > to use the function I didn't find a way to check for the milliseconds. > Now the dates can be formatted differently I think according to the > locale under which the csv is generated. you can also use an validator package like formencode: http://www.formencode.org/en/latest/Validator.html It has an TimeConverter but it does not understand milliseconds either. But it should be trivial to implement it based on TimeConverter. Using formencode the validation / conversion is seperated and therefore reusable. You also get nice human readable validation messages in different languages. It supports also Schemas to validate complete records. -- Greg -- https://mail.python.org/mailman/listinfo/python-list