| Server IP : 93.86.61.54 / Your IP : 216.73.216.156 Web Server : Apache/2.4.62 (Ubuntu) System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64 User : www-data ( 33) PHP Version : 8.4.22 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/lib/python3/dist-packages/pystache/__pycache__/ |
Upload File : |
o
r|a! � @ sH d Z ddlZddlZddlZddlmZ ddlmZ G dd� de�Z dS )zC
This module provides a Locator class for finding template files.
� N)�TemplateNotFoundError)�defaultsc @ sZ e Zd Zddd�Zdd� Zdd� Zddd �Zd
d� Zdd
� Zdd� Z dd� Z
ddd�ZdS )�LocatorNc C s |du rt j}|| _dS )a
Construct a template locator.
Arguments:
extension: the template file extension, without the leading dot.
Pass False for no extension (e.g. to use extensionless template
files). Defaults to the package default.
N)r �TEMPLATE_EXTENSION�template_extension)�self� extension� r �2/usr/lib/python3/dist-packages/pystache/locator.py�__init__ s
zLocator.__init__c C s: t |d�sdS tj|j }t |d�sdS |j}tj�|�S )a#
Return the directory containing an object's defining class.
Returns None if there is no such directory, for example if the
class was defined in an interactive Python session, or in a
doctest that appears in a text file (rather than a Python file).
�
__module__N�__file__)�hasattr�sys�modulesr r
�os�path�dirname)r �obj�moduler r r r
�get_object_directory! s
zLocator.get_object_directoryc C s&