[Tutor] running scripts with windows

John Fouhy john at fouhy.net
Thu Sep 15 00:28:26 CEST 2005


On 15/09/05, Ed Hotchkiss <edhotchkiss at gmail.com> wrote:
> Hi everyone, I'm home for the next few weeks while I'm learning Python, and
> I'm not on a *NIX box, I'm using windows. How the hell do I run a Python
> script? Sorry if this is a 'dumb question'. 

Step 1 - install python :-) http://www.python.org/ has Windows binaries.

Step 2 - make sure python.exe is in your path.  You can edit your path
by right-clicking on "My computer" and following your nose.

Step 3 - get a command shell (eg, Start->Run->"cmd"). cd to the
directory where your script is and tyoe "python [scriptname]".

You can also double-click on the script name in Windows Explorer, but
the disadvantage of that is that the shell goes away as soon as your
script finishes, which makes seeing output hard.

Finally, if you're accustomed to unix, you might like to install
Cygwin (http://www.cygwin.com/)  It gives you a bash shell in Windows.
 Quite nice.

HTH!

-- 
John.


More information about the Tutor mailing list