Tkinter file dialog

Chris Rebert clp2 at
Fri May 29 05:44:38 CEST 2009

On Thu, May 28, 2009 at 7:48 PM, Ronn Ross <ronn.ross at> wrote:
> I'm using Tkinter file selector to get a direcotry path. I'm using:
> self.file = tkFileDialog.askdirectory(title="Please select your directory")
>         print file
> but all it prints out is:
> <type 'file'>
> How would I print the directory path?

print self.file

Your forgot the "self." in your version. Without it, Python assumes
you're talking about built-in `file` type.


More information about the Python-list mailing list