Selecting directory's path with tkinter
python, tkinter, user-interface, widget
Solution
Have you tried the initialdir keyword? e.g. `tkFileDialog.askdirectory(initialdir='.')`. What do you get then?
Problem
I'm trying to get the full path of a directory using Tkinter, but only the directory name is being displayed. For example when I select "C:\Python27\Doc", instead of the full path being displayed, only "Doc" displays. ``` class Actions: def openfile(self): #open the file directory = tkFileDialog.askdirectory() print(directory) def body(self): Label (text='Please select a directory').pack(side=TOP,padx=10,pady=10) ``` I found this http://tkinter.unpythonic.net/wiki/tkFileDialog , but unless I'm misunderstanding it, I don't see anything for the full path.