Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

NXOpen - python journal - How to stop?

Status
Not open for further replies.

NX-user

Industrial
Joined
Mar 22, 2018
Messages
1
Location
DE
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)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top