By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,846 Members | 1,836 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,846 IT Pros & Developers. It's quick & easy.

Refreshing imported modules

P: n/a
I have the python interperter opened while editing a module. The
problem is that when I make changes, the module is not refreshed
whenever I import it again. I have to re-launch the interpreter, is
there a way to shortcut this?

May 2 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On May 2, 7:24 pm, noagbodjivic...@gmail.com wrote:
I have the python interperter opened while editing a module. The
problem is that when I make changes, the module is not refreshed
whenever I import it again. I have to re-launch the interpreter, is
there a way to shortcut this?
I believe you can use the 'reload' command. ie

First import your module :
>>import module_name

If you want to refresh the module after having changed it,
>>module_name = reload(module_name)
That should work. However, any variables you have declared which arise
from classes within your module must be redeclared.

May 3 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.