- dashboard.py: plugin-based renderer with 4x4 grid layout - admin.py: web UI with layout editor + plugin configs - layout.py: pack algorithm, item placement, grid system - plugins/: clock, weather, system, spotify, strava, gmail, minimax, hello - network_watchdog.py: WiFi AP/client mode management - waveshare_epd_init.py: vendor driver stub
15 lines
338 B
Python
15 lines
338 B
Python
import os, socket
|
|
p = "/tmp/test.sock"
|
|
if os.path.exists(p):
|
|
os.remove(p)
|
|
srv = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
|
|
try:
|
|
srv.bind(p)
|
|
srv.listen(1)
|
|
print("bound, listening")
|
|
print("exists immediately after bind:", os.path.exists(p))
|
|
finally:
|
|
srv.close()
|
|
if os.path.exists(p):
|
|
os.remove(p)
|