PATH:
opt
/
alt
/
python310
/
lib64
/
python3.10
/
ctypes
/
macholib
/
__pycache__
o ���h$ � @ sB d Z ddlZdgZe�d�Zdd� Zdd� Zedkre� dS dS ) z! Generic dylib path manipulation � N� dylib_infoz�(?x) (?P<location>^.*)(?:^|/) (?P<name> (?P<shortname>\w+?) (?:\.(?P<version>[^._]+))? (?:_(?P<suffix>[^._]+))? \.dylib$ ) c C s t �| �}|s dS |�� S )a1 A dylib name can take one of the following four forms: Location/Name.SomeVersion_Suffix.dylib Location/Name.SomeVersion.dylib Location/Name_Suffix.dylib Location/Name.dylib returns None if not found or a mapping equivalent to: dict( location='Location', name='Name.SomeVersion_Suffix.dylib', shortname='Name', version='SomeVersion', suffix='Suffix', ) Note that SomeVersion and Suffix are optional and may be None if not present. N)�DYLIB_RE�match� groupdict)�filenameZis_dylib� r �</opt/alt/python310/lib64/python3.10/ctypes/macholib/dylib.pyr s c C s� ddd�} t d�d u s J �t d�d u sJ �t d�| ddd�ks!J �t d �| dd ddd�ks/J �t d �| dddd�ks<J �t d�| dddd�ksIJ �t d�| ddddd�ksWJ �d S )Nc S s t | ||||d�S )N��location�nameZ shortname�version�suffix)�dictr r r r �d. s �ztest_dylib_info.<locals>.dzcompletely/invalidzcompletely/invalide_debugzP/Foo.dylib�Pz Foo.dylibZFoozP/Foo_debug.dylibzFoo_debug.dylib�debug)r z P/Foo.A.dylibzFoo.A.dylib�AzP/Foo_debug.A.dylibzFoo_debug.A.dylibZ Foo_debugzP/Foo.A_debug.dylibzFoo.A_debug.dylib)NNNNN)r )r r r r �test_dylib_info- s r �__main__)�__doc__�re�__all__�compiler r r �__name__r r r r �<module> s �
[-] framework.cpython-310.opt-2.pyc
[edit]
[-] dylib.cpython-310.opt-1.pyc
[edit]
[-] dyld.cpython-310.pyc
[edit]
[-] dyld.cpython-310.opt-2.pyc
[edit]
[-] __init__.cpython-310.pyc
[edit]
[-] dylib.cpython-310.opt-2.pyc
[edit]
[-] framework.cpython-310.opt-1.pyc
[edit]
[+]
..
[-] __init__.cpython-310.opt-1.pyc
[edit]
[-] framework.cpython-310.pyc
[edit]
[-] dylib.cpython-310.pyc
[edit]
[-] dyld.cpython-310.opt-1.pyc
[edit]
[-] __init__.cpython-310.opt-2.pyc
[edit]