[Python-Dev] os.path.getmtime on Windows

"Martin v. Löwis" martin at v.loewis.de
Sun Jan 15 22:32:01 CET 2006


Alexander Schremmer wrote:
>>>>There are several issues involved in implementing such a patch, though.
>>>>One is that you need to do it twice: once for Win9x, and once for
>>>>NT+, because you have to use Unicode file names on one system, and
>>>>ANSI file names on the other.
> 
> 
>>Right - the question would be whether completely breaking W9x support
>>in the process would be acceptable. We use the very same binaries
>>for W9x and NT.
> 
> 
> How about accessing/calling the wide char versions just if the OS is NT,
> i.e. compiling both versions into the dll and just using one?

Right. That's what I meant when I said: "you need to do it twice".

> Looking at the file object, the open function uses "_wfopen" which needs
> Windows NT according to the MSDN lib. So, how is 9x compat ensured here?

There is a GetVersion check in there; not sure how effective it is,
though. However, if you pass byte strings, as the file name, _wfopen
is not used.

Regards,
Martin


More information about the Python-Dev mailing list