From: daid303 Date: Mon, 1 Oct 2012 15:51:15 +0000 (+0200) Subject: Hide the console for the slicing subprocess. X-Git-Tag: 13.03~305 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=0dc413cd16bb300d7798e37b4d26cba98670d765;p=cura.git Hide the console for the slicing subprocess. --- diff --git a/Cura/gui/printWindow.py b/Cura/gui/printWindow.py index 18ff413b..1bca20ad 100644 --- a/Cura/gui/printWindow.py +++ b/Cura/gui/printWindow.py @@ -48,7 +48,7 @@ class printProcessMonitor(): p = self.handle line = p.stdout.readline() while(len(line) > 0): - print line.rstrip() + #print line.rstrip() line = p.stdout.readline() p.wait() self.handle = None @@ -473,7 +473,7 @@ class printWindow(wx.Frame): prevLineType = lineType gcode = gcodeInterpreter.gcode() gcode.loadList(gcodeList) - print "Loaded: %s (%d)" % (filename, len(gcodeList)) + #print "Loaded: %s (%d)" % (filename, len(gcodeList)) self.filename = filename self.gcode = gcode self.gcodeList = gcodeList @@ -500,7 +500,8 @@ class printWindow(wx.Frame): return True def mcLog(self, message): - print message + #print message + pass def mcTempUpdate(self, temp, bedTemp): self.temperatureGraph.addPoint(temp, self.temperatureSelect.GetValue(), bedTemp, self.bedTemperatureSelect.GetValue()) diff --git a/Cura/gui/sliceProgessPanel.py b/Cura/gui/sliceProgessPanel.py index a1f36aa5..bd278ccb 100644 --- a/Cura/gui/sliceProgessPanel.py +++ b/Cura/gui/sliceProgessPanel.py @@ -135,7 +135,14 @@ class WorkerThread(threading.Thread): self.start() def run(self): - p = subprocess.Popen(self.cmdList[self.fileIdx], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + kwargs = {} + if subprocess.mswindows: + su = subprocess.STARTUPINFO() + su.dwFlags |= subprocess.STARTF_USESHOWWINDOW + su.wShowWindow = subprocess.SW_HIDE + kwargs['startupinfo'] = su + print self.cmdList[self.fileIdx] + p = subprocess.Popen(self.cmdList[self.fileIdx], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, **kwargs) line = p.stdout.readline() self.progressLog = [] maxValue = 1 @@ -147,7 +154,6 @@ class WorkerThread(threading.Thread): maxValue = int(progress[2]) wx.CallAfter(self.notifyWindow.SetProgress, progress[0], int(progress[1]), maxValue) else: - #print line self.progressLog.append(line) wx.CallAfter(self.notifyWindow.statusText.SetLabel, line) if self.notifyWindow.abort: