| Server IP : 14.225.204.176 / Your IP : 216.73.216.14 Web Server : nginx/1.24.0 System : Linux nodejs-ybgk 6.8.0-40-generic #40-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 5 10:34:03 UTC 2024 x86_64 User : root ( 0) PHP Version : 8.1.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /snap/core20/current/usr/share/python3/debpython/__pycache__/ |
Upload File : |
U
�zk^� � @ s~ d dl Z d dlmZ d dlmZmZmZ d dlmZm Z d dl
mZ e �e
�Zddd�Zdd d
�Zdd� Zd
d� Zdd� ZdS )� N)�walk)�abspath�isfile�join)�Popen�PIPE)�
PUBLIC_DIR_RE�z.pyc c s� t |�}t| tt f�r6| D ]}t|�D ]
}|V q&qnRt| �rP| �|�rP| V n8tt| ��D ]*\}}}|D ]}|�|�rjt||�V qjq\dS )z6Generate *.py file names available in given directory.N) �tuple�
isinstance�list�from_directoryr �endswithr r r )�dname�
extensions�item�fn�root�dirsZ
file_names� r �%/usr/share/python3/debpython/files.pyr
s
r
c c sh t |�}td| dtd�}|�� \}}|jdkr<td| ��t|d�}|�� D ]}|�|�rN|V qNdS )z4Generate *.py file names available in given package.z/usr/bin/dpkg -L %sT)�shell�stdoutr zcannot get content of %szutf-8N) r
r r Zcommunicate�
returncode� Exception�str�
splitlinesr )Zpackage_namer Zprocessr �stderr�liner r r �from_package. s �
r c c s | D ]}|� |�r|V qdS )z4Generate *.py file names that match given directory.N)�
startswith)�filesr r r r r �filter_directory<