#coding:utf-8
from tkinter import *
from tkinter import filedialog
root = Tk()
root.filename = filedialog.askopenfilename(initialdir = "d:/",title = "选择文件",filetypes = (("jpeg files","*.jpg"),("all files","*.*")))
print (root.filename)
#coding:utf-8
from tkinter import *
from tkinter import filedialog
root = Tk()
root.filename = filedialog.askopenfilename(initialdir = "d:/",title = "选择文件",filetypes = (("jpeg files","*.jpg"),("all files","*.*")))
print (root.filename)