Whenever I run a program in Python Shell I get a line that says RESTART: C:\… $

别来无恙 提交于 2021-01-29 10:05:29

问题


Whenever I run a program in Python Shell I get a line that says RESTART: C:\... $.

Restarting the program, using programs that did not have this issue in the past etc. do not seem to do anything. Thanks in advance for any advice!

What is causing this?

Image of the issue


回答1:


That line means that the .py file has been executed in the python shell.

It's a log statement to explicitly declare that your namespace is being cleared and the file is going to be ran fresh again.

In simple words: The IDLE internally restarts itself before executing your program, thus clearing all the information above so the variables from earlier programs will not mess with your program

.



来源:https://stackoverflow.com/questions/51959836/whenever-i-run-a-program-in-python-shell-i-get-a-line-that-says-restart-c

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