Answers for "open file and read lines tkinter askopenfile"

4

askopenfilename

filename2 =  filedialog.askopenfilename(title = "Select file",filetypes = (("Excel files", ".xlsx .xls"),))
Posted by: Guest on September-13-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