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

Christian Heimes lists at cheimes.de
Tue Jan 8 03:29:49 CET 2008


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.

I also don't like the idea to replace ~ with another string. Every OS is
probably using a different path (~/.python/ on Linux, ~/Library/Python
on Mac and APPDATA\Python on Windows). The distutils package should gain
two methods: global_sitedir() and local_sitedir([username]).

> Also, should bdist_wininst/bdist_msi installers be updated to offer
> the option of installing to this directory? What about python setup.py
> install (add a --user flag, for example)?

Sounds good to me.

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.

Christian



More information about the Python-Dev mailing list