✏️ 编辑:module.cpython-39.pyc
路径:
/usr/lib/python3.9/site-packages/sepolgen/__pycache__/module.cpython-39.pyc
大小:7 KB · 修改:2026-04-05 11:05:56 · 权限:0644 · 只读(保存会失败)
← 返回目录
👁 查看
⬇ 下载
检测到二进制内容,直接保存可能损坏文件。请改用「上传替换」。
a B�iv � @ s� d Z ddlZddlZzddlmZ W n eyB ddlmZ Y n0 ddlZddlZddl Z ddl Z ddlmZ dd� Z G dd � d �Zd d� ZG dd � d �ZdS )zU Utilities for dealing with the compilation of modules and creation of module tress. � N)�getstatusoutput� )�defaultsc C s0 t �d| �}t|�dkr(| d �� r(dS dS dS )z'Check that a module name is valid. z[^a-zA-Z0-9_\-\.]r TFN)�re�findall�len�isalpha)�modname�m� r �3/usr/lib/python3.9/site-packages/sepolgen/module.py� is_valid_name( s r c @ sN e Zd Zdd� Zdd� Zdd� Zdd� Zd d � Zdd� Zd d� Z ddd�Z dS )� ModuleTreec C s || _ d | _d S �N)r �dirname)�selfr r r r �__init__2 s zModuleTree.__init__c C s | j S r �r �r r r r �dir_name6 s zModuleTree.dir_namec C s | j d | j d S )N�/z.te�r r r r r r �te_name9 s zModuleTree.te_namec C s | j d | j d S )Nr z.fcr r r r r �fc_name<