By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,995 Members | 1,217 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,995 IT Pros & Developers. It's quick & easy.

How to open files

P: n/a
ADE
Hi I have a Tkinter GUI with a listbox that displays a list of files I would
like to be able to open those files when I double click on them in there
default program that opens the files usually

Thanks in advance Cheers
Andrew


Jul 18 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
http://www.python.org/doc/current/tut/tut.html

ADE wrote:
Hi I have a Tkinter GUI with a listbox that displays a list of files I would
like to be able to open those files when I double click on them in there
default program that opens the files usually

Thanks in advance Cheers
Andrew


Jul 18 '05 #2

P: n/a
OPQ
"ADE" <na> wrote in message news:<10*************@corp.supernews.com>...
Hi I have a Tkinter GUI with a listbox that displays a list of files I would
like to be able to open those files when I double click on them in there
default program that opens the files usually

Thanks in advance Cheers
Andrew

you may want to have a look at
os.startfile
---OPQ
Jul 18 '05 #3

P: n/a
ADE,

bind clicks:

self.FileListBox.bind( "<Double-Button-1>",self.OpenSelectedDoubleClick

get the line:

select_list = self.FileListBox.curselection()
if len( select_list ):
path = self.FileListBox.get( select_list[0] )

ADE wrote:
Hi I have a Tkinter GUI with a listbox that displays a list of files I would
like to be able to open those files when I double click on them in there
default program that opens the files usually

Thanks in advance Cheers
Andrew


Jul 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.