python script launches shell

Chris Barker chrishbarker at home.net
Fri Sep 21 13:31:40 EDT 2001


John Hunter wrote:

> Alternatively, is there an easy way to run all the lines in a file.
> Then I could launch python and run the script inside.

yep.

execfile("scriptname.py")

I use it all the time. IF you are on a system that supports readline,
you can easily hit hte up arrow key and repeat the command when you have
edited your script. I find it a very handly alternative to an IDE.


-Chris


-- 
Christopher Barker,
Ph.D.                                                           
ChrisHBarker at home.net                 ---           ---           ---
http://members.home.net/barkerlohmann ---@@       -----@@       -----@@
                                   ------@@@     ------@@@     ------@@@
Oil Spill Modeling                ------   @    ------   @   ------   @
Water Resources Engineering       -------      ---------     --------    
Coastal and Fluvial Hydrodynamics --------------------------------------
------------------------------------------------------------------------



More information about the Python-list mailing list