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
f2e87c6e
Commit
f2e87c6e
authored
May 31, 2012
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Kill CherryPy when Pronterface closes
parent
069ee940
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
pronterface.py
pronterface.py
+2
-0
webinterface.py
webinterface.py
+5
-2
No files found.
pronterface.py
View file @
f2e87c6e
...
@@ -1161,6 +1161,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
...
@@ -1161,6 +1161,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
except
:
except
:
pass
pass
self
.
Destroy
()
self
.
Destroy
()
webinterface
.
KillWebInterfaceThread
()
def
do_monitor
(
self
,
l
=
""
):
def
do_monitor
(
self
,
l
=
""
):
if
l
.
strip
()
==
""
:
if
l
.
strip
()
==
""
:
...
@@ -1686,6 +1687,7 @@ class macroed(wx.Dialog):
...
@@ -1686,6 +1687,7 @@ class macroed(wx.Dialog):
self
.
callback
(
self
.
e
.
GetValue
()
.
split
(
"
\n
"
))
self
.
callback
(
self
.
e
.
GetValue
()
.
split
(
"
\n
"
))
def
close
(
self
,
ev
):
def
close
(
self
,
ev
):
self
.
Destroy
()
self
.
Destroy
()
webinterface
.
KillWebInterfaceThread
()
def
unindent
(
self
,
text
):
def
unindent
(
self
,
text
):
self
.
indent_chars
=
text
[:
len
(
text
)
-
len
(
text
.
lstrip
())]
self
.
indent_chars
=
text
[:
len
(
text
)
-
len
(
text
.
lstrip
())]
if
len
(
self
.
indent_chars
)
==
0
:
if
len
(
self
.
indent_chars
)
==
0
:
...
...
webinterface.py
View file @
f2e87c6e
#!/usr/bin/python
#!/usr/bin/python
import
cherrypy
,
pronterface
,
re
,
ConfigParser
,
io
import
cherrypy
,
pronterface
,
re
,
ConfigParser
,
threading
import
os.path
import
os.path
users
=
{}
users
=
{}
...
@@ -214,6 +214,9 @@ class WebInterfaceStub(object):
...
@@ -214,6 +214,9 @@ class WebInterfaceStub(object):
return
"<b>Web Interface Must be launched by running Pronterface!</b>"
return
"<b>Web Interface Must be launched by running Pronterface!</b>"
index
.
exposed
=
True
index
.
exposed
=
True
def
KillWebInterfaceThread
():
cherrypy
.
engine
.
exit
()
def
StartWebInterfaceThread
(
webInterface
):
def
StartWebInterfaceThread
(
webInterface
):
current_dir
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
current_dir
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
cherrypy
.
config
.
update
({
'engine.autoreload_on'
:
False
})
cherrypy
.
config
.
update
({
'engine.autoreload_on'
:
False
})
...
@@ -223,7 +226,7 @@ def StartWebInterfaceThread(webInterface):
...
@@ -223,7 +226,7 @@ def StartWebInterfaceThread(webInterface):
}}
}}
cherrypy
.
config
.
update
(
"http.config"
)
cherrypy
.
config
.
update
(
"http.config"
)
cherrypy
.
quickstart
(
webInterface
,
'/'
,
config
=
conf
)
cherrypy
.
quickstart
(
webInterface
,
'/'
,
config
=
conf
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
cherrypy
.
config
.
update
(
"http.config"
)
cherrypy
.
config
.
update
(
"http.config"
)
cherrypy
.
quickstart
(
WebInterfaceStub
())
cherrypy
.
quickstart
(
WebInterfaceStub
())
\ No newline at end of file
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