Running Scripts vs Interactive mode

Rhodri James rhodri at wildebst.demon.co.uk
Thu Feb 24 01:55:02 CET 2011


On Wed, 23 Feb 2011 23:54:22 -0000, Ben Finney  
<ben+python at benfinney.id.au> wrote:

> grobs456 <gregory.alexander.roberts at gmail.com> writes:
>
>> I realize I can double click on a .py file and Windows treats it as an
>> executable but the command prompt pops in and out so quickly that I
>> can't see the results of my script.
>
> Don't do that, then :-)
>
> You can open a persistent terminal window, and run the program from the
> command line.

Being Windows, this is hidden in a filing cabinet in the basement
behind a door marked "Beware of the Leopard."  Or rather, somewhere
in the "Accessories" item in the Start menu.  I forget exactly what
it's called (and I'm not using Windows at the moment, so I can't check)
because I always drag a link to the QuickStart tray whenever I first
use a Windows machine.

>> Python is installed at:
>> C:\Python27
>>
>> and I ran:
>> set path=%path%;C:\python27
>> #do i have to run the above each time I open up a session?
>
> You should be able to set that value persistently. (I don't wash
> Windows, so I don't know what you need to do there.)

Control Panel => System, on the "Advanced" tab there's a button
labelled "Environment Variables" (or something like that).  You'll
want to edit the current PATH setting (in the lower half of the
dialog) to add ";C:\python27" to the end.  Obvious, isn't it :-/

-- 
Rhodri James *-* Wildebeest Herder to the Masses



More information about the Python-list mailing list