Files
kadastr14/main.py
2025-08-03 22:50:32 +05:00

39 lines
1.1 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import tkinter as tk
from tkinter import filedialog
import os
def Pars():
pass
root = tk.Tk()
root.title("Parser12")
font = ("Arial", 12)
root.configure(bg="#B85C38")
options = [""]
#путь для сохранения файлов
def open_directory(event, entry):
directory_path = filedialog.askdirectory()
entry.delete(0, tk.END)
entry.insert(0, directory_path)
# первое поле с списком
xml_label = tk.Label(root, text="директория xml", font=font)
xml_label.pack(anchor="w")
xml_entry = tk.Entry(root, font=font, width=70)
xml_entry.pack(anchor="w")
xml_entry.bind("<Button-1>", lambda event: open_directory(event, xml_entry))
directory_label = tk.Label(root, text="Выберите директорию для сохранения:", font=font)
directory_label.pack(anchor="w")
directory_entry = tk.Entry(root, font=font, width=70)
directory_entry.pack(anchor="w")
directory_entry.bind("<Button-1>", lambda event: open_directory(event, directory_entry))
# кнопка
empty_button = tk.Button(root, text="->", command=Pars, font=font)
empty_button.pack(side="right", padx=10, pady=10)
root.mainloop()