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
1a90feb2
Commit
1a90feb2
authored
Dec 22, 2011
by
Kliment Yanev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix command line handling for stl files with spaces in the name
parent
5b0e0c98
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
9 deletions
+7
-9
pronsole.py
pronsole.py
+4
-3
pronterface.py
pronterface.py
+3
-6
No files found.
pronsole.py
View file @
1a90feb2
...
...
@@ -1135,13 +1135,14 @@ class pronsole(cmd.Cmd):
try
:
import
shlex
if
(
settings
):
param
=
self
.
expandcommand
(
self
.
settings
.
sliceoptscommand
)
.
encode
()
param
=
self
.
expandcommand
(
self
.
settings
.
sliceoptscommand
)
.
replace
(
"
\\
"
,
"
\\\\
"
)
.
encode
()
print
"Entering skeinforge settings: "
,
param
subprocess
.
call
(
shlex
.
split
(
param
))
else
:
param
=
self
.
expandcommand
(
self
.
settings
.
slicecommand
)
.
replace
(
"$s"
,
l
[
0
])
.
replace
(
"$o"
,
l
[
0
]
.
replace
(
".stl"
,
"_export.gcode"
)
.
replace
(
".STL"
,
"_export.gcode"
))
.
encode
()
param
=
self
.
expandcommand
(
self
.
settings
.
slicecommand
)
.
encode
()
print
"Slicing: "
,
param
subprocess
.
call
(
shlex
.
split
(
param
))
params
=
[
i
.
replace
(
"$s"
,
l
[
0
])
.
replace
(
"$o"
,
l
[
0
]
.
replace
(
".stl"
,
"_export.gcode"
)
.
replace
(
".STL"
,
"_export.gcode"
))
.
encode
()
for
i
in
shlex
.
split
(
param
.
replace
(
"
\\
"
,
"
\\\\
"
)
.
encode
())]
subprocess
.
call
(
params
)
print
"Loading skeined file."
self
.
do_load
(
l
[
0
]
.
replace
(
".stl"
,
"_export.gcode"
))
except
Exception
,
e
:
...
...
pronterface.py
View file @
1a90feb2
...
...
@@ -1257,13 +1257,10 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
def
skein_func
(
self
):
try
:
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
()
print
shlex
.
split
(
param
.
replace
(
"
\\
"
,
"
\\\\
"
))
param
=
self
.
expandcommand
(
self
.
settings
.
slicecommand
)
.
encode
()
print
"Slicing: "
,
param
self
.
cancelskein
=
0
#p=subprocess.Popen(param,shell=True,bufsize=10,stderr=subprocess.STDOUT,stdout=subprocess.PIPE,close_fds=True)
pararray
=
shlex
.
split
(
param
.
replace
(
"
\\
"
,
"
\\\\
"
))
#print pararray
pararray
=
[
i
.
replace
(
"$s"
,
self
.
filename
)
.
replace
(
"$o"
,
self
.
filename
.
replace
(
".stl"
,
"_export.gcode"
)
.
replace
(
".STL"
,
"_export.gcode"
))
.
encode
()
for
i
in
shlex
.
split
(
param
.
replace
(
"
\\
"
,
"
\\\\
"
)
.
encode
())]
#print pararray
self
.
skeinp
=
subprocess
.
Popen
(
pararray
,
stderr
=
subprocess
.
STDOUT
,
stdout
=
subprocess
.
PIPE
)
while
True
:
o
=
self
.
skeinp
.
stdout
.
read
(
1
)
...
...
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