qcc_kplugin.server

Command server on localhost:8083 so notebooks / qcc can ask the GUI for things klive cannot do.

One JSON object per line, one JSON reply per request (same framing as klive on 8082):

  • {"cmd": "screenshot", "path": "...png", "width": 1600, "height": 1200, "box": [x0, y0, x1, y1]?, "layout": "...oas"?} — save the current view (or box, µm) as PNG with the GUI’s own layer colours; with layout that file is first opened (or reloaded if already open); lyp (layer properties file) and hide (layer-name fragments) restyle the view first → {"ok": true, "path": ...}

  • {"cmd": "status"} → {"ok": true, "design": ..., "layout": ..., "watching": bool, "klayout": version}

  • {"cmd": "open", "design": "path/design.json"} → open the design in the session (build + load)

Attributes

Classes

Functions

handle(req) → dict

start_server()

Module Contents

class qcc_kplugin.server.CommandServer(parent=None)

Bases: pya.QTcpServer

qcc_kplugin.server.handle(req: dict) → dict
qcc_kplugin.server.start_server()
qcc_kplugin.server.PORT = 8083
qcc_kplugin.server.SERVER = []