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. -- http://mail.python.org/mailman/listinfo/python-list