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
8c3cbe06
Commit
8c3cbe06
authored
Nov 04, 2014
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP #575: Strenghten // handling
parent
3aabfbe0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
34 deletions
+38
-34
pronsole.py
printrun/pronsole.py
+21
-19
pronterface.py
printrun/pronterface.py
+17
-15
No files found.
printrun/pronsole.py
View file @
8c3cbe06
...
@@ -1227,26 +1227,28 @@ class pronsole(cmd.Cmd):
...
@@ -1227,26 +1227,28 @@ class pronsole(cmd.Cmd):
sys
.
stdout
.
flush
()
sys
.
stdout
.
flush
()
return
True
return
True
elif
l
.
startswith
(
"//"
):
elif
l
.
startswith
(
"//"
):
command
=
l
.
split
(
" "
,
1
)[
1
]
command
=
l
.
split
(
" "
,
1
)
self
.
log
(
_
(
"Received command
%
s"
)
%
command
)
if
len
(
command
)
>
1
:
command
=
command
.
split
(
":"
)
if
len
(
command
)
==
2
and
command
[
0
]
==
"action"
:
command
=
command
[
1
]
command
=
command
[
1
]
if
command
==
"pause"
:
self
.
log
(
_
(
"Received command
%
s"
)
%
command
)
self
.
do_pause
(
None
)
command
=
command
.
split
(
":"
)
sys
.
stdout
.
write
(
self
.
promptf
())
if
len
(
command
)
==
2
and
command
[
0
]
==
"action"
:
sys
.
stdout
.
flush
()
command
=
command
[
1
]
return
True
if
command
==
"pause"
:
elif
command
==
"resume"
:
self
.
do_pause
(
None
)
self
.
do_resume
(
None
)
sys
.
stdout
.
write
(
self
.
promptf
())
sys
.
stdout
.
write
(
self
.
promptf
())
sys
.
stdout
.
flush
()
sys
.
stdout
.
flush
()
return
True
return
True
elif
command
==
"resume"
:
elif
command
==
"disconnect"
:
self
.
do_resume
(
None
)
self
.
do_disconnect
(
None
)
sys
.
stdout
.
write
(
self
.
promptf
())
sys
.
stdout
.
write
(
self
.
promptf
())
sys
.
stdout
.
flush
()
sys
.
stdout
.
flush
()
return
True
return
True
elif
command
==
"disconnect"
:
self
.
do_disconnect
(
None
)
sys
.
stdout
.
write
(
self
.
promptf
())
sys
.
stdout
.
flush
()
return
True
return
False
return
False
def
recvcb
(
self
,
l
):
def
recvcb
(
self
,
l
):
...
...
printrun/pronterface.py
View file @
8c3cbe06
...
@@ -1681,22 +1681,24 @@ Printrun. If not, see <http://www.gnu.org/licenses/>."""
...
@@ -1681,22 +1681,24 @@ Printrun. If not, see <http://www.gnu.org/licenses/>."""
wx
.
CallAfter
(
self
.
addtexttolog
,
msg
[
1
]
+
"
\n
"
)
wx
.
CallAfter
(
self
.
addtexttolog
,
msg
[
1
]
+
"
\n
"
)
return
True
return
True
elif
l
.
startswith
(
"//"
):
elif
l
.
startswith
(
"//"
):
command
=
l
.
split
(
" "
,
1
)[
1
]
command
=
l
.
split
(
" "
,
1
)
self
.
log
(
_
(
"Received command
%
s"
)
%
command
)
if
len
(
command
)
>
1
:
command
=
command
.
split
(
":"
)
if
len
(
command
)
==
2
and
command
[
0
]
==
"action"
:
command
=
command
[
1
]
command
=
command
[
1
]
if
command
==
"pause"
:
self
.
log
(
_
(
"Received command
%
s"
)
%
command
)
if
not
self
.
paused
:
command
=
command
.
split
(
":"
)
wx
.
CallAfter
(
self
.
pause
)
if
len
(
command
)
==
2
and
command
[
0
]
==
"action"
:
return
True
command
=
command
[
1
]
elif
command
==
"resume"
:
if
command
==
"pause"
:
if
self
.
paused
:
if
not
self
.
paused
:
wx
.
CallAfter
(
self
.
pause
)
wx
.
CallAfter
(
self
.
pause
)
return
True
return
True
elif
command
==
"disconnect"
:
elif
command
==
"resume"
:
wx
.
CallAfter
(
self
.
disconnect
)
if
self
.
paused
:
return
True
wx
.
CallAfter
(
self
.
pause
)
return
True
elif
command
==
"disconnect"
:
wx
.
CallAfter
(
self
.
disconnect
)
return
True
return
False
return
False
def
recvcb
(
self
,
l
):
def
recvcb
(
self
,
l
):
...
...
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