
    NgN                     N    d dl Z d dlmZ d dlmZ d dlmZ  G d de          ZdS )    N)Path)Union)
TextLoaderc                   8     e Zd ZdZdeeef         f fdZ xZS )PythonLoaderzFLoad `Python` files, respecting any non-default encoding if specified.	file_pathc                     t          |d          5 }t          j        |j                  \  }}ddd           n# 1 swxY w Y   t	                                          ||           dS )ziInitialize with a file path.

        Args:
            file_path: The path to the file to load.
        rbN)r   encoding)opentokenizedetect_encodingreadlinesuper__init__)selfr   fr   _	__class__s        g/var/www/html/ai-engine/env/lib/python3.11/site-packages/langchain_community/document_loaders/python.pyr   zPythonLoader.__init__   s     )T"" 	?a"21:>>KHa	? 	? 	? 	? 	? 	? 	? 	? 	? 	? 	? 	? 	? 	? 	?9x@@@@@s   ;??)	__name__
__module____qualname____doc__r   strr   r   __classcell__)r   s   @r   r   r      s^        PPA%T	"2 A A A A A A A A A A    r   )r   pathlibr   typingr   )langchain_community.document_loaders.textr   r    r   r   <module>r"      s                 @ @ @ @ @ @A A A A A: A A A A Ar   