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
80b22290
Commit
80b22290
authored
Jun 09, 2011
by
kliment
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove dependency on "with" - works with python 2.5
parent
cee36985
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
9 deletions
+10
-9
pronsole.py
pronsole.py
+7
-6
pronterface.py
pronterface.py
+3
-3
No files found.
pronsole.py
View file @
80b22290
...
@@ -180,10 +180,11 @@ class pronsole(cmd.Cmd):
...
@@ -180,10 +180,11 @@ class pronsole(cmd.Cmd):
def
preloop
(
self
):
def
preloop
(
self
):
self
.
processing_rc
=
True
self
.
processing_rc
=
True
try
:
try
:
with
open
(
os
.
path
.
join
(
os
.
path
.
expanduser
(
"~"
),
".pronsolerc"
))
as
rc
:
rc
=
open
(
os
.
path
.
join
(
os
.
path
.
expanduser
(
"~"
),
".pronsolerc"
))
for
rc_cmd
in
rc
:
for
rc_cmd
in
rc
:
if
not
rc_cmd
.
lstrip
()
.
startswith
(
"#"
):
if
not
rc_cmd
.
lstrip
()
.
startswith
(
"#"
):
self
.
onecmd
(
rc_cmd
)
self
.
onecmd
(
rc_cmd
)
rc
.
close
()
except
IOError
:
except
IOError
:
pass
pass
self
.
processing_rc
=
False
self
.
processing_rc
=
False
...
@@ -768,8 +769,8 @@ class pronsole(cmd.Cmd):
...
@@ -768,8 +769,8 @@ class pronsole(cmd.Cmd):
print
"Skeinforge not found.
\n
Please copy Skeinforge into a directory named
\"
skeinforge
\"
in the same directory as this file."
print
"Skeinforge not found.
\n
Please copy Skeinforge into a directory named
\"
skeinforge
\"
in the same directory as this file."
return
return
if
not
os
.
path
.
exists
(
"skeinforge/__init__.py"
):
if
not
os
.
path
.
exists
(
"skeinforge/__init__.py"
):
with
open
(
"skeinforge/__init__.py"
,
"w"
):
f
=
open
(
"skeinforge/__init__.py"
,
"w"
)
pass
f
.
close
()
try
:
try
:
from
skeinforge.skeinforge_application.skeinforge_utilities
import
skeinforge_craft
from
skeinforge.skeinforge_application.skeinforge_utilities
import
skeinforge_craft
from
skeinforge.skeinforge_application
import
skeinforge
from
skeinforge.skeinforge_application
import
skeinforge
...
...
pronterface.py
View file @
80b22290
...
@@ -218,7 +218,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
...
@@ -218,7 +218,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self
.
logbox
.
SetEditable
(
0
)
self
.
logbox
.
SetEditable
(
0
)
self
.
sendbtn
=
wx
.
Button
(
self
.
panel
,
-
1
,
"Send"
,
pos
=
(
700
,
420
))
self
.
sendbtn
=
wx
.
Button
(
self
.
panel
,
-
1
,
"Send"
,
pos
=
(
700
,
420
))
self
.
sendbtn
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
sendline
)
self
.
sendbtn
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
sendline
)
self
.
monitorbox
=
wx
.
CheckBox
(
self
.
panel
,
-
1
,
"Monitor
printer"
,
pos
=
(
500
,
40
))
self
.
monitorbox
=
wx
.
CheckBox
(
self
.
panel
,
-
1
,
"Monitor
\n
printer"
,
pos
=
(
450
,
37
))
self
.
monitorbox
.
Bind
(
wx
.
EVT_CHECKBOX
,
self
.
setmonitor
)
self
.
monitorbox
.
Bind
(
wx
.
EVT_CHECKBOX
,
self
.
setmonitor
)
self
.
status
=
self
.
CreateStatusBar
()
self
.
status
=
self
.
CreateStatusBar
()
self
.
status
.
SetStatusText
(
"Not connected to printer."
)
self
.
status
.
SetStatusText
(
"Not connected to printer."
)
...
@@ -462,8 +462,8 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
...
@@ -462,8 +462,8 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
print
"Skeinforge not found.
\n
Please copy Skeinforge into a directory named
\"
skeinforge
\"
in the same directory as this file."
print
"Skeinforge not found.
\n
Please copy Skeinforge into a directory named
\"
skeinforge
\"
in the same directory as this file."
return
return
if
not
os
.
path
.
exists
(
"skeinforge/__init__.py"
):
if
not
os
.
path
.
exists
(
"skeinforge/__init__.py"
):
with
open
(
"skeinforge/__init__.py"
,
"w"
):
f
=
open
(
"skeinforge/__init__.py"
,
"w"
)
pass
f
.
close
()
self
.
cout
=
StringIO
.
StringIO
()
self
.
cout
=
StringIO
.
StringIO
()
self
.
filename
=
filename
self
.
filename
=
filename
self
.
stopsf
=
0
self
.
stopsf
=
0
...
...
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