inverse of asctime
Grant Griffin
not.this at seebelow.org
Thu Mar 15 23:25:07 EST 2001
Andrew Markebo wrote:
>
> / Grant Griffin <not.this at seebelow.org> wrote:
> | Hi Gang,
> |
> | I'm in the market for the inverse of asctime(). I looked in the time module but
> | couldn't find it. (Nope, strptime isn't available on my Windows installation.)
> | Seems like there oughtta be sucha thing somewhere.
>
> Ehm.. I actually have a strptime.py, used by RogueWave ;-) *stretches
> his back* You can locate it at my mismaintained code-page, will have
> to make it come back to life some day.
>
> http://www.fukt.hk-r.se/~flognat/hacks/
> http://www.fukt.hk-r.se/~flognat/hacks/strptime.py
>
> *stretching-his-backly-yours*
>
> /Andy
>
> BTW Have you actually tried searching the python site :-)
>
Nope--not a bad idea, thanks. I'm embarassed that I hadn't thought of
it: after I had searched Google (Deja) and came up with nothing, the
very next thing I thought of was to ask you folks. (That way, I'll be
able to find it in Google _next_ time. <wink>)
Your code looks great, but as it turned out, I only needed a conversion
for purposes of sorting in terms of day, so I just wrote a little
funtion that generates a bogus "day number", which worked OK for that.
(So I guess I must be deliberately wasting your time <wink>.)
somebody-oughtta-should-write-a-pep-to-add-strptime.py-to-the
-time-module-<hint, wink>-ly y'rs,
=g2
--
_____________________________________________________________________
Grant R. Griffin g2 at dspguru.com
Publisher of dspGuru http://www.dspguru.com
Iowegian International Corporation http://www.iowegian.com
More information about the Python-list
mailing list