I have a Python Module test, I want to edit test and run some functions in test at the interpreter. Will Python automatically see the differences in the functions that I edit in test without reimporting? What is the appropriate word for this action?
- What are the best practices for reimporting/reloading/redefining?
- How can this be done efficiently? (It seems inefficient to highlight text with a mouse and then copy and paste).
EDIT Nothing mentioned so far is working so I will post a few more details:
A class is in my module, called Test. So I used the statement from test import Test
. Now when I try the command reload(test)
the interpreter tells me reload is undefined. If I do import imp
then imp.reload(test)
the interpreter tells me that test
is undefined. What is going wrong here?