Commit a99a801c authored by Keegi's avatar Keegi

escape backslashes - work around shlex eating them before passing filename on to slicer

parent 344cee84
...@@ -1243,11 +1243,11 @@ class PronterWindow(wx.Frame,pronsole.pronsole): ...@@ -1243,11 +1243,11 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
try: try:
import shlex import shlex
param = self.expandcommand(self.settings.slicecommand).replace("$s",self.filename).replace("$o",self.filename.replace(".stl","_export.gcode").replace(".STL","_export.gcode")).encode() param = self.expandcommand(self.settings.slicecommand).replace("$s",self.filename).replace("$o",self.filename.replace(".stl","_export.gcode").replace(".STL","_export.gcode")).encode()
print shlex.split(param) print shlex.split(param.replace("\\","\\\\"))
print "Slicing: ",param print "Slicing: ",param
self.cancelskein=0 self.cancelskein=0
#p=subprocess.Popen(param,shell=True,bufsize=10,stderr=subprocess.STDOUT,stdout=subprocess.PIPE,close_fds=True) #p=subprocess.Popen(param,shell=True,bufsize=10,stderr=subprocess.STDOUT,stdout=subprocess.PIPE,close_fds=True)
pararray=shlex.split(param) pararray=shlex.split(param.replace("\\","\\\\"))
#print pararray #print pararray
self.skeinp=subprocess.Popen(pararray,stderr=subprocess.STDOUT,stdout=subprocess.PIPE) self.skeinp=subprocess.Popen(pararray,stderr=subprocess.STDOUT,stdout=subprocess.PIPE)
while True: while True:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment