update module on import to python interpreter

后端 未结 2 1771
傲寒
傲寒 2020-12-21 04:03

In short

How to force python interpreter to load the most up-to-date code version of my module everytime I make some changes in the module code?

2条回答
  •  醉话见心
    2020-12-21 04:21

    (Spyder dev here) I think at the moment you are not able to reload a module directly in the console (but we are considering to change this in the future).

    The idea about UMD is that it will reload your modules but only if you run a file from the editor that imports them. It doesn't work if you want to reload them directly in the console.

    Let's say you developed a module, then you are probably using it in a different script that (most likely) you'll be writing in our editor and send it to run to our console. UMD is a little bit of magic that reloads it for you when that happens.

提交回复
热议问题