> >
> >I'm changing my
> >strategy to simply let them choose from a list of directories under
> >Documents and Settings instead.
>
> That's not entirely reliable.  One of my partners, a man who HATES
> spaces in file names, used the "tweakui" utility to rename all of the
> special directories, so he doesn't even HAVE a "Documents and Settings"
> folder.  His "application data" directory is something like "c:\apps\data".
>

Cool, I might just do that myself.  My "My Documents" directory is
C:\jimc and I really like it like that.

As long as his ALLUSERSPROFILE is right, then my code should work:

        allUsersAppData = os.environ["ALLUSERSPROFILE"]
        # dns = Documents and Settigns usually
        dns = os.path.join(allUsersAppData, "..")
        (root, subdirs, files) = os.walk(dns).next()

        dlg = wx.lib.dialogs.MultipleChoiceDialog(self,
          "Choose the user's profile directory"
          "Migrate settings for a user", subdirs, (200,200))

Whadayathink?
-Jim
_______________________________________________
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to