How to open files

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
 
O

OPQ

ADE said:
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
 
W

wes weston

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] )
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,176
Messages
2,570,950
Members
47,503
Latest member
supremedee

Latest Threads

Top