2
from mypackage.pkg import mymodule ... reload(mypackage.pkg.mymodule) 

results in NameError: global name 'mypackage' is not defined.

How should mymodule be reloaded?

1 Answer 1

8
from mypackage.pkg import mymodule reload(mymodule) 

or

import mypackage.pkg.mymodule ... reload(mypackage.pkg.mymodule) 
Sign up to request clarification or add additional context in comments.

1 Comment

I swear this wasn't working earlier on. Although obviously I'm talking out of my arse.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.