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
(port=8080, 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) ; * open_webbrower : if True, open the web browser to the correct url