[Pythonmac-SIG] 1.5.2c1 and time module.

Jack Jansen jack@oratrix.nl
Fri, 10 Nov 2000 23:42:17 +0100


Recently, Chris Barker <cbarker@jps.net> said:
> Hi all,
> 
> I seem to be missing time.strptime()
> 
> I kind of need it, why would it be missing?
> 
> NOTE, this is 1.5.2c1. Maybe I have just found the compelling reason to
> make the switch to 2.0!

Yes, you have.

strptime() isn't in the C library MacPython uses, so MacPython can't
provide it. The good news is that in 2.0 there's a Python
implementation of strptime in :Mac:Contrib:strptime.

Tip: if you want to use this seamlessly you copy it to somewhere on
sys.path (site-packages comes to mind) and add the following lines to
site.py:

import time
if not hasattr(time, 'strptime'):
	import strptime
	time.strptime = strptime.strptime
--
Jack Jansen             | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++
www.oratrix.nl/~jack    | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm