?
=?iso-8859-9?Q?Tongu=E7?= Yumruk
Hi,
I'm writing a plugin based application with python 2.1 but I really have
some trouble with creating a package. My directory structure is:
Skib/Server/Python/:
skib
skibserver
Skib/Server/Python/skib:
__init__.py
PluginManager.py
plugins
Skib/Server/Python/skib/plugins:
default
__init__.py
Skib/Server/Python/skib/plugins/default:
default.py
__init__.py
in all the __init__.py files I have the __all__=["blah","blah"]
statement. When I try it as:
from skib import PluginManager
PluginManager.init_plugins()
It works. But when I try it like that:
import skib
skib.PluginManager.init_plugins()
It raises AttributeError and complains that there is nothing called
PluginManager. Subpackages also behave like that. The __init__.py files
only contain the __all__ directive. No actual code are in them. Am I
missing a point?
Thanks.
--
Love, Respect, Linux
############################################################################
Whom computers would destroy, they must first drive mad.
############################################################################
Tonguç Yumruk
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
iD8DBQE/WuAo1xWu4MLSyoYRAlh+AKCJSV5XTM9ek+E6CjIN1kJmRDDUXwCg3wGn
//5/Q80TfREQk9pjrRXBJes=
=iL4M
-----END PGP SIGNATURE-----
I'm writing a plugin based application with python 2.1 but I really have
some trouble with creating a package. My directory structure is:
Skib/Server/Python/:
skib
skibserver
Skib/Server/Python/skib:
__init__.py
PluginManager.py
plugins
Skib/Server/Python/skib/plugins:
default
__init__.py
Skib/Server/Python/skib/plugins/default:
default.py
__init__.py
in all the __init__.py files I have the __all__=["blah","blah"]
statement. When I try it as:
from skib import PluginManager
PluginManager.init_plugins()
It works. But when I try it like that:
import skib
skib.PluginManager.init_plugins()
It raises AttributeError and complains that there is nothing called
PluginManager. Subpackages also behave like that. The __init__.py files
only contain the __all__ directive. No actual code are in them. Am I
missing a point?
Thanks.
--
Love, Respect, Linux
############################################################################
Whom computers would destroy, they must first drive mad.
############################################################################
Tonguç Yumruk
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
iD8DBQE/WuAo1xWu4MLSyoYRAlh+AKCJSV5XTM9ek+E6CjIN1kJmRDDUXwCg3wGn
//5/Q80TfREQk9pjrRXBJes=
=iL4M
-----END PGP SIGNATURE-----