__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
�

��g����SrSSKrSSKrSSKrSSKrSSKJr SSKrSSKrSSK	r	SSK
Jr SSKJ
r "SS\5rS\
S	4S
jrSSS4S
jrg)auBootstrap PyUNO Runtime.
The soffice process is started opening a named pipe of random name, then
the local context is used to access the pipe. This function directly
returns the remote component context, from whereon you can get the
ServiceManager by calling getServiceManager() on the returned object.
This module supports the following environments:
-   Windows
-   GNU/Linux derivatives
-   Mac OS X
A configurable time-out allows to wait for LibO process to be completed.
Multiple attempts can be set in order to connect to LibO as a service.
Specific versions of the office suite can be started.
Instructions:
1.  Include one of the below examples in your Python macro
2.  Run your LibreOffice script from your preferred IDE
Imports:
    os, random, subprocess, sys - `bootstrap`
    itertools, time - `retry` decorator
Exceptions:
    OSError            - in `bootstrap`
    BootstrapException - in `bootstrap`
    NoConnectException - in `bootstrap`
Functions:
    `bootstrap`
    `retry` decorator
Acknowledgments:
  - Kim Kulak for original officehelper.py Python translation from bootstrap.java
  - ActiveState, for `retry` python decorator
warning:: Tested platforms are Linux, Mac OS X & Windows
    AppImage, Flatpak, Snap and the like have not been validated
:References:
.. _ActiveState retry Python decorator: http://code.activestate.com/recipes/580745-retry-decorator-in-python/
�N)�platform)�NoConnectException)�	Exceptionc��\rSrSrSrg)�BootstrapException�C�N)�__name__�
__module__�__qualname__�__firstlineno__�__static_attributes__r	��,/usr/lib/libreoffice/program/officehelper.pyrrCs��rr)r����iXic��g�Nr	��argss r�<lambda>rIs��trc�^^^�UUU4SjnU$)zeretry Python decorator
Credit:
http://code.activestate.com/recipes/580745-retry-decorator-in-python/
c�>^�UUUU4SjnU$)Nc�>�/n[R"TS/5HnT"U0UD6s $ g!TaLnURU5 Uc
T"SU5 eT"SUSU-5 [R"U5 SnAM^SnAff=f)Nzretryable failed definitely:zretryable failed:z-- delaying for %ds)�	itertools�chain�append�time�sleep)	r�kwargs�problems�delay�problem�delays�	exception�function�reports	     ����r�wrapped�'retry.<locals>.wrapper.<locals>.wrappedOs�����H�"����$��8��
*�#�T�4�V�4�4�9���!�*��O�O�G�,��}��=�x�H���2�G�4�u�<�>��
�
�5�)�)��*�s�-�A?�AA:�:A?r	)r(r*r&r'r)s` ���r�wrapper�retry.<locals>.wrapperNs���	�	��rr	)r&r'r)r,s``` r�retryr.Gs����"�Nr)r�r�c��grr	rs rrrbs��drc�^^�SnU(aUnOS[R;a[RSnOSn[RRUS5n[R
"S5(aUS-
nSU-S-nO[S:XaS	n[R"5 S
[[R"55SS-nSRSUS
/5nSRUSSSU-S-/5n[R
"S5(d
[S:Xa[R"USS9nO5[S:Xa%[R"US[RS9nO[e[R"5nURR!SU5mSRSUS/5m[#U[$US9UU4Sj5n	U	"5n
U
$![&a� [(R*"S5 W(a�[R
"S5(d
[S:XaUR-5 [8e[S:XaC[R."[R0"UR25[4R65 [8ef=f)a�Bootstrap PyUNO Runtime.
The soffice process is started opening a named pipe of random name,
then the local context is used to access the pipe. This function
directly returns the remote component context, from whereon you can
get the ServiceManager by calling getServiceManager() on the
returned object.

Examples:
i.  Start LO as a service, get its remote component context

    import officehelper
    ctx = officehelper.bootstrap()
    # your code goes here

ii. Wait longer for LO to start, request context multiples times
  + Report processing in console

    import officehelper as oh
    ctx = oh.bootstrap(delays=(5,10,15,20),report=print)  # wait 5, 10, 15 and 20 sec.
    # your code goes here

iii. Use a specific LibreOffice copy

    from officehelper import bootstrap
    ctx = bootstrap(soffice=r"USB:\PortableApps\libO-7.6\App\libreoffice\program\soffice.exe")
    # your code goes here
N�UNO_PATH��soffice�winz.exe�"�darwinz4/Applications/LibreOffice.App/Contents/MacOS/soffice�uno�z
pipe,name=z;urp;� z--nologoz--nodefaultz
--accept="T)�shell�linux)r<�
preexec_fnz"com.sun.star.bridge.UnoUrlResolverzuno:zStarOffice.ComponentContext)r&r'r)c�&>�TRT5$r)�resolve)�resolver�sConnects��rr@�bootstrap.<locals>.resolve�s����#�#�H�-�-r�
)�os�environ�path�joinr�
startswith�random�seed�str�
subprocess�Popen�setsid�OSErrorr9�getComponentContext�ServiceManager�createInstanceWithContextr.rrr r!�	terminate�killpg�getpgid�pid�signal�SIGTERMr)
r5r&r)�process�sOffice�	sPipeName�connect_string�command�
xLocalContextr@�ctxrArBs
           @@r�	bootstraprabs���</!�����G��R�Z�Z�'��*�*�Z�0�����g�g�l�l�7�I�6�G��"�"�5�)�)��6�!����-�#�-���X�%�P�����
��C��
�
��0���4�4�	����,�	�7�!C�D���(�(�G�Z���~�@]�`c�@c�d�e�����u�%�%��X�)=� �&�&�w�d�;�G�
��
 � �&�&�w�d�r�y�y�Q�G��M��/�/�1�
� �/�/�I�I�0�-�A���7�7�F�N�4Q�R�S��	�f�+��
�	.�
�	.��i���
���!��
�
�2����"�"�5�)�)�X��-A��!�!�#�!� ��W�$��	�	�"�*�*�W�[�[�1�6�>�>�B� � �!�s
�G	G�B6J)�__doc__rErJrXrM�sysrrr r9�com.sun.star.connectionr�com.sun.star.unor�UnoExceptionrr.rar	rr�<module>rgsW��& �D
�
�
�����
�6�6�	��	�/��#��6�<�8J�M!r

Filemanager

Name Type Size Permission Actions
officehelper.cpython-313.pyc File 7.02 KB 0644
pythonloader.cpython-313.pyc File 8.24 KB 0644
Filemanager