NXOpen - python journal - How to stop?
NXOpen - python journal - How to stop?
(OP)
I try to run web-server (bottle web-framework) from journal. It works fine. But how can be stopped programmatically the bottle web server and how can be unload the journal?
CODE --> python
#nx: threaded
import NXOpen
from bottle import route, run
theSession = NXOpen.Session.GetSession()
theUI = NXOpen.UI.GetUI()
lw=theSession.ListingWindow
lw.Open()
lw.WriteLine('start')
@route('/hello')
def hello():
lw.WriteLine('Hello!')
return "Hello World!"
run(host='localhost', port=8080, debug=True) 



