%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/libreoffice/program/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/libreoffice/program/__pycache__/pythonloader.cpython-312.pyc

�

뤎f����ddlZddlZddlZddlZddlZddlmZddlmZm	Z	ddl
mZddlm
Z
dZdZdZdZd	�ZiZd
�Zd�ZGd�d
ee
ej,�Zy)�N)�unquote)�	Exception�RuntimeException)�XImplementationLoader)�XServiceInfozvnd.openoffice.pymodule:)zcom.sun.star.loader.Pythonz org.openoffice.comp.pyuno.Loaderc�x�|jd�}d|k(rtd|zd��|d|||dzt|�fS)N�:���z!PythonLoader: No protocol in url r�)�findr�len)�url�nColons  �,/usr/lib/libreoffice/program/pythonloader.py�splitUrlr#sI��
�X�X�s�_�F�	�V�|�� C�c� I�4�Q�Q��q��=�#�f�Q�h�s�3�x�0�0�0�c��tj|dz�}tdk(rtdt	|�z�dtjt	|�t
j�k(rT|tjvrBtdk(rtdt	|�zdz�tjj|�tj|dz�}dtjt	|�t
j�k(rV|tjvrCtdk(rtdt	|�zdz�tjj|�yyy)Nz/pythonpath.ziprschecking for existence of sadding s to sys.pathz/pythonpath)�	unohelper�fileUrlToSystemPath�DEBUG�print�encfile�os�access�F_OK�sys�path�append)rrs  r�!checkForPythonPathBesideComponentr*s����(�(�#�.?�*?�A�D���z�
�+�g�t�o�=�>��B�I�I�w������0�0�����9I��A�:��*�w���.��@�A���������(�(�#�m�*;�=�D��B�I�I�w������0�0�����9I��A�:��*�w���.��@�A��������:J�0rc�H�|jtj��S�N)�encoder�getfilesystemencoding)�unis rrr9s���:�:�s�0�0�2�3�3rc�6�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	y)	�Loaderc�4�trtd�||_y)Nzpythonloader.Loader ctor)rr�ctx)�selfr(s  r�__init__zLoader.__init__=s����,�-���rc	�
�trtd|z�t|�\}}d|k(rC|jj	d�}|jt
|��}t|�\}}trtd|zdz|z�	d|k(�rtj||�}tj|�}|s�tjd�}t|d|jd	��tj|�}t!|d
��5}|j#�j%dd
�}|j'd�s|dz}t)|t+|�d�}	||_t/|	|j0�|t|<ddd�|S|Sd|k(r�|jd	�}
d|
k7rZtj|d|
�}||
dzt3|�}|t4j6vrt4j6j9|�t;|�}|j=d�\}}
}|
dk(r'|j=d�\}}
}t?||�}|
dk(r�'|Strtd|zdz�tAd|zdz|z|��#1swY|SxYw#tB$rq}trHtdtEtG|��zdztE|�zdztE|jH�z�tAd|zdztE|�zd��d}~wwxYw)Nzpythonloader: interpreting url zvnd.sun.star.expandz./singletons/com.sun.star.util.theMacroExpanderzpythonloader: after expansion r	�file�
uno_componentr�/�utf_8)�encoding�
��
�execzvnd.openoffice.pymoduler
r�.zUnknown protocol '�'zPythonLoader: Unknown protocol z in url zPython import exception z	 message z args zCouldn't load z for reason )%rrrr(�getValueByName�expandMacrosrr�
absolutize�g_loadedComponents�get�types�
ModuleTyper�rfindr�open�read�replace�endswith�compiler�__file__r4�__dict__r
rrr�
__import__�	partition�getattrrr�str�type�args)r)r�protocol�	dependent�exp�mod�filename�
fileHandle�src�
codeobject�nSlashr�path_component�dot�rest�es                r�getModuleFromUrlzLoader.getModuleFromUrlBs�����3�c�9�:�&��o���)� �H�,��(�(�)�)�+[�]�C��"�"�7�9�#5�6�C�!)�3���H�Y���2�X�=��C�i�O�P�1	]���!��*�*�C��6��)�,�,�c�3����*�*�?�;�C�6�s�1�S�Y�Y�s�^�7L�N� )�<�<�c�C�H��x�'�;�	6�z�(�o�o�/�7�7��R�@��"�|�|�T�3�"%��*�C�&-�c�7�8�3D�f�%N�
�'/����Z����6�25�*�3�/�	6��
�s�
�*�h�6�"����-����<�$�8�8�)�A�f�:M�O�D� )�&��(�3�y�>� B�I��3�8�8�+�������/�!�9�.��,5�,?�,?��,D�)���T��S�j�04���s�0C�-�N�C��!�#�~�6�C��S�j��
���.��9�C�?�@�&�(I�)1�)2�4>�)?�@C�)D�EI�L�L�7	6��
��&�	]���1�C��Q��L�@�"�#�%(��V�,�.6�7�9<�Q�V�V��E�F�"�$4�s�$:�^�$K�c�RS�f�$T�VZ�\�\��		]�sR�BJ�
A3I;�	J�
J�CJ�
J�,J�;J�J�J�	L�A,K=�=Lc�X�trtd�|j|�}|jj	dd�}trtdt|�z�|�'|j
||jj|�S|j
|||jj�S)Nzpythonloader.Loader.activate�g_ImplementationHelperzFetched ImplHelper as )	rrrYrEr;rI�getComponentFactoryr(�ServiceManager)r)�implementationName�dummy�locationUrl�regKeyrO�
implHelpers       r�activatezLoader.activate�s�����0�1��#�#�[�2���\�\�%�%�'?�$�H�
���+�c�*�o�=�>����*�*�,>����@W�@W�Y_�a�a��1�1�3E�f�T�X�X�Md�Md�e�erc��trtd�|j|�}|jj	dd�}|�&|j|jj|�S|j||jj�S)Nz%pythonloader.Loader.writeRegistryInfor[)rrrYrEr;�writeRegistryInfor(r])r)rar_r`rOrbs      rrezLoader.writeRegistryInfo�su����:�<��#�#�[�2���\�\�%�%�'?�$�H�
����(�(�$�(�(�*A�*A�6�K�K��/�/�����9P�9P�R�Rrc��tSr!)�g_implementationName�r)s r�getImplementationNamezLoader.getImplementationName�s��#�#rc�&�||j�vSr!)�getSupportedServiceNames)r)�ServiceNames  r�supportsServicezLoader.supportsService�s���d�;�;�=�=�=rc��tSr!)�g_supportedServicesrhs rrkzLoader.getSupportedServiceNames�s��"�"rN)
�__name__�
__module__�__qualname__r*rYrcrerirmrk�rrr&r&<s(���
>�@f�	S�$�>�#rr&)�unorrr<r�urllib.parser�com.sun.star.unorr�com.sun.star.loaderr�com.sun.star.langr�MODULE_PROTOCOLrrorgrr:rr�Baser&rsrr�<module>r{sf��&��
��	� �7�5�*�,��	��4��9��1���
 �4�e#�#�\�9�>�>�e#r

Zerion Mini Shell 1.0