问题
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?
回答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