Thread Closed

loading file in python shell

 
Share Thread Thread Tools
Jan15-08, 02:55 AM   #1
 

loading file in python shell


How can I load a .py file in the python interactive shell for debugging?
 
PhysOrg.com
PhysOrg
science news on PhysOrg.com

>> 'Whodunnit' of Irish potato famine solved
>> The mammoth's lament: Study shows how cosmic impact sparked devastating climate change
>> Curiosity Mars rover drills second rock target
Jan15-08, 08:58 PM   #2
 
If you open the python interpreter by typing:

python -i filename.py

It will execute filename.py and then drop you into interactive mode with the environment left behind by filename.py.

I sometimes build this directly into my scripts, for example by beginning with:

#!/usr/bin/python -i
 
Thread Closed
Thread Tools


Similar Threads for: loading file in python shell
Thread Forum Replies
Loading a file (module) in Python Computing & Technology 6
Make a Pdf file into an ordinary web file (html file)? Computing & Technology 3
Loading a File in C++ Computing & Technology 15
My network directory file synch batch file thing :) Computing & Technology 2
[SOLVED] on shell, off shell - what does it mean General Physics 7