[Python-Dev] pkgutil, pkg_resource and Python 3.0 name space packages

Paul Moore p.f.moore at gmail.com
Tue Jan 8 10:47:40 CET 2008


On 08/01/2008, Christian Heimes <lists at cheimes.de> wrote:
> Paul Moore wrote:
> > What would be used on Windows? It's likely to be of marginal use on
> > Windows, but an appropriate equivalent should be defined. Possibly
> > just replace ~ with %USERPROFILE%. I'd argue against anything under
> > %APPDATA% as that directory is hidden.
>
> No, we shouldn't mess with the profile root directory on Windows. The
> data should either be installed under "Application Data" or under "My
> Documents". You are right, the appdata directory is hidden by the
> installer could add a link to Application Data\Python\python2.x\ to the
> start menu.

Not My Documents, please! That's for documents, not configuration.
%USERPROFILE% is actually where most other applications put stuff. The
alternative would be %HOMEDRIVE%%HOMEPATH% which is what
os.path.expanduser uses.

> Apropos My Documents and other special directories on Windows. Python
> doesn't have an API to get the directories from the registry. Is
> somebody interested in having a module for the task? I've some code for
> the job on disk.

It would probably be a good idea to have it in the core, although I'm
sure it's in pywin32, and anyone coding Python on Windows will have
that. Personally, I've no code that would benefit from this, so I'd be
+0 on theoretical grounds only.

Paul.


More information about the Python-Dev mailing list