python tkinter askopenfile

Solutions on MaxInterview for python tkinter askopenfile by the best coders in the world

showing results for - "python tkinter askopenfile"
Sabri
01 Jan 2018
1file = askopenfile(mode ='r', filetypes =[('Python Files', '*.py'), ('Text Files', '*.txt')]) 
2
3if file is not None: 
4    content = file.read() 
5    print(content)
6file.close()