update module on import to python interpreter

后端 未结 2 1763
傲寒
傲寒 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:07

    Maybe useful for others. In Spyder 3.0.0, the modules can be reloaded by,

    Tools -> Update modules names list.

    It worked for me.

    0 讨论(0)
  • 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.

    0 讨论(0)
提交回复
热议问题