Hi Loai,
You code look correct by comparing it with my C:\Program Files (x86)\wxPython2.8 Docs and Demos\demo\DirDialog.py(you may also have), can you attach the complete code? Or Simply your code and attach it.
Thanks,
Reed
···
On Thu, Dec 20, 2012 at 5:20 AM, Loai Ghoraba loai1991@gmail.com wrote:
Hi
I’m starting to learn wxPython to create GUI apps, and I am facing some problem: When using wx.DirDialog to pick some folder, no matter what the folder I chose, dlg.GetPath() always return the same folder, which is in my case: /home/loai
my binding function is as follows, it is straight forward :
def onButton(self,e):
dlg = wx.DirDialog(self, "Choose a directory:")
if dlg.ShowModal() == wx.ID_OK:
print "You chose %s" % dlg.GetPath()
dlg.Destroy()
this always prints :You chose /home/loai
thanks
P.S: I posted this question to stackoverflow, but no clue 
–
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en
DirDialog.py from wxPython2.8 Docs and Demos
DirDialog.py (1.66 KB)
···
On Thu, Dec 20, 2012 at 1:52 PM, Reed Xia huaqin2005@gmail.com wrote:
Hi Loai,
You code look correct by comparing it with my C:\Program Files (x86)\wxPython2.8 Docs and Demos\demo\DirDialog.py(you may also have), can you attach the complete code? Or Simply your code and attach it.
Thanks,
Reed
On Thu, Dec 20, 2012 at 5:20 AM, Loai Ghoraba loai1991@gmail.com wrote:
Hi
I’m starting to learn wxPython to create GUI apps, and I am facing some problem: When using wx.DirDialog to pick some folder, no matter what the folder I chose, dlg.GetPath() always return the same folder, which is in my case: /home/loai
my binding function is as follows, it is straight forward :
def onButton(self,e):
dlg = wx.DirDialog(self, "Choose a directory:")
if dlg.ShowModal() == wx.ID_OK:
print "You chose %s" % dlg.GetPath()
dlg.Destroy()
this always prints :You chose /home/loai
thanks
P.S: I posted this question to stackoverflow, but no clue 
–
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en