[Twisted-Python] Twisted Plugins that for classes that implement interfaces
paulalexwilson at gmail.com
Mon Sep 22 06:45:31 MDT 2008
2008/9/22 Phil Christensen <phil at bubblehouse.org>:
> 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
> 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.
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
Brilliant. Thank's fixed it!
More information about the Twisted-Python