chiark / gitweb /
Hide the console for the slicing subprocess.
authordaid303 <daid303@gmail.com>
Mon, 1 Oct 2012 15:51:15 +0000 (17:51 +0200)
committerdaid303 <daid303@gmail.com>
Mon, 1 Oct 2012 15:51:15 +0000 (17:51 +0200)
Cura/gui/printWindow.py
Cura/gui/sliceProgessPanel.py

index 18ff413ba5d452ec4a696a3863c7e737ea103f22..1bca20ad9148704b2824d7c4f4cba1e1a2f89d14 100644 (file)
@@ -48,7 +48,7 @@ class printProcessMonitor():
                p = self.handle\r
                line = p.stdout.readline()\r
                while(len(line) > 0):\r
-                       print line.rstrip()\r
+                       #print line.rstrip()\r
                        line = p.stdout.readline()\r
                p.wait()\r
                self.handle = None\r
@@ -473,7 +473,7 @@ class printWindow(wx.Frame):
                                prevLineType = lineType\r
                gcode = gcodeInterpreter.gcode()\r
                gcode.loadList(gcodeList)\r
-               print "Loaded: %s (%d)" % (filename, len(gcodeList))\r
+               #print "Loaded: %s (%d)" % (filename, len(gcodeList))\r
                self.filename = filename\r
                self.gcode = gcode\r
                self.gcodeList = gcodeList\r
@@ -500,7 +500,8 @@ class printWindow(wx.Frame):
                return True\r
 \r
        def mcLog(self, message):\r
-               print message\r
+               #print message\r
+               pass\r
        \r
        def mcTempUpdate(self, temp, bedTemp):\r
                self.temperatureGraph.addPoint(temp, self.temperatureSelect.GetValue(), bedTemp, self.bedTemperatureSelect.GetValue())\r
index a1f36aa51313a2cf5e2b1fea50b39d9f2dcf33d3..bd278ccbbdd0d59551c06353b5e23695f3048a78 100644 (file)
@@ -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: