| Server IP : 52.25.153.185 / Your IP : 216.73.217.131 Web Server : Apache System : Linux ip-172-26-6-158 5.10.0-35-cloud-amd64 #1 SMP Debian 5.10.237-1 (2025-05-19) x86_64 User : daemon ( 1) PHP Version : 8.1.10 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/share/python3/debpython/__pycache__/ |
Upload File : |
a
�j`� � @ 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<