o
    r|aU  ã                   @   sV   d Z dd„ Zeƒ Zdd„ Zdd„ ZG dd„ deƒZG d	d
„ d
eƒZG dd„ deƒZ	dS )z7
Exposes functionality needed throughout the project.

c                   C   s   t td d¡ƒfS )z:
    Return the Python3 string type (no more python2)
    Úazutf-8)ÚstrÚtypeÚencode© r   r   ú1/usr/lib/python3/dist-packages/pystache/common.pyÚ_get_string_types	   s   r   c                 C   s
   t | tƒS )z­
    Return whether the given object is a byte string or unicode string.

    This function is provided for compatibility with both Python 2 and 3
    when using 2to3.

    )Ú
isinstanceÚ_STRING_TYPES)Úobjr   r   r   Ú	is_string   s   
r   c                 C   s(   t | dƒ}z	| ¡ W | ¡  S | ¡  w )z?
    Return the contents of a text file as a byte string.

    Úrb)ÚopenÚreadÚclose)ÚpathÚfr   r   r   r       s   
r   c                   @   s   e Zd ZdZdZdZdS )ÚMissingTagsz4Contains the valid values for Renderer.missing_tags.ÚignoreÚstrictN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r   r   3   s    r   c                   @   ó   e Zd ZdZdS )ÚPystacheErrorz#Base class for Pystache exceptions.N©r   r   r   r   r   r   r   r   r   ;   ó    r   c                   @   r   )ÚTemplateNotFoundErrorz1An exception raised when a template is not found.Nr   r   r   r   r   r   ?   r   r   N)
r   r   r	   r   r   Úobjectr   Ú	Exceptionr   r   r   r   r   r   Ú<module>   s   