csaxs_bec.bec_ipython_client.plugins.flomni.flomni_webpage_generator.LocalHttpServer#
- class LocalHttpServer(directory: Path, port: int = 8080)[source]#
Bases:
objectServes the generator’s output directory over plain HTTP in a daemon thread.
Uses Python’s built-in http.server — no extra dependencies. Request logging is suppressed so the BEC console stays clean. The server survives stop()/start() cycles: _launch() creates a fresh instance each time start() is called.
- Usage:
srv = LocalHttpServer(output_dir, port=8080) srv.start() print(srv.url) # http://hostname:8080/status.html srv.stop()
Methods
is_alivestartstopAttributes
portBest-guess URL for printing.
- property url: str#
Best-guess URL for printing. Uses the machine’s hostname.