python - re-importing a module into a pycharm console doesn't update the code unless i delete/restart the console -


The example shows:

I am creating a simple module (Fibonacci calculator) Start a pycharm console, import the module, run the function inside the console, and it works. Now I edit some print text in the module. Go back to the console and run "Import FiBagain"
The console is doing this without complaining, but when I run the fib () function, even then it is giving me results from the previous version of the console fibagain.py file Can not see updated version If I remove the console and open it again, the 'import fibagain' will be running the latest version of Fib (3). Sorry, but there is no permission to post the appropriate image link here. This address shows the screencapture:

Enter image details here < / div>

Again, instead of import , you want:

reload (fibagain))

This will reload the updated module. (Note: This works only when FabBian was imported some time ago)

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -