39 lines
1.1 KiB
Python
39 lines
1.1 KiB
Python
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() |