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.
To import an updated package while in Python Interpreter you have two method:
try using reimport: a full featured reload for Python.
It looks like this question was asked/answered prior to the release of reimport, which bills itself as a "full featured reload for Python":
Python doesn't have a native array data ...READ MORE
For Python 2.6 and later and Python ...READ MORE
In Python, the break statement provides you with the opportunity ...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
colors = ['red', 'green', ...READ MORE
Enumerate() method adds a counter to an ...READ MORE
For Python 2.6 and later and ...READ MORE
Try this out:
>>> import os
Also ...READ MORE
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.