j:ԣ:0dZddlZddlZddlZddZdZdS)aadds autohandler functionality to Mako templates. requires that the TemplateLookup class is used with templates. usage:: <%! from mako.ext.autohandler import autohandler %> <%inherit file="${autohandler(template, context)}"/> or with custom autohandler filename:: <%! from mako.ext.autohandler import autohandler %> <%inherit file="${autohandler(template, context, name='somefilename')}"/> N autohandlercX|j}|jj}|js& |jt ||fS#t $rYnwxYwtjdtj ||gz}t|rdd |z}||kr>ctjdd|}|jD]*}tj|dz|zrdS+dS)Nz^/rTF)rsub directoriesosrexists)rrpsubds rrr@sX 6%T " "D   7>>!c'D. ) ) 44 u)r)__doc__r rrrrr$rr's\*  >r$