Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
134 views
in Technique[技术] by (71.8m points)

python - Pycharm exit code 0

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

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

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.

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.

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...