wxPython FileDialog, select folder
SMALLp
pofuk at email.t-com.hr
Thu Dec 20 17:26:09 EST 2007
farsheed wrote:
> import wx
> def dirchoose():
> 'Gives the user selected path. Use: dirchoose()'
> global _selectedDir , _userCancel #you should define
> them before
> userPath = 'c:/'
> app = wx.App()
> dialog = wx.DirDialog(None, "Please choose your project directory:",\
> style=1 ,defaultPath=userPath, pos = (10,10))
> if dialog.ShowModal() == wx.ID_OK:
> _selectedDir = dialog.GetPath()
> return _selectedDir
> else:
> #app.Close()
> dialog.Destroy()
> return _userCancel
>
> Cheers, Farsheed.
Thanks! I've already figured it out from first reply. Now i get selected
directory and i want to get all directories from thin directory. I found
os.listdir but it oly gets names of files and i nedd output with
permisions e.g. -rw-r--r-- 1 pofuk pofuk 105 2007-12-19 21:59 login.py
More information about the Python-list
mailing list