This commit is contained in:
2026-04-28 16:01:53 +02:00
parent f31b271e93
commit 2b0d249eae
3 changed files with 55 additions and 22 deletions
+12
View File
@@ -6,10 +6,21 @@ JSON vstup: { "nazev": "...", "info_lines": [...] }
JSON výstup: { "value": "..." } nebo { "value": null }
"""
import json
import os
import sys
from pathlib import Path
import tkinter as tk
if sys.platform == "win32":
try:
from ctypes import windll
windll.shcore.SetProcessDpiAwareness(1)
except Exception:
pass
import io
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8", errors="replace")
sys.stderr = io.TextIOWrapper(sys.stderr.buffer, encoding="utf-8", errors="replace")
def main():
if len(sys.argv) < 2:
@@ -27,6 +38,7 @@ def main():
root.resizable(True, False)
root.attributes("-topmost", True)
root.tk.call("encoding", "system", "utf-8")
os.environ.setdefault("TCL_ENCODING", "utf-8")
pad = {"padx": 12, "pady": 6}