Out of frustration of not always having strptime() available and not liking something in the standard library saying something is only available on "Most modern Unix systems" when it does not have to be this way, I wrote strptime() in pure Python (requires Python 2.2 or higher; if there is enough demand I could back-port to older versions since most of the 2.2 capabilities used were for convenience of performance issues). The module can be found at the Python Cookbook at http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/56036 . I wrote strptime() before (over a year ago), but I got around to rewriting it finally and I removed any dependence on the programmer knowing any locale-specific info ahead of time. Now you do not need to enter any locale-specific information; you can use the function just like the version that is in the time module. There is some extra functionality, though, so look at the recipe to see what extras are available (performance and locale abilities mainly). -Brett C.
participants (1)
-
drifty@bigfoot.com