Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
Index your code
hub
/
github.com/pyscript/pyscript
/ on_close
Function
on_close
core/tests/python/tests/test_websocket.py:45–48 ·
view source on GitHub ↗
(event)
Source
from the content-addressed store, hash-verified
43
ws.close()
44
45
def
on_close(event):
46
nonlocal closed_flag
47
closed_flag = True
48
ready_to_test.set()
# Finished!
49
50
ws = WebSocket(url=
"wss://echo.websocket.org"
)
51
ws.onopen = on_open
Callers
nothing calls this directly
Calls
2
set
Method · 0.45
append
Method · 0.45
Tested by
no test coverage detected