From 9b119e996af7e9b72a8509a99b69a0df7fed5ec4 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Tue, 29 Sep 2015 16:22:15 +0200 Subject: [PATCH] Capture stdout and stderr on Windows to prevent py2exe messages CURA-215 #done --- cura_app.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cura_app.py b/cura_app.py index 4bd49dc081..41d02016b2 100755 --- a/cura_app.py +++ b/cura_app.py @@ -13,5 +13,10 @@ sys.excepthook = exceptHook import cura.CuraApplication +if sys.platform == "win32" and hasattr(sys, "frozen"): + from UM.Resources import Resources + sys.stdout = open(Resources.getPath(Resources.Resources, "stdout.log"), "w") + sys.stderr = open(Resources.getPath(Resources.Resources, "stderr.log"), "w") + app = cura.CuraApplication.CuraApplication.getInstance() app.run()