[Tutor] help with getting python to run from command prompt on Windows XP

Brian van den Broek broek at cc.umanitoba.ca
Wed Jan 14 20:36:20 CET 2009


Hi all,

I'm trying, via email, to help a friend set up python on his Windows
XP computer. I've been strictly linux for some time now, and don't
have a Windows machine on which to investigate. We've hit a problem,
and I'd appreciate a push.

He's got python 2.6.1 installed as evidenced by the Startbar program
icon for Idle launching as expected. When run from IDLE, `print
sys.executable' yields `C:\\Python26\\pythonw.exe'.
He reports that C:\Python26 contains both python.exe and pythonw.exe.

I've had him add the text `;C:\Python26' (without quotes) to the end
of his Path environment variable via the Control Panel|System
Properties way of editing Environment variables. I've had him reboot
afterwards.

After all of that, he reports that an attempt to run python from the
command prompt produces a complaint that `` `python' is not recognized
as an internal or external command, operable program or batch file.''

Can someone with Windows knowledge please tell me what I am missing?
Am I wrong in recalling that from the command prompt on Windows, one
wants python, rather than pythonw? (I seem to recollect that
pythonw.exe is what you associate with .py files to prevent a
double-click on a .py icon from producing the `DOS box flash' and
*not* what one wants to use from the prompt itself.)

Thanks and best,

Brian vdB



More information about the Tutor mailing list