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
39245779
Commit
39245779
authored
Jun 22, 2011
by
kliment
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #17 from k-eex/macros
making macros work on pronterface
parents
e97d8df3
936a2685
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
pronsole.py
pronsole.py
+5
-2
pronterface.py
pronterface.py
+2
-0
No files found.
pronsole.py
View file @
39245779
...
...
@@ -177,10 +177,10 @@ class pronsole(cmd.Cmd):
self
.
p
.
disconnect
()
cmd
.
Cmd
.
postloop
(
self
)
def
preloop
(
self
):
def
load_rc
(
self
,
rc_filename
=
".pronsolerc"
):
self
.
processing_rc
=
True
try
:
rc
=
open
(
os
.
path
.
join
(
os
.
path
.
expanduser
(
"~"
),
".pronsolerc"
))
rc
=
open
(
os
.
path
.
join
(
os
.
path
.
expanduser
(
"~"
),
rc_filename
))
for
rc_cmd
in
rc
:
if
not
rc_cmd
.
lstrip
()
.
startswith
(
"#"
):
self
.
onecmd
(
rc_cmd
)
...
...
@@ -188,6 +188,9 @@ class pronsole(cmd.Cmd):
except
IOError
:
pass
self
.
processing_rc
=
False
def
preloop
(
self
):
self
.
load_rc
()
print
"Welcome to the printer console! Type
\"
help
\"
for a list of available commands."
cmd
.
Cmd
.
preloop
(
self
)
...
...
pronterface.py
View file @
39245779
...
...
@@ -40,6 +40,7 @@ class Tee(object):
class
PronterWindow
(
wx
.
Frame
,
pronsole
.
pronsole
):
def
__init__
(
self
,
filename
=
None
,
size
=
winsize
):
pronsole
.
pronsole
.
__init__
(
self
)
self
.
filename
=
filename
os
.
putenv
(
"UBUNTU_MENUPROXY"
,
"0"
)
wx
.
Frame
.
__init__
(
self
,
None
,
title
=
"Printer Interface"
,
size
=
size
);
...
...
@@ -99,6 +100,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self
.
t
=
Tee
(
self
.
catchprint
)
self
.
stdout
=
sys
.
stdout
self
.
mini
=
False
self
.
load_rc
(
".pronsolerc"
)
def
do_extrude
(
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