2025-12-01

This commit is contained in:
2026-03-17 14:58:51 -06:00
parent 183e865f8b
commit 4b82b57113
6846 changed files with 954887 additions and 162606 deletions
@@ -0,0 +1,21 @@
import ctypes
# pylint: disable=import-error,no-name-in-module
from ctypes.macholib.dyld import dyld_find
class DLInfo: # pylint: disable=too-few-public-methods
"""
>>> lib = ctypes.cdll.LoadLibrary(ctypes.util.find_library('c'))
>>> dlinfo = DLInfo(lib)
>>> dlinfo.path
'/usr/lib/libc.dylib'
"""
def __init__(self, cdll: ctypes.CDLL):
self._cdll = cdll
@property
def path(self) -> str:
# pylint: disable=protected-access
return dyld_find(self._cdll._name)