Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
Printrun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
machinery
Printrun
Commits
a99a801c
Commit
a99a801c
authored
Dec 02, 2011
by
Keegi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
escape backslashes - work around shlex eating them before passing filename on to slicer
parent
344cee84
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
pronterface.py
pronterface.py
+2
-2
No files found.
pronterface.py
View file @
a99a801c
...
@@ -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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment