'Browse' button for *.txt file?

Peter Hansen peter at engcorp.com
Thu Mar 10 18:08:18 EST 2005


Fred wrote:
> I am searching for a module, that would allow me to call files by
> using a 'browse' button. Is there any uniform module for browsing
> files, or is there a special module for *.txt files?

I think you'll want to take some time to put your
requirements into different words.  Much of what
you say above doesn't really make sense, and we'd
mostly be guessing if we tried to answer.

"call files"?  What does that mean?  One calls
subroutines, but not files.  You can view them,
or execute them, or open them and read data from
them... not call them.

"browse button"?  What does that mean?  Are you
concerned about the button part of that, or are
you really just asking for a way to "browse"
something?  What does "browse" mean to you?
Usually it means something like displaying a file
selection dialog that lets the user navigate
up and down through the directory tree and
select files, and the contents of the files are
displayed when the user selects one.  Is that
what you wanted?

Finally, are you trying to do this from within
a Python program?  If not, there are certainly
lots of things that will do the job without
Python... the Explorer in Windows, for example.

Which leads to another point: what platform are
you on?  This "browse" thing is almost certain
to mean you are trying to write a GUI program,
and for that you need to know what platform(s)
you want it to run on, and you need to pick
one of the available frameworks.  Choices include
wxPython, Tkinter, some GTK thing, etc...

-Peter



More information about the Python-list mailing list