In my current directory, I have a foo1.py
script and a directory named other with a foo2.py
script inside.
Now:
I launch the interpreter, and using execfile
I can launch both scripts. The thing is, when I edit and save foo1.py
, I don't have to restart the interpreter, I just execfile
again and it runs with my modifications, but the same doesn't happen with foo2.py
. For the edits I made to foo2.py
to take effect I have to quit and relaunch the interpreter, since even after saving it execfile('foo2.py')
will run the same script as before...
This is annoying, as I wanted to constantly be editing and launching multiple scripts in sucession, who often depend on each other...
How can I make it soo that the interpreter sees my edits to foo2.py
, without having to restart it?
Thanks!