Сообщество IT-специалистов
Ответы на любые вопросы об IT
Профессиональное развитие в IT
Удаленная работа для IT-специалистов
from tkinter import filedialog as fd print(fd.askopenfile())
from tkinter import filedialog as fd fd.askopenfile()
from tkinter import filedialog as fd from pathlib import Path selected_file = Path(fd.askopenfile().name) print(type(selected_file), selected_file)
from tkinter import filedialog as fd from tkinter import Tk from pathlib import Path root = Tk() root.withdraw() selected_file = Path(fd.askopenfile().name) print(type(selected_file), selected_file)