[Pythonmac-SIG] whither time.strptime?

savageb savageb@pacbell.net
Wed, 03 Mar 1999 19:51:38 -0800


Joe,

I'm really glad you brought this up. I found the 'strptime' module (though I
don't have the URL here -- it is at work), but I am very interested in
seeing the other time modules available for the Mac. I tried the 'strptime'
module on my Mac, and it worked, but the more interesting time modules
available with Zope seem to be dependant upon the 'mxtime' module which
needs to be compiled.

http://starship.skyport.net/~lemburg/mxDateTime.html

The 'strptime' module does as the time module suggests (the opposite of
strftime) but mxDateTime includes strptime *and* adds ISOdate formatting,
and (especially interesting) the ability to add times and talk about
intervals, so you could say that

>> now() + RelativeDateTime(weeks=+2)

this example is from the URL above:

>>while 1:
>>    d = Date(2000,1,1) - now()
>>    print 'Y2000... time left: %2i days %2i hours '
>>   '%2i minutes %2i seconds\r' % \
>>   (d.day,d.hour,d.minute,d.second),
>>    sleep(1)

I know I personally could use this functionality immediately. Unfortunately
I don't know anything about compiling C extensions. If someone were to
compile this module I would greatly appreciate the opportunity to download
it.

Bob


----------
>From: "Joseph J. Strout" <joe@strout.net>
>To: Python-Mac SIG <pythonmac-sig@python.org>
>Subject: [Pythonmac-SIG] whither time.strptime?
>Date: Wed, Mar 3, 1999, 3:17 PM
>

> Both time.__doc__ and the library reference manual claim that there should
> be a time.strptime:
>
> strptime() -- parse string to time tuple according to format specification
>
> But it doesn't exist!  There's a strftime, but its partner strptime is just
> plain missing from my distribution (1.5.2b1).  I don't know if this is a
> problem with MacPython, or with Python in general, but I thought I should
> draw some attention to it.  (Where would I file an official bug report?)
>
> Thanks,
> -- Joe
> ,------------------------------------------------------------------.
> |    Joseph J. Strout           Biocomputing -- The Salk Institute |
> |    joe@strout.net             http://www.strout.net              |
> `------------------------------------------------------------------'
>
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
> http://www.python.org/mailman/listinfo/pythonmac-sig
>