On Thu, Jan 13, 2011 at 10:24 AM, Cameron Laird <came...@phaseit.net> wrote:
> Hi, > > I'm currently using tkFileDialog.askdirectory() to select a single > directory. I would like to be able to select multiple directories. > > tkFileDialog.askopenfilenames() seems to do this for files. > > What can I do in my situation? Are there alternative classes that > provide file dialogs better suited for my purpose? > > > I want to select multiple folders at a time but tkFileDialog.askdirectory() > doesnt allow "multiple=1".. is there any way to make this work? > >From my quick test, there doesn't appear to be. However, you can do this: dirs = [] title = 'Choose Directory' while True: dir = tkFileDialog.askdirectory(title=title) if not dir: break title = 'got %s. Next dir' % dirs[-1] Probably not the most elegant solution, but hopefully it helps. Wayne
_______________________________________________ Tkinter-discuss mailing list Tkinter-discuss@python.org http://mail.python.org/mailman/listinfo/tkinter-discuss