HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux ns3133907 6.8.0-86-generic #87-Ubuntu SMP PREEMPT_DYNAMIC Mon Sep 22 18:03:36 UTC 2025 x86_64
User: cssnetorguk (1024)
PHP: 8.2.28
Disabled: NONE
Upload Files
File: //snap/core18/current/usr/share/python3/debpython/__pycache__/__init__.cpython-36.pyc
3

Ĥ�[U�@s�yddlmZWnek
r(dZYnXddlZddlZddlmZmZddlmZej	e
�Zejd�Z
Gdd�d�Zd
dd	�ZdS)�)�datetimeN)�PIPE�Popen)�dumpsz4.*?/usr/lib/python(\d(?:.\d+)?)/(site|dist)-packagesc@seZdZdd�Zdd�ZdS)�memoizecCs||_i|_dS)N)�func�cache)�selfr�r
�(/usr/share/python3/debpython/__init__.py�__init__szmemoize.__init__cOs2t||f�}||jkr(|j||�|j|<|j|S)N)rrr)r	�args�kwargs�keyr
r
r�__call__s
zmemoize.__call__N)�__name__�
__module__�__qualname__rrr
r
r
rrsrc	
Cs�d||d�}d}|dkrnv|dkr2|jttd�n^|r�t|t�rNd}t|d�}trj|jdjtj�j	���|jdj|��|j
�|j||d�tjd	|�t
|f|��>}|j�\}}|o�|j�t|j|o�t|d
�|o�t|d
�d�SQRXdS)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�formatZnowZ	isoformat�flush�log�debugr�communicate�close�dictr)	ZcommandrrZ
log_outputr
r%�processrrr
r
r�executes,


r()NNN)r�ImportError�logging�re�
subprocessrr�pickler�	getLoggerrr"�compile�
PUBLIC_DIR_RErr(r
r
r
r�<module>s