For Python 2.x
reload(foo)
For Python 3.x
import importlib
import foo #import the module here, so that it can be reloaded.
importlib.reload(foo)
More Related Contents:
- Prevent Python from caching the imported modules
- How to fix “Attempted relative import in non-package” even with __init__.py
- Using both Python 2.x and Python 3.x in IPython Notebook
- ImportError: Cannot import name X
- Import a file from a subdirectory?
- Reading file using relative path in python project
- Relative imports in Python 3
- Purpose of “%matplotlib inline”
- Relative imports – ModuleNotFoundError: No module named x
- Importing an ipynb file from another ipynb file?
- Does python optimize modules when they are imported multiple times?
- How to import a Python class that is in a directory above?
- Automatically import modules when entering the python or ipython interpreter
- “ImportError: No module named” when trying to run Python script
- PYTHONPATH vs. sys.path
- Progress indicator during pandas operations
- How to dynamically load a Python class
- Coloring Cells in Pandas
- Embedding IPython Qt console in a PyQt application
- Importing packages in Python
- Absolute imports in python not working, relative imports work
- Local import statements in Python
- R and Python in one Jupyter notebook
- Programmatically get current IPython notebook cell output?
- cannot override sys.excepthook
- How to get ipywidgets working in Jupyter Lab?
- How to pickle or store Jupyter (IPython) notebook session for later
- Jupyter | The kernel appears to have died. It will restart automatically |
- My plot in ipython does not show with pyplot.show()
- How to reference python package when filename contains a period