Answers for "tkinter askopenfilename"

4

askopenfilename

filename2 =  filedialog.askopenfilename(title = "Select file",filetypes = (("Excel files", ".xlsx .xls"),))
Posted by: Guest on September-13-2020
1

tkfiledialog python 3 example

from  tkinter import *
root = Tk()
root.filename =  filedialog.askopenfilename(initialdir = "E:/Images",title = "choose your file",filetypes = (("jpeg files","*.jpg"),("all files","*.*")))
print (root.filename)
root.withdraw()
Posted by: Guest on December-10-2020
0

python tkinter askopenfile

file = askopenfile(mode ='r', filetypes =[('Python Files', '*.py'), ('Text Files', '*.txt')]) 

if file is not None: 
    content = file.read() 
    print(content)
file.close()
Posted by: Guest on June-28-2020

Python Answers by Framework

Browse Popular Code Answers by Language