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
a4759865
Commit
a4759865
authored
May 18, 2013
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Import shlex from the beginning
parent
97f7635f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
pronterface.py
pronterface.py
+1
-2
No files found.
pronterface.py
View file @
a4759865
...
@@ -26,6 +26,7 @@ except:
...
@@ -26,6 +26,7 @@ except:
print
_
(
"WX is not installed. This program requires WX to run."
)
print
_
(
"WX is not installed. This program requires WX to run."
)
raise
raise
import
sys
,
glob
,
time
,
datetime
,
threading
,
traceback
,
cStringIO
,
subprocess
import
sys
,
glob
,
time
,
datetime
,
threading
,
traceback
,
cStringIO
,
subprocess
import
shlex
from
printrun.pronterface_widgets
import
*
from
printrun.pronterface_widgets
import
*
from
serial
import
SerialException
from
serial
import
SerialException
...
@@ -223,7 +224,6 @@ class PronterWindow(MainWindow, pronsole.pronsole):
...
@@ -223,7 +224,6 @@ class PronterWindow(MainWindow, pronsole.pronsole):
param
=
self
.
settings
.
final_command
param
=
self
.
settings
.
final_command
if
not
param
:
if
not
param
:
return
return
import
shlex
pararray
=
[
i
.
replace
(
"$s"
,
str
(
self
.
filename
))
.
replace
(
"$t"
,
format_duration
(
print_duration
))
.
encode
()
for
i
in
shlex
.
split
(
param
.
replace
(
"
\\
"
,
"
\\\\
"
)
.
encode
())]
pararray
=
[
i
.
replace
(
"$s"
,
str
(
self
.
filename
))
.
replace
(
"$t"
,
format_duration
(
print_duration
))
.
encode
()
for
i
in
shlex
.
split
(
param
.
replace
(
"
\\
"
,
"
\\\\
"
)
.
encode
())]
self
.
finalp
=
subprocess
.
Popen
(
pararray
,
stderr
=
subprocess
.
STDOUT
,
stdout
=
subprocess
.
PIPE
)
self
.
finalp
=
subprocess
.
Popen
(
pararray
,
stderr
=
subprocess
.
STDOUT
,
stdout
=
subprocess
.
PIPE
)
...
@@ -1190,7 +1190,6 @@ class PronterWindow(MainWindow, pronsole.pronsole):
...
@@ -1190,7 +1190,6 @@ class PronterWindow(MainWindow, pronsole.pronsole):
def
skein_func
(
self
):
def
skein_func
(
self
):
try
:
try
:
import
shlex
param
=
self
.
expandcommand
(
self
.
settings
.
slicecommand
)
.
encode
()
param
=
self
.
expandcommand
(
self
.
settings
.
slicecommand
)
.
encode
()
print
"Slicing: "
,
param
print
"Slicing: "
,
param
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
())]
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
())]
...
...
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