清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>
#!/usr/local/bin/python #-*- coding: UTF-8 -*- #选择打开选择文件 神龙 QQ29295842 import tkMessageBox,tkFileDialog import platform import subprocess if __name__ == "__main__": #subprocess.Popen("explorer /select,\"" + "C:\Users\sss" + "\\") # import tkFileDialog # tkFileDialog.askopenfile() # import win32ui # dlg = win32ui.CreateFileDialog(1, "*.txt", None, 0, u"txt 文本 (*.txt)|*.txt|All files|*.*") systype = platform.system() # 判断系统类型 if systype == 'windows': basedir = 'c:\\' else: basedir = '/' filename = tkFileDialog.askopenfilename(initialdir=basedir) tkMessageBox.showwarning(title='选择的文件', message=filename)