Spyder keeps displaying old code when Run

会有一股神秘感。 提交于 2021-01-29 14:52:04

问题


I updated my code, saved it and then when I try to run it I keep getting old code that isn't there anymore. I restarted the session and deleted the old file and created a new one...still happening. Any ideas? Thanks in advance.


回答1:


Try selecting : Execute in a dedicated console under Run --> Configure will start a new IPython Console every time the Demo.py program is executed. Main use of this mode over Execute in current console is that we can be certain that there are no global objects defined in this Console which originate from debugging and repeated execution of our code. Every time we run the code in the Editor, the IPython Console in which the code runs is restarted.

If it related to some existing values you can clear by : def clear_all()



来源:https://stackoverflow.com/questions/61643118/spyder-keeps-displaying-old-code-when-run

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!