68924/how-to-reimport-updated-package-while-in-python-interpreter
I often test my module in the Python Interpreter and when I see an error I quickly update the .py file. But how do I make it reflect on the Interpreter?
You can use importlib.reload() for the same.
Hello,
To import an updated package while in Python Interpreter you have two method:
Method-1:
try using reimport: a full featured reload for Python.
Method-2:
It looks like this question was asked/answered prior to the release of reimport, which bills itself as a "full featured reload for Python":
Thank You!!
Python doesn't have a native array data ...READ MORE
For Python 2.6 and later and Python ...READ MORE
Instead of using the normal UTF-8 encoding, ...READ MORE
David here, from the Zapier Platform team. ...READ MORE
suppose you have a string with a ...READ MORE
You can also use the random library's ...READ MORE
Syntax : list. count(value) Code: colors = ['red', 'green', ...READ MORE
Enumerate() method adds a counter to an ...READ MORE
Hello @kartik, For Python 2.6 and later and ...READ MORE
Hello @kartik, Try this out: >>> import os >>> os.path.abspath("mydir/myfile.txt") 'C:/example/cwd/mydir/myfile.txt' Also ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.