opt
/
hc_python
/
lib
/
python3.12
/
site-packages
/
mako
/
ext
/
__pycache__
/
Go to Home Directory
+
Upload
Create File
root@0UT1S:~$
Execute
By Order of Mr.0UT1S
[DIR] ..
N/A
__init__.cpython-312.pyc
161 bytes
Rename
Delete
autohandler.cpython-312.pyc
2.27 KB
Rename
Delete
babelplugin.cpython-312.pyc
2.58 KB
Rename
Delete
beaker_cache.cpython-312.pyc
3.80 KB
Rename
Delete
extract.cpython-312.pyc
4.99 KB
Rename
Delete
linguaplugin.cpython-312.pyc
2.53 KB
Rename
Delete
preprocessors.cpython-312.pyc
656 bytes
Rename
Delete
pygmentplugin.cpython-312.pyc
5.75 KB
Rename
Delete
turbogears.cpython-312.pyc
2.37 KB
Rename
Delete
� )��g] � �. � d Z ddlZddlZddlZdd�Zd� Zy)a� adds 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')}"/> � Nc �h � |j }| j j }|j s |j t ||f S t j dt j |� � |gz }t |� rwddj |� z }||k7 r=t ||� r1|j s#|j j t ||f|� S |S t |� dk( rn|g|dd t |� r�w|j s#|j j t ||fd � S y # t $ r Y ��w xY w)Nz([^/]+)�/� ���)�lookup�module� _template_uri�filesystem_checks� _uri_cache�autohandler�KeyError�re�findall� posixpath�dirname�len�join�_file_exists� setdefault)�template�context�namer r �tokens�paths �C/opt/hc_python/lib/python3.12/site-packages/mako/ext/autohandler.pyr r ! s2 � � �^�^�F��O�O�1�1�M��#�#� ��$�$�k�=�$�%G�H�H� �Z�Z� �I�$5�$5�m�$D� E��� N�F� �f�+��S�X�X�f�%�%���=� �\�&�$�%?��+�+��(�(�3�3� �-��6��� � ���v�;�!����f��r�s�� �f�+� �#�#�� � �+�+� �-��.�� � � ��- � �� �s �D% �% D1�0D1c � � t j dd|� }| j D ]) }t j j |dz |z � s�) y y)Nz^/� r TF)r �sub�directories�osr �exists)r r �psub�ds r r r @ sD � � �6�6�%��T�"�D� � � �� �7�7�>�>�!�c�'�D�.�)�� � � )r )�__doc__r r r r r � r$ r �<module>r'