[Tutor] how to open a file using os.system

Tiger12506 keridee at jayco.net
Wed Jan 9 22:03:53 CET 2008

> hi
> i am developing a GUI application using TKINTER
> i want to open a file from the askopenfile(which is a tkFileDialog) using
> i have already created the file open dilog using
> tkFileDialog.askopenfile(parent=root,mode='rb',title='choose a file')
> Now i want to open a file from this dialog using OS.SYSTEM

I am not completely familiar with tkFileDialog but I would bet that it 
returns the file you choose as a string. Try this.

fn = tkFileDialog.askopenfile(parent=root,mode='rb',title='choose a file')

Note: This means open a file as explorer.exe would open a file, such as an 

More information about the Tutor mailing list