tkinter file selector
Natacha
nbodineau at club-internet.fr
Tue Jan 14 04:44:04 EST 2003
thanks, but we would like to have the directory in the "Entry" when we select a file
example :
_______________________________________ _____________________
C:/WINDOWS/Bureau/question.doc | | PARCOURIR |
______________________________________| |____________________|
Martin Franklin <mfranklin1 at gatwick.westerngeco.slb.com> wrote in message news:<mailman.1042469723.18185.python-list at python.org>...
> On Mon, 2003-01-13 at 14:35, Natacha wrote:
> > Hello,
> >
> > We are using Python in environnement windows and we need help.
> >
> > We want to use tkinter for an interface graphic so for this it s ok
> >
> > The problem is in this programm :
> >
> > you can execute it to see . When you click on 'Parcourir', i would
> > like to have the functions who give the files in the harddisk and
>
>
> <snip>
>
> A simple example of the tkFileDialog :-
>
> from Tkinter import *
> import tkFileDialog
>
> root = Tk()
>
> def select_file():
> file = tkFileDialog.askopenfilename()
> print file
>
> b=Button(root, text="Select", command = select_file)
> b.pack()
>
> root.mainloop()
>
>
> HTH
> Martin
More information about the Python-list
mailing list