NX-user
Industrial
- Mar 22, 2018
- 1
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?
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)