HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //proc/1233/cwd/usr/share/python3/debpython/__pycache__/__init__.cpython-312.pyc
�

��bU���	ddlmZddlZddlZddlmZmZddlmZeje
�Zejd�Z
Gd�d�Zd	d�Zy#e$rdZY�RwxYw)
�)�datetimeN)�PIPE�Popen)�dumpsz4.*?/usr/lib/python(\d(?:.\d+)?)/(site|dist)-packagesc��eZdZd�Zd�Zy)�memoizec� �||_i|_y�N)�func�cache)�selfrs  �(/usr/share/python3/debpython/__init__.py�__init__zmemoize.__init__s����	���
�c��t||f�}||jvr|j|i|��|j|<|j|Sr
)rrr)r
�args�kwargs�keys    r�__call__zmemoize.__call__sG���T�6�N�#���d�j�j� �'�d�i�i��8��8�D�J�J�s�O��z�z�#��rN)�__name__�
__module__�__qualname__rr�rrrrs���rrc	���d||d�}d}|durn�|�|jtt��n�|r�t|t�rd}t	|d�}t
r@|j
djtj�j���|j
dj|��|j�|j||��tjd	|�t|fi|��5}|j�\}}|xr|j�t!|j"|xrt|d
�|xrt|d
���cddd�S#1swYyxYw)a<Execute external shell commad.

    :param cdw: currennt working directory
    :param env: environment
    :param log_output:
        * opened log file or path to this file, or
        * None if output should be included in the returned dict, or
        * False if output should be redirectored to stdout/stderr
    T)�shell�cwd�envFN)�stdout�stderr�az
# command executed on {}z
$ {}
zinvoking: %szutf-8)�
returncoderr)�updater�
isinstance�str�openr�write�format�now�	isoformat�flush�log�debugr�communicate�close�dictr!)	�commandrr�
log_outputrr.�processrrs	         r�executer3s0���#�c�2�D��E��U���	�	����4���-�	��j�#�&��E��j�#�.�J�����9�@�@�����AY�AY�A[�\�]�����*�*�7�3�4��������:�j��9��I�I�n�g�&�	�w�	�$�	�7� �,�,�.����
�$�*�"�"�$���w�1�1�!�:�c�&�'�&:�!�:�c�&�'�&:�<�
 �	�	�s
�7AE�E%)NNN)r�ImportError�logging�re�
subprocessrr�pickler�	getLoggerrr+�compile�
PUBLIC_DIR_RErr3rrr�<module>r<sc���!��	�"���g����!����
�
�R�S�
�	�	� <��/���H��s�A�A�A