ó {r Qc@shdZddlZddlZddlZdefd„ƒYZdd„Zd„Z e a d„Z dS(s Implements plugin related api. To define a new plugin just subclass Plugin, like this. class AuthPlugin(Plugin): pass Then start creating subclasses of your new plugin. class MyFancyAuth(AuthPlugin): capability = ['sign', 'vmac'] The actual interface is duck typed. iÿÿÿÿNtPlugincBs#eZdZgZed„ƒZRS(sBase class for all plugins.cCs(x!|D]}||jkrtSqWtS(sMReturns true if the requested capability is supported by this plugin (t capabilitytFalsetTrue(tclstrequested_capabilitytc((s./tmp/tmp.yUYbTOKr8o/gsutil/boto/boto/plugin.pyt is_capable0s (t__name__t __module__t__doc__Rt classmethodR(((s./tmp/tmp.yUYbTOKr8o/gsutil/boto/boto/plugin.pyR+scCsO|sg}ng}x3|jƒD]%}|j|ƒr"|j|ƒq"q"W|S(N(t__subclasses__Rtappend(RRtresultthandler((s./tmp/tmp.yUYbTOKr8o/gsutil/boto/boto/plugin.pyt get_plugin9s cCsƒtjj|ƒ\}}tjj|ƒ\}}tj||gƒ\}}}ztj||||ƒSWd|r~|jƒnXdS(N(tostpathtsplittsplitexttimpt find_modulet load_moduletclose(tfilenameRtnametexttfiletdata((s./tmp/tmp.yUYbTOKr8o/gsutil/boto/boto/plugin.pyt_import_moduleBscCsotr dSta|jddƒs&dS|jddƒ}x0tjtjj|dƒƒD]}t|ƒqWWdS(NRtplugin_directorys*.py( t_plugin_loadedRt has_optiontgettglobRRtjoinR(tconfigt directoryR((s./tmp/tmp.yUYbTOKr8o/gsutil/boto/boto/plugin.pyt load_pluginsOs%( R R#Rtos.pathRtobjectRtNoneRRRR R'(((s./tmp/tmp.yUYbTOKr8o/gsutil/boto/boto/plugin.pyt&s