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
17ebca59
Commit
17ebca59
authored
Aug 08, 2013
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixup argparse plumbing
parent
8e6ea9b0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
9 deletions
+8
-9
prontserve.py
printrun/prontserve.py
+3
-2
prontserve.py
prontserve.py
+5
-7
No files found.
printrun/prontserve.py
View file @
17ebca59
...
...
@@ -74,7 +74,8 @@ class Prontserve(pronsole.pronsole, EventEmitter):
self
.
settings
.
sensor_names
=
{
'T'
:
'extruder'
,
'B'
:
'bed'
}
self
.
settings
.
sensor_poll_rate
=
1
# seconds
self
.
p
.
loud
=
kwargs
[
'loud'
]
self
.
dry_run
=
kwargs
[
'dry_run'
]
==
True
self
.
dry_run
=
kwargs
[
'dry_run'
]
self
.
heaptrace
=
kwargs
[
'heaptrace'
]
self
.
stdout
=
sys
.
stdout
self
.
load_default_rc
()
self
.
p
.
sendcb
=
self
.
sendcb
...
...
@@ -150,7 +151,7 @@ class Prontserve(pronsole.pronsole, EventEmitter):
self
.
server
.
ioloop
.
start
()
except
Exception
as
ex
:
print
traceback
.
format_exc
()
if
args
.
heaptrace
:
if
self
.
heaptrace
:
from
guppy
import
hpy
print
hpy
()
.
heap
()
self
.
p
.
disconnect
()
...
...
prontserve.py
View file @
17ebca59
...
...
@@ -4,10 +4,9 @@ import argparse
from
printrun.prontserve
import
Prontserve
# Args
# -------------------------------------------------
if
__name__
==
"__main__"
:
# Args
# -------------------------------------------------
parser
=
argparse
.
ArgumentParser
(
description
=
'Runs a 3D printer server using the Construct Protocol'
...
...
@@ -27,8 +26,7 @@ if __name__ == "__main__":
args
=
parser
.
parse_args
()
# Server Start Up
# -------------------------------------------------
# Server Start Up
# -------------------------------------------------
if
__name__
==
"__main__"
:
prontserve
=
Prontserve
(
dry_run
=
args
.
dry_run
,
loud
=
args
.
loud
)
.
start
()
prontserve
=
Prontserve
(
**
vars
(
args
))
.
start
()
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