xml
This commit is contained in:
39
main.py
Normal file
39
main.py
Normal file
@@ -0,0 +1,39 @@
|
||||
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()
|
||||
Reference in New Issue
Block a user