How to do plugins using eggs

(Just so that I don’t forget, and because some of you may not have seen this before.)

This is the magic Python code which automagically gets eggs with the entry point “my.plugin.namespace” declared.

for egg_plugin in pkg_resources.iter_entry_points('my.plugin.namespace'):
    print egg_plugin.name
Advertisements
Published in: on April 17, 2009 at 2:57 pm  Comments Off on How to do plugins using eggs  
Tags: , ,
%d bloggers like this: