> hi
>
> i am developing a GUI application using TKINTER
>
> i want to open a file from the askopenfile(which is a tkFileDialog) using
> OS.SYSTEM.
>
> 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')
os.system(fn)

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

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to