每当我在Python Shell中运行程序时,我都会得到一行重新启动的信息:C:\ ... $

编程入门 行业动态 更新时间:2024-10-10 17:28:03
本文介绍了每当我在Python Shell中运行程序时,我都会得到一行重新启动的信息:C:\ ... $的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

每当我在Python Shell中运行程序时,我都会得到一行显示 RESTART:C:\ ... $ .

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!

这是什么原因造成的?

推荐答案

该行表示 .py 文件已在python shell中执行.

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.

简单来说:IDLE在执行之前会在内部重新启动您的程序,因此清除了上面所有的信息,所以变量较早版本的程序不会干扰您的程序

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

.

更多推荐

每当我在Python Shell中运行程序时,我都会得到一行重新启动的信息:C:\ ... $

本文发布于:2023-11-27 15:29:54,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1638570.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:我在   重新启动   程序   我都会   信息

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!