Best practices for dynamically loading plugins at startup

Jarek Zgoda jzgoda at o2.usun.pl
Sun Sep 25 23:27:09 CEST 2005


Christoph Haas napisał(a):

> Since I don't know which plugins have been put into that directory
> I cannot just "import Plugin1, Plugin2, Plugin3" in the "__init__.py".
> So I need to find out the *.py there and load them during startup.
> I could do that with a "walk" over that directory.

See entry for __import__ at
http://www.python.org/doc/2.3/lib/built-in-funcs.html

-- 
Jarek Zgoda
http://jpa.berlios.de/



More information about the Python-list mailing list