Plugins in Python

Delaney, Timothy tdelaney at avaya.com
Tue Jun 12 20:53:01 EDT 2001


> Hi;
> 
> How would one generally code something that would look at 
> some dir (or 
> list of dirs), and dynamically load .py or .pyc modules found 
> there that 
> where not previously known to the program. Obviously 
> following a standard 
> API...
> 
> TIA
> 
> Dave LeBlanc

Simplest method:

import sys
sys.path.append(additionaldirectory)

Tim Delaney




More information about the Python-list mailing list