KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
In Python, once I have imported a module X in an interpreter session using import X , and the module changes on the outside, I can reload the module with reload(X) . The changes then become available in my interpreter session. I am wondering if this also possible when I import a component Y from module X using from X import Y . The statement reload Y does not work, since Y is not a module itself, but only a component (in this case a class) inside of a module. Is it possible at all to reload individual components of a module without leaving the interpreter session (or importing the entire module)? For clarification, the question is about importing a class or function Y from a module X and reloading on a change, not a module Y from a package X.
Tags (comma-separated)
Save Edits
Cancel