File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -265,31 +265,6 @@ def start_websocket_server():
265265__t .start ()
266266
267267
268- def ensure_websocket_server ():
269- global __SOCKET_PORT , GW
270- if not websocketserving :
271- __SOCKET_PORT = find_free_port ()
272- # Put the websocket server in a separate thread running its own event loop.
273- # That works even if some other program (e.g. spyder) already running an
274- # async event loop.
275- __t = threading .Thread (target = start_websocket_server )
276- __t .start ()
277- # Update the html with which we respond to include the new socket port
278- glowcomm_with_socket_port (__SOCKET_PORT )
279- print (__SOCKET_PORT )
280- scene = canvas ()
281- # This hits our new websocket server which should start it running
282- GW = GlowWidget ()
283-
284- # If we arrived in this function then the browser tab has been closed so
285- # reopen it.
286- _webbrowser .open ('http://localhost:{}' .format (__HTTP_PORT ))
287-
288- while not websocketserving :
289- rate (60 )
290-
291-
292-
293268def stop_server ():
294269 """Shuts down all threads and exits cleanly."""
295270 global __server
Original file line number Diff line number Diff line change @@ -223,11 +223,6 @@ def __init__(self, **kwargs):
223223 else :
224224 from .no_notebook import _
225225 baseObj ._view_constructed = True
226- elif baseObj ._view_constructed and not _isnotebook and not baseObj ._canvas_constructing :
227- from .no_notebook import still_serving , ensure_websocket_server
228- if not still_serving ():
229- print ("Dang navvit me no has server!!!" )
230- ensure_websocket_server ()
231226
232227 self .idx = baseObj .objCnt ## an integer
233228 self .object_registry [self .idx ] = self
You can’t perform that action at this time.
0 commit comments