No strptime in Windows?

Tim Peters tim_one at email.msn.com
Sun Jun 11 15:55:01 EDT 2000


[David Ullrich]
> ...
>        Maybe I'm not clear on exactly what "the
> platform" is. I've taken that to mean "Windows".
> But maybe when people say I'm using the Windows
> platform that's shorthand for saying the platform
> I'm using is "Windows C"?  (No, that can't be it,
> because surely there's no such thing as "Windows
> C".) Or the "platform" is the specific C compiler
> that was used? (No, that can't be it either...)

"The platform" is the combination of hardware, compiler, operating system, C
library, and (less so) Python build-time configuration options.

>        Both replies explained that strptime must not
> be available on the Windows platform. I surmised as
> much. But the problem is I'm not aware that there's
> anything like strftime() in Windows either.

In this particular case, Microsoft's runtime C library does support strftime
directly, but does not support strptime.

> ...
> exactly what is it that's missing strptime, so that my Python
> doesn't have one available to wrap?

OK, but the answer isn't going to help you <wink>:  msvcrt.dll (that's the
MicroSoft Visual C RunTime DLL).

>     (When I asked the question I was assuming that
> most of the time.this/that functions were done "by
> hand" in the Windows version of Python.)

They're not -- most of them are standard ANSI C library functions (for which
see the C standard), and "even Microsoft" <wink> takes a stab at supporting
those.  Since MS didn't see fit to support strptime (which is not std ANSI
C), the only way it will show up in an MS Windows version of Python is if
someone contributes implementation code for it using straight C.

note-that-strptime-is-missing-under-some-unices-too-ly y'rs  - tim






More information about the Python-list mailing list