Sh3ll
OdayForums


Server : LiteSpeed
System : Linux premium84.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
User : claqxcrl ( 523)
PHP Version : 8.1.32
Disable Function : NONE
Directory :  /opt/hc_python/lib64/python3.12/site-packages/mako/ext/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //opt/hc_python/lib64/python3.12/site-packages/mako/ext/__pycache__/autohandler.cpython-312.pyc
�

���g]��.�dZddlZddlZddlZdd�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}|jj}|js	|jt
||fStjdtj|��|gz}t|�rwddj|�z}||k7r=t||�r1|js#|jjt
||f|�S|St|�dk(rn|g|ddt|�r�w|js#|jjt
||fd�Sy#t$rY��wxYw)Nz([^/]+)�/����)�lookup�module�
_template_uri�filesystem_checks�
_uri_cache�autohandler�KeyError�re�findall�	posixpath�dirname�len�join�_file_exists�
setdefault)�template�context�namerr	�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��tjdd|�}|jD])}tjj|dz|z�s�)yy)Nz^/�rTF)r�sub�directories�osr�exists)rr�psub�ds    rrr@sD��
�6�6�%��T�"�D�
�
�
��
�7�7�>�>�!�c�'�D�.�)�� ��)r)�__doc__r rrrr�r$r�<module>r's���*
��	��>r$

ZeroDay Forums Mini