
    dhN                     F    S SK r S SKJr  S SKJr  S SKJr   " S S\5      rg)    N)Path)Union)
TextLoaderc                   >   ^  \ rS rSrSrS\\\4   4U 4S jjrSr	U =r
$ )PythonLoader   zFLoad `Python` files, respecting any non-default encoding if specified.	file_pathc                    > [        US5       n[        R                  " UR                  5      u  p4SSS5        [        TU ]  UWS9  g! , (       d  f       N= f)zQInitialize 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        c/var/www/html/shao/venv/lib/python3.13/site-packages/langchain_community/document_loaders/python.pyr   PythonLoader.__init__   sG     )T"a"221::>KH #9x@ #"s   #A
A )__name__
__module____qualname____firstlineno____doc__r   strr   r   __static_attributes____classcell__)r   s   @r   r   r      s#    PA%T	"2 A A    r   )r   pathlibr   typingr   )langchain_community.document_loaders.textr   r   r   r"   r   <module>r&      s       @A: Ar"   