[Tkinter-discuss] select multiple folders/ directories

Sujay sujay.kher at gmail.com
Thu Jan 13 18:05:30 CET 2011


Thank you Wayne,

I really appreciate your swift response.

I have solve this problem by using wxpython. 

Now I am stuck in another problem. I can not select directory from network.
Dialogue only shows directory of my local system.

In short, i cant access NETWORK in this multidirdialog.. its just based on
local file system access.

do u have any idea how i can tweek this?? work around?

Best regards,

Sujay Kher

Wayne Werner wrote:
> 
> On Thu, Jan 13, 2011 at 10:24 AM, Cameron Laird <Cameron at 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 at python.org
> http://mail.python.org/mailman/listinfo/tkinter-discuss
> 
> 

-- 
View this message in context: http://old.nabble.com/select-multiple-folders--directories-tp30663726p30664142.html
Sent from the Python - tkinter-discuss mailing list archive at Nabble.com.



More information about the Tkinter-discuss mailing list