Application Packages

Dj Gilcrease digitalxero at
Wed Sep 16 02:29:59 CEST 2009

when looking up namespace-packages I found pkgutil which lets me add a
myapp.user package with the following in its and nothing

import os, os.path

from pkgutil import extend_path
homedir = os.environ.get('HOME') or os.environ.get('USERPROFILE')
__path__ = extend_path([os.path.abspath(homedir + os.sep + 'myapp')], __name__)

now I can do "from myapp.user.plugins import *" and it works

More information about the Python-list mailing list