PyCharm runs an interactive Python console (IPython in my case), but when I make changes in the code, PyCharm doesn't reimport the modules I've been editing, so the console runs the old code.
More so, if I have an old package installed via Run setup.py Task, Python imports the old one after import mymodule as mm in the console.
One workaround is to edit the code in a file and rerun it without the interactive console, but that's not a very elegant solution.
How can I keep the interactive console up-to date and update modules on-the-fly?
reload(module), being module a module object. I find it quite handy. - bgusachimport imp; imp.reload(module)- Anton Tarasenkoimpis deprecated in favour ofimportlibsee Chaffelson answer below - loved.by.Jesus