Folks,
I have just started working with python.
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.
Now I am using wxPython for select multiple directories.
I have created some sample program, code is below.
def onMultiDir(self, event):
"""
Create and show the MultiDirDialog
"""
dlg = MDD.MultiDirDialog(self, title="Choose a directory:",
defaultPath=self.currentDirectory,
agwStyle=0)
if dlg.ShowModal() == wx.ID_OK:
paths = dlg.GetPaths()
print "You chose the following file(s):"
for path in paths:
print path
dlg.Destroy()
I have used above link to create my sample program.
But still I am not able to select multiple directory.
I would appreciate your helping to resolve my problem.
Thank you in advance.
Best regards,
Sujay Kher
I have just started working with python.
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.
Now I am using wxPython for select multiple directories.
I have created some sample program, code is below.
def onMultiDir(self, event):
"""
Create and show the MultiDirDialog
"""
dlg = MDD.MultiDirDialog(self, title="Choose a directory:",
defaultPath=self.currentDirectory,
agwStyle=0)
if dlg.ShowModal() == wx.ID_OK:
paths = dlg.GetPaths()
print "You chose the following file(s):"
for path in paths:
print path
dlg.Destroy()
I have used above link to create my sample program.
But still I am not able to select multiple directory.
I would appreciate your helping to resolve my problem.
Thank you in advance.
Best regards,
Sujay Kher