update
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
Rollback: Dateien aus diesem Ordner zurueck nach AzA march 2026 kopieren.
|
||||
|
||||
Windows (cmd):
|
||||
copy /Y basis14.py ..\basis14.py
|
||||
copy /Y aza_empfang_webview.py ..\aza_empfang_webview.py
|
||||
|
||||
Nur basis14.py und aza_empfang_webview.py waren fuer diesen Patch vorgesehen.
|
||||
@@ -0,0 +1,47 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
AzA Empfang Web-Huelle: eigener Desktop-Prozess (pywebview).
|
||||
|
||||
Wird vom Desktop per subprocess gestartet, damit keine GUI-Kollision mit Tkinter entsteht.
|
||||
Argument: erste Start-URL (z.B. GET /empfang/shell/launch?token=...).
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
|
||||
|
||||
def main(argv: list[str] | None = None) -> int:
|
||||
argv = argv if argv is not None else sys.argv[1:]
|
||||
if not argv or not argv[0].strip():
|
||||
print(
|
||||
"Usage:\n"
|
||||
' python aza_empfang_webview.py "https://host/empfang/shell/launch?token=..."',
|
||||
file=sys.stderr,
|
||||
)
|
||||
return 2
|
||||
url = argv[0].strip()
|
||||
w = int(argv[1]) if len(argv) > 1 and str(argv[1]).isdigit() else 1180
|
||||
h = int(argv[2]) if len(argv) > 2 and str(argv[2]).isdigit() else 820
|
||||
|
||||
try:
|
||||
import webview # noqa: WPS433 (runtime dependency)
|
||||
except ImportError:
|
||||
print(
|
||||
"pywebview fehlt. Bitte installieren:\n"
|
||||
" pip install pywebview>=5",
|
||||
file=sys.stderr,
|
||||
)
|
||||
return 11
|
||||
|
||||
try:
|
||||
webview.create_window("AzA-Empfang", url, width=w, height=h)
|
||||
webview.start()
|
||||
return 0
|
||||
except Exception as exc:
|
||||
print(str(exc), file=sys.stderr)
|
||||
return 12
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user