Pycharm 退出代码 0 [英] Pycharm exit code 0

查看:214
本文介绍了Pycharm 退出代码 0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我运行任何代码时,我的控制台总是以 Process finished with exit code 0 结束.

Whenever I run any code, my console always ends with Process finished with exit code 0.

例如,如果我只是打印(hellow"):

For example, if i were to just print("hellow"):

pydev debugger: process 21021 is connecting

Connected to pydev debugger (build 131.618)
hellow

Process finished with exit code 0

有什么办法可以让输出只是hellow"?

Is there any way to make the output just "hellow"?

推荐答案

你意识到它不是输出的一部分吗?这只是 IDE 控制台提供的附加信息.真正的程序只是按预期输出 hellow.

You realize it is not part of the output right? It's just additional information provided by the IDE's console. The real program is just outputting hellow as expected.

Process 以退出代码 0 结束 意味着一切正常.如果您的程序中发生异常或以其他方式生成带有非零参数的 exit,IDE 会通知您这一点,这是有用的调试信息.

Saying that the Process finished with exit code 0 means that everything worked ok. If an exception occurs in your program or otherwise an exit is generated with non-zero argument, the IDE is gonna inform you about this, which is useful debug information.

在生产环境中,您不应该从 IDE 运行 Python 程序,因此我认为尝试删除它是无关紧要的.

You're not supposed to run your Python programs from the IDE when in production so I think trying to remove that is irrelevant.

这篇关于Pycharm 退出代码 0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆