Python弹窗选择文件 咸蛋超学锁 收录于 python 2022-10-28 22:38:58 约 74 字 预计阅读 1 分钟 次阅读量 目录 首先需要引入2个包: 1 2 import tkinter as tk from tkinter import filedialog 然后然后实例化 tkinter 1 2 root = tk.Tk() root.withdraw() 获取选取的文件 1 2 f_path = filedialog**.askopenfilename() print('\n获取的文件地址:', f_path)** Please enable JavaScript to view the comments powered by Disqus.