Running Scripts vs Interactive mode
ben+python at benfinney.id.au
Thu Feb 24 00:54:22 CET 2011
grobs456 <gregory.alexander.roberts at gmail.com> writes:
> I am trying to work through the tutorial at:
Excellent! I heartily encourage everyone to do this when learning
Python: *work through* (not just read) the tutorial. Good for you!
> 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
> I would prefer to follow along with the tutorial, compiling new ticks
> and topics into a growing .py file
Not a good idea; the exercises aren't meant to be all run in an
ever-growing single program. You should instead make a directory of
small programs that are independent, one for each exercise.
> Python is installed at:
> 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.)
> #Also, note that I do not see the any system environment variables
> get updated when I run the above.
Right, that's only for the current environment (generally, one program
and any of its child processes). You'll need to find how to set
environment variables in your login profile if you want that to persist.
\ “Good judgement comes from experience. Experience comes from |
`\ bad judgement.” —Frederick P. Brooks |
More information about the Python-list