I work in the django IPython-shell, which can be started with manage.py shell
.
When i load an extern function in the shell for testing, everything is alright. But when i make changes to the function, the shell still has the old version of the function. Even if i make a new import.
Does anyone know how to reload the actual version of the function?
Thanks in regards!
Edit: I use windows - if that makes a difference.
I reload the module by remove it from the the sys.modules and make a new import.
import sys
sys.modules.pop('your.module')
import your.module
# or
from your.module import your_function
try using built in "reload" function on desired module.
http://docs.python.org/library/functions.html?highlight=reload#reload
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With