Z230
This commit is contained in:
@@ -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}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user