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
4e0d75e2
Commit
4e0d75e2
authored
Jul 20, 2013
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:kliment/Printrun
parents
d4e01201
168163d5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
prontserve.py
prontserve.py
+13
-2
requirements.txt
requirements.txt
+1
-1
No files found.
prontserve.py
View file @
4e0d75e2
...
@@ -469,6 +469,7 @@ class Prontserve(pronsole.pronsole, EventEmitter):
...
@@ -469,6 +469,7 @@ class Prontserve(pronsole.pronsole, EventEmitter):
self
.
jobs
.
listeners
.
add
(
self
)
self
.
jobs
.
listeners
.
add
(
self
)
self
.
initializing
=
False
self
.
initializing
=
False
def
start
(
self
):
if
self
.
dry_run
==
False
:
if
self
.
dry_run
==
False
:
self
.
do_connect
(
""
)
self
.
do_connect
(
""
)
if
self
.
p
.
printer
==
None
:
sys
.
exit
(
1
)
if
self
.
p
.
printer
==
None
:
sys
.
exit
(
1
)
...
@@ -892,18 +893,26 @@ if __name__ == "__main__":
...
@@ -892,18 +893,26 @@ if __name__ == "__main__":
help
=
'Enables verbose printer output'
help
=
'Enables verbose printer output'
)
)
parser
.
add_argument
(
'--heaptrace'
,
default
=
False
,
action
=
'store_true'
,
help
=
'Enables a heap trace on exit (for developer use)'
)
args
=
parser
.
parse_args
()
args
=
parser
.
parse_args
()
dry_run
=
args
.
dry_run
dry_run
=
args
.
dry_run
if
args
.
heaptrace
:
from
guppy
import
hpy
def
warn_if_dry_run
():
def
warn_if_dry_run
():
if
dry_run
:
if
dry_run
:
for
i
in
range
(
0
,
7
):
for
i
in
range
(
0
,
7
):
sys
.
stdout
.
write
(
"
\x1B
[0;33m Dry Run
\x1B
[0m"
)
sys
.
stdout
.
write
(
"
\x1B
[0;33m Dry Run
\x1B
[0m"
)
print
""
print
""
try
:
prontserve
=
Prontserve
(
dry_run
=
dry_run
,
loud
=
args
.
loud
)
prontserve
=
Prontserve
(
dry_run
=
dry_run
,
loud
=
args
.
loud
)
try
:
prontserve
.
start
()
application
.
listen
(
8888
)
application
.
listen
(
8888
)
print
"
\n
"
+
"-"
*
80
print
"
\n
"
+
"-"
*
80
welcome
=
textwrap
.
dedent
(
u"""
welcome
=
textwrap
.
dedent
(
u"""
...
@@ -918,4 +927,6 @@ if __name__ == "__main__":
...
@@ -918,4 +927,6 @@ if __name__ == "__main__":
prontserve
.
ioloop
.
start
()
prontserve
.
ioloop
.
start
()
except
:
except
:
if
args
.
heaptrace
:
print
hpy
()
.
heap
()
prontserve
.
p
.
disconnect
()
prontserve
.
p
.
disconnect
()
exit
()
requirements.txt
View file @
4e0d75e2
pybonjour
pybonjour
git+https://github.com/
nephics
/tornado.git
git+https://github.com/
D1plo1d
/tornado.git
git+https://github.com/D1plo1d/py-mdns.git
git+https://github.com/D1plo1d/py-mdns.git
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