OCC.Display.WebGl.simple_server module

A very simple webserver.

get_available_port(port)

sometimes, the python webserver is closed but the port is not made available for a further call. So let’s find any available port to prevent such issue. This function: * takes a port number (an integer), above 1024 * check if it is available * if not, take another one * returns the port numer

start_server(addr='127.0.0.1', port=8080, x3d_path='.', open_webbrowser=False)

starts the server if the PYTHONOCC_SHUNT_WEB_SERVER env var is not set * port: the port number to use (if available) ; * path: where thehtml files are located * open_webbrower: if True, open the web browser to the correct url