ó
¶:Lc           @   s   d  Z  d d l Z d   Z d S(   s+   
Convenience methods for managing plugins.
i’’’’Nc         C   sF   x? t  j |   D]. } | j   } | |   } | d k	 r | Sq Wd S(   s  
    Runs plugins named ``name`` for this function.  Returns ``None`` if
    all plugins return ``None``, otherwise returns the result of the
    first plugin to result that is not ``None``. Assumes that plugins
    are simple functions that take the arguments ``args``.
    N(   t   pkg_resourcest   iter_entry_pointst   loadt   None(   t   namet   argst   entryt   funct   r(    (    s;   /afs/athena.mit.edu/contrib/scripts/wizard/wizard/plugin.pyt   hook   s    (   t   __doc__R    R	   (    (    (    s;   /afs/athena.mit.edu/contrib/scripts/wizard/wizard/plugin.pyt   <module>   s   