[Python-3000] Removing windows 95 specific code

Paul Moore p.f.moore at gmail.com
Tue Nov 20 12:38:30 CET 2007


On 20/11/2007, "Martin v. Löwis" <martin at v.loewis.de> wrote:
> I think the concern is also about shells other than command.com,
> such as 4NT (can you set COMSPEC to the PowerShell?). If you google
> for it, you find that people do use 4NT, and apparently also make
> COMSPEC point to it.

I certainly use 4NT, and 4NT itself sets COMSPEC to its own path - so
even if COMSPEC is set globally to CMD (the default) then when running
Python from a 4NT command line, you would see COMSPEC set to 4NT.

Having said that, I believe the point with w9xpopen was to work around
the fact that COMMAND.COM fails to pass the return code of the last
run command back to the calling program - so that os.system didn't
accurately report that a program had failed. I don't believe that this
misfeature has survived into any modern command processor, so it would
seem sensible to remove w9xpopen and simply document that if COMSPEC
is COMMAND.COM, then the return code of os.system (and similar) is
unreliable.

Paul.


More information about the Python-3000 mailing list