goodcow goodcow - 18 days ago 11
Python Question

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"?

Answer

You realize it ain't part of the output don't you? 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.