[Twisted-Python] Twisted Plugins that for classes that implement interfaces

Phil Christensen phil at bubblehouse.org
Mon Sep 22 08:32:50 EDT 2008

On Sep 22, 2008, at 4:37 AM, Paul Wilson wrote:
> Hi all,
> I'd like to be able to use the twisted plugin mechanism to extract
> classes that implement given interfaces. I've successfully followed
> the examples to get an iterator over _objects_ that provide my
> interfaces, but can't find a way to get just the classes.
> Does such a facility exist or am I going to need a rethink? Thanks  
> in advance...

Hi Paul,

Try using classProvides() instead of implements() in your class  
definition. That should result in the plugin system returning the  
class itself, instead of the instance.


More information about the Twisted-Python mailing list