Hide the console for the slicing subprocess.

master
daid303 2012-10-01 17:51:15 +02:00
parent f6abc5c33a
commit 0dc413cd16
2 changed files with 12 additions and 5 deletions

View File

@ -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())

View 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: