How to prevent compiled .exe from printing an extra new line when started from the console window

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By wiering

When I make a final release version of my app, I can disable stderr and stdout, but when I start it from the console window, the app still prints a new line, making it look like it’s still waiting for you to press Enter or something (even though that is not the case, you could type the next command there). Any ideas what could be causing this? Here, my Test project only has a new scene with a single button.

enter image description here

However, if I run Pixelorama or MaterialMaker in the same way, there is no extra new line and the cursor stays at the next prompt.

:bust_in_silhouette: Reply From: Calinou

As of Godot 3.5, console handling on Windows was refactored to allow for more flexibility. That said, it’s recommend to export a console script if you plan on making the app usable from the command line: [Export] Add "export console script" option for Linux, macOS, and Windows exports. by bruvzg · Pull Request #58455 · godotengine/godot · GitHub

Edit: For reference, this was cross-posted on GitHub: With stdout and stderr disabled, compiled .exe still outputs a new line to the console · Issue #64473 · godotengine/godot · GitHub