[Tutor] Strange XP stdin behaviour.

Tim Peters tim.peters at gmail.com
Sat Aug 27 17:30:44 CEST 2005

[Alan Gauld]
> Thanks Danny, interesting link in that it shows a solution I
> didn't know about in the one-liner at the bottom of the discussion.
> But really I was hoping someone could explain *why* there is a
> difference. If PATHEXT can detect that intest.py needs to be run
> through Python why doesn't redirection work as expected? What
> is happening to stdin/stdout in this case?

Alas, only Microsoft could explain this, and AFAIK they never really
have.  It's not unique to Python, of course.  Here's a confused MS
article about it:


_Some_ of the PATHEXT-related redirection bugs did get fixed in XP,
but not all of them.  I haven't tried adding the registry entry they
suggest there.  The


key doesn't even exist on my XP (Pro, SP2) box, but does exist if I
start from HKEY_CURRENT_USER instead.

More information about the Tutor mailing list