(engine: FastgrindQueryEngine, path: Path, open_browser: bool = True, fallback_port: int = 0)
| 2870 | |
| 2871 | |
| 2872 | def ui_command(engine: FastgrindQueryEngine, path: Path, open_browser: bool = True, fallback_port: int = 0) -> None: |
| 2873 | reason = desktop_ui_unavailable_reason() |
| 2874 | if reason: |
| 2875 | print(f"Python UI unavailable ({reason}). Falling back to html mode.") |
| 2876 | html_command(engine, port=fallback_port, open_browser=open_browser) |
| 2877 | return |
| 2878 | |
| 2879 | try: |
| 2880 | FastgrindDesktopUI(engine, path).run() |
| 2881 | except Exception as exc: |
| 2882 | print(f"Python UI unavailable ({exc}). Falling back to html mode.") |
| 2883 | html_command(engine, port=fallback_port, open_browser=open_browser) |
| 2884 | |
| 2885 | |
| 2886 | def export_json_command(engine: FastgrindQueryEngine, input_path: Path, output: str | None) -> None: |
no test coverage detected