From: duplo Date: Wed, 15 Apr 2009 17:09:33 +0000 (+0000) Subject: Add My Documents as default folder for windows X-Git-Tag: 2.1.0~169 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=b92079668429c3ac41ae640d5b9ce10eaac14b0e;p=bertos.git Add My Documents as default folder for windows git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2513 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/wizard/BFolderPage.py b/wizard/BFolderPage.py index 4e117445..187557db 100644 --- a/wizard/BFolderPage.py +++ b/wizard/BFolderPage.py @@ -95,6 +95,11 @@ class BFolderPage(BWizardPage): stored_folder = self.defaultFolder() if stored_folder != "": self._destination_folder = stored_folder + elif os.name == "nt": + from win32com.shell import shell, shellcon + self._destination_folder = shell.SHGetFolderPath(0, shellcon.CSIDL_PERSONAL, 0, 0) + del shell + del shellcon else: self._destination_folder = os.path.expanduser("~") self.pageContent.directoryEdit.setText(self._destination_folder)