Selecting a file in a directory
steve at REMOVE-THIS-cybersource.com.au
Sun Feb 14 02:45:03 CET 2010
On Sat, 13 Feb 2010 17:21:51 -0800, vsoler wrote:
> My python script needs to work with a .txt file in a directory. I would
> like to give the user the possibility to choose the file he needs to
> work on in as much the same way as I open a .xls file in Excel, that is,
> I want to make appear the "Windows'" window and let the user choose.
> I think this should be quite straightforward.
Python is multi-platform. Having the Windows file selection dialogs
appear under Linux or Mac is anything but straightforward! The only
general purpose (non-operating system specific) solution will require a
> How should I proceed?
>>> import tkFileDialog
or google on "python display file dialog".
More information about the Python-list