PK!~JEE __init__.pynu["""create and manipulate C data types in Python""" import os as _os, sys as _sys __version__ = "1.1.0" from _ctypes import Union, Structure, Array from _ctypes import _Pointer from _ctypes import CFuncPtr as _CFuncPtr from _ctypes import __version__ as _ctypes_version from _ctypes import RTLD_LOCAL, RTLD_GLOBAL from _ctypes import ArgumentError from struct import calcsize as _calcsize if __version__ != _ctypes_version: raise Exception("Version number mismatch", __version__, _ctypes_version) if _os.name == "nt": from _ctypes import FormatError DEFAULT_MODE = RTLD_LOCAL if _os.name == "posix" and _sys.platform == "darwin": # On OS X 10.3, we use RTLD_GLOBAL as default mode # because RTLD_LOCAL does not work at least on some # libraries. OS X 10.3 is Darwin 7, so we check for # that. if int(_os.uname().release.split('.')[0]) < 8: DEFAULT_MODE = RTLD_GLOBAL from _ctypes import FUNCFLAG_CDECL as _FUNCFLAG_CDECL, \ FUNCFLAG_PYTHONAPI as _FUNCFLAG_PYTHONAPI, \ FUNCFLAG_USE_ERRNO as _FUNCFLAG_USE_ERRNO, \ FUNCFLAG_USE_LASTERROR as _FUNCFLAG_USE_LASTERROR # WINOLEAPI -> HRESULT # WINOLEAPI_(type) # # STDMETHODCALLTYPE # # STDMETHOD(name) # STDMETHOD_(type, name) # # STDAPICALLTYPE def create_string_buffer(init, size=None): """create_string_buffer(aBytes) -> character array create_string_buffer(anInteger) -> character array create_string_buffer(aBytes, anInteger) -> character array """ if isinstance(init, bytes): if size is None: size = len(init)+1 _sys.audit("ctypes.create_string_buffer", init, size) buftype = c_char * size buf = buftype() buf.value = init return buf elif isinstance(init, int): _sys.audit("ctypes.create_string_buffer", None, init) buftype = c_char * init buf = buftype() return buf raise TypeError(init) def c_buffer(init, size=None): ## "deprecated, use create_string_buffer instead" ## import warnings ## warnings.warn("c_buffer is deprecated, use create_string_buffer instead", ## DeprecationWarning, stacklevel=2) return create_string_buffer(init, size) _c_functype_cache = {} def CFUNCTYPE(restype, *argtypes, **kw): """CFUNCTYPE(restype, *argtypes, use_errno=False, use_last_error=False) -> function prototype. restype: the result type argtypes: a sequence specifying the argument types The function prototype can be called in different ways to create a callable object: prototype(integer address) -> foreign function prototype(callable) -> create and return a C callable function from callable prototype(integer index, method name[, paramflags]) -> foreign function calling a COM method prototype((ordinal number, dll object)[, paramflags]) -> foreign function exported by ordinal prototype((function name, dll object)[, paramflags]) -> foreign function exported by name """ flags = _FUNCFLAG_CDECL if kw.pop("use_errno", False): flags |= _FUNCFLAG_USE_ERRNO if kw.pop("use_last_error", False): flags |= _FUNCFLAG_USE_LASTERROR if kw: raise ValueError("unexpected keyword argument(s) %s" % kw.keys()) try: return _c_functype_cache[(restype, argtypes, flags)] except KeyError: class CFunctionType(_CFuncPtr): _argtypes_ = argtypes _restype_ = restype _flags_ = flags _c_functype_cache[(restype, argtypes, flags)] = CFunctionType return CFunctionType if _os.name == "nt": from _ctypes import LoadLibrary as _dlopen from _ctypes import FUNCFLAG_STDCALL as _FUNCFLAG_STDCALL _win_functype_cache = {} def WINFUNCTYPE(restype, *argtypes, **kw): # docstring set later (very similar to CFUNCTYPE.__doc__) flags = _FUNCFLAG_STDCALL if kw.pop("use_errno", False): flags |= _FUNCFLAG_USE_ERRNO if kw.pop("use_last_error", False): flags |= _FUNCFLAG_USE_LASTERROR if kw: raise ValueError("unexpected keyword argument(s) %s" % kw.keys()) try: return _win_functype_cache[(restype, argtypes, flags)] except KeyError: class WinFunctionType(_CFuncPtr): _argtypes_ = argtypes _restype_ = restype _flags_ = flags _win_functype_cache[(restype, argtypes, flags)] = WinFunctionType return WinFunctionType if WINFUNCTYPE.__doc__: WINFUNCTYPE.__doc__ = CFUNCTYPE.__doc__.replace("CFUNCTYPE", "WINFUNCTYPE") elif _os.name == "posix": from _ctypes import dlopen as _dlopen from _ctypes import sizeof, byref, addressof, alignment, resize from _ctypes import get_errno, set_errno from _ctypes import _SimpleCData def _check_size(typ, typecode=None): # Check if sizeof(ctypes_type) against struct.calcsize. This # should protect somewhat against a misconfigured libffi. from struct import calcsize if typecode is None: # Most _type_ codes are the same as used in struct typecode = typ._type_ actual, required = sizeof(typ), calcsize(typecode) if actual != required: raise SystemError("sizeof(%s) wrong: %d instead of %d" % \ (typ, actual, required)) class py_object(_SimpleCData): _type_ = "O" def __repr__(self): try: return super().__repr__() except ValueError: return "%s()" % type(self).__name__ _check_size(py_object, "P") class c_short(_SimpleCData): _type_ = "h" _check_size(c_short) class c_ushort(_SimpleCData): _type_ = "H" _check_size(c_ushort) class c_long(_SimpleCData): _type_ = "l" _check_size(c_long) class c_ulong(_SimpleCData): _type_ = "L" _check_size(c_ulong) if _calcsize("i") == _calcsize("l"): # if int and long have the same size, make c_int an alias for c_long c_int = c_long c_uint = c_ulong else: class c_int(_SimpleCData): _type_ = "i" _check_size(c_int) class c_uint(_SimpleCData): _type_ = "I" _check_size(c_uint) class c_float(_SimpleCData): _type_ = "f" _check_size(c_float) class c_double(_SimpleCData): _type_ = "d" _check_size(c_double) class c_longdouble(_SimpleCData): _type_ = "g" if sizeof(c_longdouble) == sizeof(c_double): c_longdouble = c_double if _calcsize("l") == _calcsize("q"): # if long and long long have the same size, make c_longlong an alias for c_long c_longlong = c_long c_ulonglong = c_ulong else: class c_longlong(_SimpleCData): _type_ = "q" _check_size(c_longlong) class c_ulonglong(_SimpleCData): _type_ = "Q" ## def from_param(cls, val): ## return ('d', float(val), val) ## from_param = classmethod(from_param) _check_size(c_ulonglong) class c_ubyte(_SimpleCData): _type_ = "B" c_ubyte.__ctype_le__ = c_ubyte.__ctype_be__ = c_ubyte # backward compatibility: ##c_uchar = c_ubyte _check_size(c_ubyte) class c_byte(_SimpleCData): _type_ = "b" c_byte.__ctype_le__ = c_byte.__ctype_be__ = c_byte _check_size(c_byte) class c_char(_SimpleCData): _type_ = "c" c_char.__ctype_le__ = c_char.__ctype_be__ = c_char _check_size(c_char) class c_char_p(_SimpleCData): _type_ = "z" def __repr__(self): return "%s(%s)" % (self.__class__.__name__, c_void_p.from_buffer(self).value) _check_size(c_char_p, "P") class c_void_p(_SimpleCData): _type_ = "P" c_voidp = c_void_p # backwards compatibility (to a bug) _check_size(c_void_p) class c_bool(_SimpleCData): _type_ = "?" from _ctypes import POINTER, pointer, _pointer_type_cache class c_wchar_p(_SimpleCData): _type_ = "Z" def __repr__(self): return "%s(%s)" % (self.__class__.__name__, c_void_p.from_buffer(self).value) class c_wchar(_SimpleCData): _type_ = "u" def _reset_cache(): _pointer_type_cache.clear() _c_functype_cache.clear() if _os.name == "nt": _win_functype_cache.clear() # _SimpleCData.c_wchar_p_from_param POINTER(c_wchar).from_param = c_wchar_p.from_param # _SimpleCData.c_char_p_from_param POINTER(c_char).from_param = c_char_p.from_param _pointer_type_cache[None] = c_void_p def create_unicode_buffer(init, size=None): """create_unicode_buffer(aString) -> character array create_unicode_buffer(anInteger) -> character array create_unicode_buffer(aString, anInteger) -> character array """ if isinstance(init, str): if size is None: if sizeof(c_wchar) == 2: # UTF-16 requires a surrogate pair (2 wchar_t) for non-BMP # characters (outside [U+0000; U+FFFF] range). +1 for trailing # NUL character. size = sum(2 if ord(c) > 0xFFFF else 1 for c in init) + 1 else: # 32-bit wchar_t (1 wchar_t per Unicode character). +1 for # trailing NUL character. size = len(init) + 1 _sys.audit("ctypes.create_unicode_buffer", init, size) buftype = c_wchar * size buf = buftype() buf.value = init return buf elif isinstance(init, int): _sys.audit("ctypes.create_unicode_buffer", None, init) buftype = c_wchar * init buf = buftype() return buf raise TypeError(init) # XXX Deprecated def SetPointerType(pointer, cls): if _pointer_type_cache.get(cls, None) is not None: raise RuntimeError("This type already exists in the cache") if id(pointer) not in _pointer_type_cache: raise RuntimeError("What's this???") pointer.set_type(cls) _pointer_type_cache[cls] = pointer del _pointer_type_cache[id(pointer)] # XXX Deprecated def ARRAY(typ, len): return typ * len ################################################################ class CDLL(object): """An instance of this class represents a loaded dll/shared library, exporting functions using the standard C calling convention (named 'cdecl' on Windows). The exported functions can be accessed as attributes, or by indexing with the function name. Examples: .qsort -> callable object ['qsort'] -> callable object Calling the functions releases the Python GIL during the call and reacquires it afterwards. """ _func_flags_ = _FUNCFLAG_CDECL _func_restype_ = c_int # default values for repr _name = '' _handle = 0 _FuncPtr = None def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False, winmode=None): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR if _sys.platform.startswith("aix"): """When the name contains ".a(" and ends with ")", e.g., "libFOO.a(libFOO.so)" - this is taken to be an archive(member) syntax for dlopen(), and the mode is adjusted. Otherwise, name is presented to dlopen() as a file argument. """ if name and name.endswith(")") and ".a(" in name: mode |= ( _os.RTLD_MEMBER | _os.RTLD_NOW ) if _os.name == "nt": if winmode is not None: mode = winmode else: import nt mode = nt._LOAD_LIBRARY_SEARCH_DEFAULT_DIRS if '/' in name or '\\' in name: self._name = nt._getfullpathname(self._name) mode |= nt._LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR class _FuncPtr(_CFuncPtr): _flags_ = flags _restype_ = self._func_restype_ self._FuncPtr = _FuncPtr if handle is None: self._handle = _dlopen(self._name, mode) else: self._handle = handle def __repr__(self): return "<%s '%s', handle %x at %#x>" % \ (self.__class__.__name__, self._name, (self._handle & (_sys.maxsize*2 + 1)), id(self) & (_sys.maxsize*2 + 1)) def __getattr__(self, name): if name.startswith('__') and name.endswith('__'): raise AttributeError(name) func = self.__getitem__(name) setattr(self, name, func) return func def __getitem__(self, name_or_ordinal): func = self._FuncPtr((name_or_ordinal, self)) if not isinstance(name_or_ordinal, int): func.__name__ = name_or_ordinal return func class PyDLL(CDLL): """This class represents the Python library itself. It allows accessing Python API functions. The GIL is not released, and Python exceptions are handled correctly. """ _func_flags_ = _FUNCFLAG_CDECL | _FUNCFLAG_PYTHONAPI if _os.name == "nt": class WinDLL(CDLL): """This class represents a dll exporting functions using the Windows stdcall calling convention. """ _func_flags_ = _FUNCFLAG_STDCALL # XXX Hm, what about HRESULT as normal parameter? # Mustn't it derive from c_long then? from _ctypes import _check_HRESULT, _SimpleCData class HRESULT(_SimpleCData): _type_ = "l" # _check_retval_ is called with the function's result when it # is used as restype. It checks for the FAILED bit, and # raises an OSError if it is set. # # The _check_retval_ method is implemented in C, so that the # method definition itself is not included in the traceback # when it raises an error - that is what we want (and Python # doesn't have a way to raise an exception in the caller's # frame). _check_retval_ = _check_HRESULT class OleDLL(CDLL): """This class represents a dll exporting functions using the Windows stdcall calling convention, and returning HRESULT. HRESULT error values are automatically raised as OSError exceptions. """ _func_flags_ = _FUNCFLAG_STDCALL _func_restype_ = HRESULT class LibraryLoader(object): def __init__(self, dlltype): self._dlltype = dlltype def __getattr__(self, name): if name[0] == '_': raise AttributeError(name) dll = self._dlltype(name) setattr(self, name, dll) return dll def __getitem__(self, name): return getattr(self, name) def LoadLibrary(self, name): return self._dlltype(name) cdll = LibraryLoader(CDLL) pydll = LibraryLoader(PyDLL) if _os.name == "nt": pythonapi = PyDLL("python dll", None, _sys.dllhandle) elif _sys.platform == "cygwin": pythonapi = PyDLL("libpython%d.%d.dll" % _sys.version_info[:2]) else: pythonapi = PyDLL(None) if _os.name == "nt": windll = LibraryLoader(WinDLL) oledll = LibraryLoader(OleDLL) GetLastError = windll.kernel32.GetLastError from _ctypes import get_last_error, set_last_error def WinError(code=None, descr=None): if code is None: code = GetLastError() if descr is None: descr = FormatError(code).strip() return OSError(None, descr, None, code) if sizeof(c_uint) == sizeof(c_void_p): c_size_t = c_uint c_ssize_t = c_int elif sizeof(c_ulong) == sizeof(c_void_p): c_size_t = c_ulong c_ssize_t = c_long elif sizeof(c_ulonglong) == sizeof(c_void_p): c_size_t = c_ulonglong c_ssize_t = c_longlong # functions from _ctypes import _memmove_addr, _memset_addr, _string_at_addr, _cast_addr ## void *memmove(void *, const void *, size_t); memmove = CFUNCTYPE(c_void_p, c_void_p, c_void_p, c_size_t)(_memmove_addr) ## void *memset(void *, int, size_t) memset = CFUNCTYPE(c_void_p, c_void_p, c_int, c_size_t)(_memset_addr) def PYFUNCTYPE(restype, *argtypes): class CFunctionType(_CFuncPtr): _argtypes_ = argtypes _restype_ = restype _flags_ = _FUNCFLAG_CDECL | _FUNCFLAG_PYTHONAPI return CFunctionType _cast = PYFUNCTYPE(py_object, c_void_p, py_object, py_object)(_cast_addr) def cast(obj, typ): return _cast(obj, obj, typ) _string_at = PYFUNCTYPE(py_object, c_void_p, c_int)(_string_at_addr) def string_at(ptr, size=-1): """string_at(addr[, size]) -> string Return the string at addr.""" return _string_at(ptr, size) try: from _ctypes import _wstring_at_addr except ImportError: pass else: _wstring_at = PYFUNCTYPE(py_object, c_void_p, c_int)(_wstring_at_addr) def wstring_at(ptr, size=-1): """wstring_at(addr[, size]) -> string Return the string at addr.""" return _wstring_at(ptr, size) if _os.name == "nt": # COM stuff def DllGetClassObject(rclsid, riid, ppv): try: ccom = __import__("comtypes.server.inprocserver", globals(), locals(), ['*']) except ImportError: return -2147221231 # CLASS_E_CLASSNOTAVAILABLE else: return ccom.DllGetClassObject(rclsid, riid, ppv) def DllCanUnloadNow(): try: ccom = __import__("comtypes.server.inprocserver", globals(), locals(), ['*']) except ImportError: return 0 # S_OK return ccom.DllCanUnloadNow() from ctypes._endian import BigEndianStructure, LittleEndianStructure # Fill in specifically-sized types c_int8 = c_byte c_uint8 = c_ubyte for kind in [c_short, c_int, c_long, c_longlong]: if sizeof(kind) == 2: c_int16 = kind elif sizeof(kind) == 4: c_int32 = kind elif sizeof(kind) == 8: c_int64 = kind for kind in [c_ushort, c_uint, c_ulong, c_ulonglong]: if sizeof(kind) == 2: c_uint16 = kind elif sizeof(kind) == 4: c_uint32 = kind elif sizeof(kind) == 8: c_uint64 = kind del(kind) _reset_cache() PK!Gƻ7 _endian.pynu[import sys from ctypes import * _array_type = type(Array) def _other_endian(typ): """Return the type with the 'other' byte order. Simple types like c_int and so on already have __ctype_be__ and __ctype_le__ attributes which contain the types, for more complicated types arrays and structures are supported. """ # check _OTHER_ENDIAN attribute (present if typ is primitive type) if hasattr(typ, _OTHER_ENDIAN): return getattr(typ, _OTHER_ENDIAN) # if typ is array if isinstance(typ, _array_type): return _other_endian(typ._type_) * typ._length_ # if typ is structure if issubclass(typ, Structure): return typ raise TypeError("This type does not support other endian: %s" % typ) class _swapped_meta(type(Structure)): def __setattr__(self, attrname, value): if attrname == "_fields_": fields = [] for desc in value: name = desc[0] typ = desc[1] rest = desc[2:] fields.append((name, _other_endian(typ)) + rest) value = fields super().__setattr__(attrname, value) ################################################################ # Note: The Structure metaclass checks for the *presence* (not the # value!) of a _swapped_bytes_ attribute to determine the bit order in # structures containing bit fields. if sys.byteorder == "little": _OTHER_ENDIAN = "__ctype_be__" LittleEndianStructure = Structure class BigEndianStructure(Structure, metaclass=_swapped_meta): """Structure with big endian byte order""" __slots__ = () _swappedbytes_ = None elif sys.byteorder == "big": _OTHER_ENDIAN = "__ctype_le__" BigEndianStructure = Structure class LittleEndianStructure(Structure, metaclass=_swapped_meta): """Structure with little endian byte order""" __slots__ = () _swappedbytes_ = None else: raise RuntimeError("Invalid byteorder") PK!٨%NN __init__.pycnu[ pfc@sQ dZddlZddlZdZddlmZmZm Z ddlm Z ddlm Z ddlmZ ddlmZmZdd lmZdd lmZee kred ee nejdukrddlmZneZejdkrBejdkrBeejdjdddkrBeZqBnddlmZmZm Z!m"Z#ddZ%ddZ&iZ'dZ(ejdvkrddlm)Z*ddlm+Z,ejd kreZ,niZ-dZ.e.jr*e(jj/dde._q*n"ejdkr*ddlm0Z*nddlm1Z1m2Z2m3Z3m4Z4m5Z5dd lm6Z6m7Z7dd!lm8Z8dd"Z9d#e8fd$YZ:e9e:d%d&e8fd'YZ;e9e;d(e8fd)YZ<e9e<d*e8fd+YZ=e9e=d,e8fd-YZ>e9e>ed.ed/krNe=Z?e>Z@n@d0e8fd1YZ?e9e?d2e8fd3YZ@e9e@d4e8fd5YZAe9eAd6e8fd7YZBe9eBd8e8fd9YZCe1eCe1eBkreBZCned/ed:kr,e=ZDe>ZEn@d;e8fd<YZDe9eDd=e8fd>YZEe9eEd?e8fd@YZFeFeF_GeF_He9eFdAe8fdBYZIeIeI_GeI_He9eIdCe8fdDYZJeJeJ_GeJ_He9eJdEe8fdFYZKe9eKd%dGe8fdHYZLeLZMe9eLdIe8fdJYZNddKlmOZOmPZPmQZQdLZRyddMlmSZSWneTk rneXejdwkreSdNdOn eSdPdQdRe8fdSYZUdTe8fdUYZVddVZWdWZXdXZYdYeZfdZYZ[d[e[fd\YZ\ejdxkrd]e[fd^YZ]dd_lm^Z^m8Z8d`e8fdaYZ_dbe[fdcYZ`nddeZfdeYZaeae[Zbeae\Zcejdykr e\dfdejdZen5ejdgkr2e\dhejfd Zen e\dZeejdzkreae]Zgeae`Zhejd kregjijjZjn egjkjjZjddilmlZlmmZmdddjZnne1e@e1eLkre@Zoe?ZpnNe1e>e1eLkre>Zoe=Zpn'e1eEe1eLkr,eEZoeDZpnddklmqZqmrZrmsZsmtZte(eLeLeLeoeqZue(eLeLe?eoerZvdlZwewe:eLe:e:etZxdmZyewe:eLe?esZzddnZ{yddolm|Z|WneTk rn%Xewe:eLe?e|Z}ddpZ~ejd{krE dqZdrZnddslmZmZeIZeFZxke;e?e=eDgD]WZe1edkr eZqz e1edtkr eZqz e1edkrz eZqz qz Wxke<e@e>eEgD]WZe1edkr eZq e1edtkr$ eZq e1edkr eZq q W[eRdS(|s,create and manipulate C data types in PythoniNs1.1.0(tUniont StructuretArray(t_Pointer(tCFuncPtr(t __version__(t RTLD_LOCALt RTLD_GLOBAL(t ArgumentError(tcalcsizesVersion number mismatchtnttce(t FormatErrortposixtdarwinit.ii(tFUNCFLAG_CDECLtFUNCFLAG_PYTHONAPItFUNCFLAG_USE_ERRNOtFUNCFLAG_USE_LASTERRORcCst|ttfrT|dkr4t|d}nt|}|}||_|St|ttfrt|}|}|St |dS(screate_string_buffer(aString) -> character array create_string_buffer(anInteger) -> character array create_string_buffer(aString, anInteger) -> character array iN( t isinstancetstrtunicodetNonetlentc_chartvaluetinttlongt TypeError(tinittsizetbuftypetbuf((s'/usr/lib64/python2.7/ctypes/__init__.pytcreate_string_buffer4s      cCs t||S(N(R"(RR((s'/usr/lib64/python2.7/ctypes/__init__.pytc_bufferFscst|jdtr%tOn|jdtrDtOn|rctd|jnytfSWnGtk rdt ffdY}|tf<|SXdS(sCFUNCTYPE(restype, *argtypes, use_errno=False, use_last_error=False) -> function prototype. restype: the result type argtypes: a sequence specifying the argument types The function prototype can be called in different ways to create a callable object: prototype(integer address) -> foreign function prototype(callable) -> create and return a C callable function from callable prototype(integer index, method name[, paramflags]) -> foreign function calling a COM method prototype((ordinal number, dll object)[, paramflags]) -> foreign function exported by ordinal prototype((function name, dll object)[, paramflags]) -> foreign function exported by name t use_errnotuse_last_errors!unexpected keyword argument(s) %st CFunctionTypecseZZZZRS((t__name__t __module__t _argtypes_t _restype_t_flags_((targtypestflagstrestype(s'/usr/lib64/python2.7/ctypes/__init__.pyR&hsN( t_FUNCFLAG_CDECLtpoptFalset_FUNCFLAG_USE_ERRNOt_FUNCFLAG_USE_LASTERRORt ValueErrortkeyst_c_functype_cachetKeyErrort _CFuncPtr(R.R,tkwR&((R,R-R.s'/usr/lib64/python2.7/ctypes/__init__.pyt CFUNCTYPENs   "(t LoadLibrary(tFUNCFLAG_STDCALLcst|jdtr%tOn|jdtrDtOn|rctd|jnytfSWnGtk rdt ffdY}|tf<|SXdS(NR$R%s!unexpected keyword argument(s) %stWinFunctionTypecseZZZZRS((R'R(R)R*R+((R,R-R.(s'/usr/lib64/python2.7/ctypes/__init__.pyR=s( t_FUNCFLAG_STDCALLR0R1R2R3R4R5t_win_functype_cacheR7R8(R.R,R9R=((R,R-R.s'/usr/lib64/python2.7/ctypes/__init__.pyt WINFUNCTYPEws   "R:R@(tdlopen(tsizeoftbyreft addressoft alignmenttresize(t get_errnot set_errno(t _SimpleCDatacCsmddlm}|dkr(|j}nt|||}}||kritd|||fndS(Ni(R s"sizeof(%s) wrong: %d instead of %d(tstructR Rt_type_RBt SystemError(ttypttypecodeR tactualtrequired((s'/usr/lib64/python2.7/ctypes/__init__.pyt _check_sizes   t py_objectcBseZdZdZRS(tOcCs=ytt|jSWntk r8dt|jSXdS(Ns %s()(tsuperRRt__repr__R4ttypeR'(tself((s'/usr/lib64/python2.7/ctypes/__init__.pyRUs (R'R(RKRU(((s'/usr/lib64/python2.7/ctypes/__init__.pyRRstPtc_shortcBseZdZRS(th(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyRYstc_ushortcBseZdZRS(tH(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyR[stc_longcBseZdZRS(tl(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyR]stc_ulongcBseZdZRS(tL(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyR_stiR^tc_intcBseZdZRS(Ra(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyRbstc_uintcBseZdZRS(tI(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyRcstc_floatcBseZdZRS(tf(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyRestc_doublecBseZdZRS(td(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyRgst c_longdoublecBseZdZRS(tg(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyRistqt c_longlongcBseZdZRS(Rk(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyRlst c_ulonglongcBseZdZRS(tQ(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyRmstc_ubytecBseZdZRS(tB(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyRostc_bytecBseZdZRS(tb(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyRqsRcBseZdZRS(tc(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyRstc_char_pcBs2eZdZejdkr'dZn dZRS(tzR cCsLtjj|ds,d|jj|jfSd|jjt|tjfS(Nis%s(%r)s%s(%s)(twindlltkernel32tIsBadStringPtrAt __class__R'Rtcasttc_void_p(RW((s'/usr/lib64/python2.7/ctypes/__init__.pyRUscCs d|jjt|tjfS(Ns%s(%s)(RyR'RzR{R(RW((s'/usr/lib64/python2.7/ctypes/__init__.pyRUs(R'R(RKt_ostnameRU(((s'/usr/lib64/python2.7/ctypes/__init__.pyRts R{cBseZdZRS(RX(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyR{stc_boolcBseZdZRS(t?(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyR~s(tPOINTERtpointert_pointer_type_cachecCsbtjtjtjdkr0tjntjtt _t jtt _t td character array create_unicode_buffer(anInteger) -> character array create_unicode_buffer(aString, anInteger) -> character array iN( RRRRRRRRRR(RRR R!((s'/usr/lib64/python2.7/ctypes/__init__.pytcreate_unicode_buffer$s      cCsptj|ddk r'tdnt|tkrHtdn|j||t|.qsort -> callable object ['qsort'] -> callable object Calling the functions releases the Python GIL during the call and reacquires it afterwards. cs|_j|r%tOn|r8tOndtffdY}|_|dkrtj|_n |_dS(Nt_FuncPtrcseZZjZRS((R'R(R+t_func_restype_R*((R-RW(s'/usr/lib64/python2.7/ctypes/__init__.pyRbs( t_namet _func_flags_R2R3R8RRt_dlopent_handle(RWR}tmodethandleR$R%R((R-RWs'/usr/lib64/python2.7/ctypes/__init__.pyt__init__Xs      cCsDd|jj|j|jtjdd@t|tjdd@fS(Ns<%s '%s', handle %x at %x>ii(RyR'RRt_systmaxintR(RW((s'/usr/lib64/python2.7/ctypes/__init__.pyRUlscCsP|jdr-|jdr-t|n|j|}t||||S(Nt__(t startswithtendswithtAttributeErrort __getitem__tsetattr(RWR}tfunc((s'/usr/lib64/python2.7/ctypes/__init__.pyt __getattr__rs cCs:|j||f}t|ttfs6||_n|S(N(RRRRR'(RWtname_or_ordinalR((s'/usr/lib64/python2.7/ctypes/__init__.pyRys N(R'R(t__doc__R/RRbRt DEFAULT_MODERR1RRURR(((s'/usr/lib64/python2.7/ctypes/__init__.pyRGs    tPyDLLcBseZdZeeBZRS(sThis class represents the Python library itself. It allows to access Python API functions. The GIL is not released, and Python exceptions are handled correctly. (R'R(RR/t_FUNCFLAG_PYTHONAPIR(((s'/usr/lib64/python2.7/ctypes/__init__.pyRstWinDLLcBseZdZeZRS(snThis class represents a dll exporting functions using the Windows stdcall calling convention. (R'R(RR>R(((s'/usr/lib64/python2.7/ctypes/__init__.pyRs(t_check_HRESULTRItHRESULTcBseZdZeZRS(R^(R'R(RKRt_check_retval_(((s'/usr/lib64/python2.7/ctypes/__init__.pyRs tOleDLLcBseZdZeZeZRS(sThis class represents a dll exporting functions using the Windows stdcall calling convention, and returning HRESULT. HRESULT error values are automatically raised as WindowsError exceptions. (R'R(RR>RRR(((s'/usr/lib64/python2.7/ctypes/__init__.pyRst LibraryLoadercBs,eZdZdZdZdZRS(cCs ||_dS(N(t_dlltype(RWtdlltype((s'/usr/lib64/python2.7/ctypes/__init__.pyRscCsB|ddkrt|n|j|}t||||S(Nit_(RRR(RWR}tdll((s'/usr/lib64/python2.7/ctypes/__init__.pyRs cCs t||S(N(tgetattr(RWR}((s'/usr/lib64/python2.7/ctypes/__init__.pyRscCs |j|S(N(R(RWR}((s'/usr/lib64/python2.7/ctypes/__init__.pyR;s(R'R(RRRR;(((s'/usr/lib64/python2.7/ctypes/__init__.pyRs   s python dlltcygwinslibpython%d.%d.dll(tget_last_errortset_last_errorcCsF|dkrt}n|dkr9t|j}nt||S(N(Rt GetLastErrorR tstript WindowsError(tcodetdescr((s'/usr/lib64/python2.7/ctypes/__init__.pytWinErrors    (t _memmove_addrt _memset_addrt_string_at_addrt _cast_addrcs#dtffdY}|S(NR&cseZZZeeBZRS((R'R(R)R*R/RR+((R,R.(s'/usr/lib64/python2.7/ctypes/__init__.pyR&s(R8(R.R,R&((R,R.s'/usr/lib64/python2.7/ctypes/__init__.pyt PYFUNCTYPEscCst|||S(N(t_cast(tobjRM((s'/usr/lib64/python2.7/ctypes/__init__.pyRzscCs t||S(sAstring_at(addr[, size]) -> string Return the string at addr.(t _string_at(tptrR((s'/usr/lib64/python2.7/ctypes/__init__.pyt string_ats(t_wstring_at_addrcCs t||S(sFwstring_at(addr[, size]) -> string Return the string at addr.(t _wstring_at(RR((s'/usr/lib64/python2.7/ctypes/__init__.pyt wstring_atscCsNy"tdttdg}Wntk r6dSX|j|||SdS(Nscomtypes.server.inprocservert*i(t __import__tglobalstlocalst ImportErrortDllGetClassObject(trclsidtriidtppvtccom((s'/usr/lib64/python2.7/ctypes/__init__.pyRs " cCsAy"tdttdg}Wntk r6dSX|jS(Nscomtypes.server.inprocserverRi(RRRRtDllCanUnloadNow(R((s'/usr/lib64/python2.7/ctypes/__init__.pyRs " (tBigEndianStructuretLittleEndianStructurei(sntsce(sntsce(sntsce(sntsce(sntsce(sntsce(sntsce(RtosR|tsysRRt_ctypesRRRRRR8t_ctypes_versionRRRRJR t _calcsizet ExceptionR}R RtplatformRtunametsplitRR/RRRR2RR3RR"R#R6R:R;RR<R>R?R@treplaceRARBRCRDRERFRGRHRIRQRRRYR[R]R_RbRcReRgRiRlRmRot __ctype_le__t __ctype_be__RqRRtR{tc_voidpR~RRRRRRRRRRRtobjectRRRRRRRtcdlltpydllt dllhandlet pythonapit version_infoRvtoledllRwRtcoredllRRRtc_size_tt c_ssize_tRRRRtmemmovetmemsetRRRzRRRRRRRtctypes._endianRRtc_int8tc_uint8tkindtc_int16tc_int32tc_int64tc_uint16tc_uint32tc_uint64(((s'/usr/lib64/python2.7/ctypes/__init__.pytsJ ) "   !   (                         8           "             PK!K94""util.pyonu[ pfc@sddlZddlZejdkrEdZdZdZnejdkr`dZnejdkrejd krdd lmZ d Znejdkrddl Z ddl Z ddl Z d Z ejd krdZn dZejjds0ejjds0ejjdrEdZdZqejd krldZedZqdZdZndZedkrendS(iNtntcCsd}tjj|}|dkr(dS|t|}tj|jdd\}}t|d d}t|dd!d }|dkrd }n|dkr||Sd S( sReturn the version of MSVC that was used to build Python. For Python 2.3 and up, the version number is included in sys.version. For earlier versions, assume the compiler is MSVC 6. sMSC v.iit iiiig$@iN(tsystversiontfindtlentsplittinttNone(tprefixtitstrestt majorVersiont minorVersion((s#/usr/lib64/python2.7/ctypes/util.pyt_get_build_version s    cCswt}|dkrdS|dkr.d}nd|d}ddl}|jdddkro|d 7}n|d S( s%Return the name of the VC runtime dllitmsvcrtsmsvcr%di iNis_d.pydtds.dll(RRtimpt get_suffixes(RtclibnameR((s#/usr/lib64/python2.7/ctypes/util.pyt find_msvcrt s      cCs|dkrtSxtjdjtjD]l}tjj||}tjj|r^|S|jj dryq-n|d}tjj|r-|Sq-WdS(NtctmtPATHs.dll(RR( RtostenvironRtpathseptpathtjointisfiletlowertendswithR(tnamet directorytfname((s#/usr/lib64/python2.7/ctypes/util.pyt find_library1s   tcecCs|S(N((R!((s#/usr/lib64/python2.7/ctypes/util.pyR$Gstposixtdarwin(t dyld_findcCs[d|d|d||fg}x3|D]+}yt|SWq(tk rRq(q(Xq(WdS(Ns lib%s.dylibs%s.dylibs%s.framework/%s(t _dyld_findt ValueErrorR(R!tpossible((s#/usr/lib64/python2.7/ctypes/util.pyR$Ls   c Csdtj|}tj\}}tj|d|d|}z3tj|}z|j}Wd|j}XWdytj|Wn+t k r}|j t j krqnXX|dkrt dntj ||} | sdS| jdS(Ns[^\(\)\s]*lib%s\.[^\(\)\s]*srif type gcc >/dev/null 2>&1; then CC=gcc; elif type cc >/dev/null 2>&1; then CC=cc;else exit 10; fi;$CC -Wl,-t -o s 2>&1 -li sgcc or cc command not foundi(tretescapettempfiletmkstempRtclosetpopentreadtunlinktOSErrorterrnotENOENTtsearchRtgroup( R!texprtfdouttccouttcmdtfttracetrvtetres((s#/usr/lib64/python2.7/ctypes/util.pyt _findLib_gcc[s(    tsunos5cCsj|s dSd|}tj|}z|j}Wd|jXtjd|}|s]dS|jdS(Ns#/usr/ccs/bin/dump -Lpv 2>/dev/null s\[.*\]\sSONAME\s+([^\s]+)i(RRR1R2R0R,R7R8(R=R<tdataRA((s#/usr/lib64/python2.7/ctypes/util.pyt _get_sonamews  cCs|s dSd|}tj|}|j}|j}|dkrWtjj|Stj|}z|j}Wd|jXtjd|}|sdS|j dS(NsWif ! type objdump >/dev/null 2>&1; then exit 10; fi;objdump -p -j .dynamic 2>/dev/null i s\sSONAME\s+([^\s]+)i( RRR1R2R0RtbasenameR,R7R8(R=R<tdumpR?RDRA((s#/usr/lib64/python2.7/ctypes/util.pyREs"    tfreebsdtopenbsdt dragonflycCsf|jd}g}y-x&|r@|jdt|jqWWntk rUnX|petjgS(Nt.i(RtinsertRtpopR*Rtmaxint(tlibnametpartstnums((s#/usr/lib64/python2.7/ctypes/util.pyt _num_versions $ cCstj|}d||f}tjd}z|j}Wd|jXtj||}|sttt|S|j dd|dS(Ns:-l%s\.\S+ => \S*/(lib%s\.\S+)s/sbin/ldconfig -r 2>/dev/nulltcmpcSstt|t|S(N(RSRR(txty((s#/usr/lib64/python2.7/ctypes/util.pytsi( R,R-RR1R2R0tfindallRERBtsort(R!tenameR9R=RDRA((s#/usr/lib64/python2.7/ctypes/util.pyR$s cCstjjdsdS|r%d}nd}xKtj|jD]4}|j}|jdrA|jd}qAqAW|sdSxF|jdD]5}tjj |d|}tjj|r|SqWdS(Ns /usr/bin/crles*env LC_ALL=C /usr/bin/crle -64 2>/dev/nulls&env LC_ALL=C /usr/bin/crle 2>/dev/nullsDefault Library Path (ELF):it:slib%s.so( RRtexistsRR1t readlineststript startswithRR(R!tis64R<tlinetpathstdirtlibfile((s#/usr/lib64/python2.7/ctypes/util.pyt _findLib_crles   cCstt||pt|S(N(RERdRB(R!R_((s#/usr/lib64/python2.7/ctypes/util.pyR$sc Csddl}|jddkr8tjdd}ntjdd}idd6dd 6dd 6dd 6d d 6}|j|d}dtj||f}tjd}z|j}Wd|j Xtj ||}|sdS|j dS(Nitlis-32s-64s libc6,x86-64s x86_64-64s libc6,64bitsppc64-64s sparc64-64ss390x-64s libc6,IA-64sia64-64tlibc6s\s+(lib%s\.[^\s]+)\s+\(%ss/sbin/ldconfig -p 2>/dev/nulli( tstructtcalcsizeRtunametgetR,R-R1R2R0R7RR8( R!Rgtmachinetmach_maptabi_typeR9R=RDRA((s#/usr/lib64/python2.7/ctypes/util.pyt_findSoname_ldconfigs(   cCst|ptt|S(N(RnRERB(R!((s#/usr/lib64/python2.7/ctypes/util.pyR$scCsddlm}tjdkrC|jGH|jdGHtdGHntjdkrtdGHtdGHtdGHtjd kr|j d GH|j d GH|j d GH|j d GHq|j dGH|j dGHtdGHndS(Ni(tcdllRRR&RRtbz2R's libm.dylibslibcrypto.dylibslibSystem.dylibsSystem.framework/Systemslibm.sos libcrypt.sotcrypt( tctypesRoRR!RtloadR$Rtplatformt LoadLibrary(Ro((s#/usr/lib64/python2.7/ctypes/util.pyttests"   t__main__(RRR!RRR$Rttctypes.macholib.dyldR(R)R,R.R5RBRER^RRRdtFalseRnRvt__name__(((s#/usr/lib64/python2.7/ctypes/util.pyts8     $         PK!FpCC wintypes.pyonu[ pfcZ@sddlTeZeZeZeZe Z e Z e ZeZeZeZddlmZdefdYZeZeZeZeZeZZeZZ e!Z"Z#Z$e!Z%Z&e'Z(Z)e*Z+Z,e-ee-e*kreZ.eZ/n'e-ee-e*kreZ.eZ/neZ0eZ1eZ2eZ3eZ4eZ5e*Z6e6Z7e6Z8e6Z9e6Z:e6Z;e6Z<e6Z=e6Z>e6Z?e6Z@e6ZAe6ZBe6ZCe6ZDe6ZEe6ZFe6ZGe6ZHe6ZIe6ZJe6ZKe6ZLe6ZMe6ZNe6ZOe6ZPe6ZQe6ZRe6ZSe6ZTe6ZUdeVfdYZWeWZXZYZZdeVfdYZ[e[Z\d eVfd YZ]d eVfd YZ^e^Z_Z`Zad eVfdYZbebZcZddZedeVfdYZfefZgdeVfdYZhehZidZjdeVfdYZkdeVfdYZlddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOddPd dQddRdSdTdUdVd dWdXdYdZd[d\dd]ddd^d_d d`dadbdcddddedfdgdhgZZmdiS(ji(t*(t _SimpleCDatat VARIANT_BOOLcBseZdZdZRS(tvcCsd|jj|jfS(Ns%s(%r)(t __class__t__name__tvalue(tself((s'/usr/lib64/python2.7/ctypes/wintypes.pyt__repr__s(Rt __module__t_type_R(((s'/usr/lib64/python2.7/ctypes/wintypes.pyRstRECTcBs2eZdefdefdefdefgZRS(tleftttoptrighttbottom(RR tc_longt_fields_(((s'/usr/lib64/python2.7/ctypes/wintypes.pyR ds   t _SMALL_RECTcBs2eZdefdefdefdefgZRS(tLefttToptRighttBottom(RR tc_shortR(((s'/usr/lib64/python2.7/ctypes/wintypes.pyRks   t_COORDcBs eZdefdefgZRS(tXtY(RR RR(((s'/usr/lib64/python2.7/ctypes/wintypes.pyRrs tPOINTcBs eZdefdefgZRS(txty(RR RR(((s'/usr/lib64/python2.7/ctypes/wintypes.pyRvs tSIZEcBs eZdefdefgZRS(tcxtcy(RR RR(((s'/usr/lib64/python2.7/ctypes/wintypes.pyR{s cCs||d>|d>S(Nii((tredtgreentblue((s'/usr/lib64/python2.7/ctypes/wintypes.pytRGBstFILETIMEcBs eZdefdefgZRS(t dwLowDateTimetdwHighDateTime(RR tDWORDR(((s'/usr/lib64/python2.7/ctypes/wintypes.pyR%s tMSGcBsDeZdefdefdefdefdefdefgZRS(thWndtmessagetwParamtlParamttimetpt( RR tHWNDtc_uinttWPARAMtLPARAMR(RR(((s'/usr/lib64/python2.7/ctypes/wintypes.pyR)s      itWIN32_FIND_DATAAc BspeZdefdefdefdefdefdefdefdefdeefd ed fg ZRS( tdwFileAttributestftCreationTimetftLastAccessTimetftLastWriteTimet nFileSizeHight nFileSizeLowt dwReserved0t dwReserved1t cFileNametcAlternateFileNamei(RR R(R%tc_chartMAX_PATHR(((s'/usr/lib64/python2.7/ctypes/wintypes.pyR4s         tWIN32_FIND_DATAWc BspeZdefdefdefdefdefdefdefdefdeefd ed fg ZRS( R5R6R7R8R9R:R;R<R=R>i(RR R(R%tc_wcharR@R(((s'/usr/lib64/python2.7/ctypes/wintypes.pyRAs         tATOMtBOOLtBOOLEANtBYTEtCOLORREFtDOUBLER(tFLOATtHACCELtHANDLEtHBITMAPtHBRUSHt HCOLORSPACEtHDCtHDESKtHDWPt HENHMETAFILEtHFONTtHGDIOBJtHGLOBALtHHOOKtHICONt HINSTANCEtHKEYtHKLtHLOCALtHMENUt HMETAFILEtHMODULEtHMONITORtHPALETTEtHPENtHRGNtHRSRCtHSTRtHTASKtHWINSTAR0tINTtLANGIDt LARGE_INTEGERtLCIDtLCTYPEtLGRPIDtLONGR3t LPCOLESTRtLPCSTRtLPCVOIDtLPCWSTRtLPOLESTRtLPSTRtLPVOIDtLPWSTRR@tOLESTRtPOINTLtRECTLR$t SC_HANDLEtSERVICE_STATUS_HANDLEtSHORTtSIZELt SMALL_RECTtUINTtULARGE_INTEGERtULONGtUSHORTtWCHARtWORDR2t _FILETIMEt_LARGE_INTEGERt_POINTLt_RECTLt_ULARGE_INTEGERttagMSGttagPOINTttagRECTttagSIZEN(ntctypestc_byteRFtc_ushortRtc_ulongR(RBRR1R~tc_intRgtc_doubleRHtc_floatRIRERRDRRRRmRRR{t c_longlongRRit c_ulonglongRRt c_wchar_pRnRrRvRqRutc_char_pRoRstc_void_pRpRttsizeofR2R3RCRhRGRlRkRjRKRJRLRMRNRORPRQRRRSRTRURVRWRXRYRZR[R\R]R^R_R`RaRbRcRdReRfR0RyRzt StructureR RRRxRR}RRRRRwRRR|R$R%RR)RR@R4RAt__all__(((s'/usr/lib64/python2.7/ctypes/wintypes.pyts             PK! [#[#util.py.binutils-no-depnu[###################################################################### # This file should be kept compatible with Python 2.3, see PEP 291. # ###################################################################### import sys, os # find_library(name) returns the pathname of a library, or None. if os.name == "nt": def _get_build_version(): """Return the version of MSVC that was used to build Python. For Python 2.3 and up, the version number is included in sys.version. For earlier versions, assume the compiler is MSVC 6. """ # This function was copied from Lib/distutils/msvccompiler.py prefix = "MSC v." i = sys.version.find(prefix) if i == -1: return 6 i = i + len(prefix) s, rest = sys.version[i:].split(" ", 1) majorVersion = int(s[:-2]) - 6 minorVersion = int(s[2:3]) / 10.0 # I don't think paths are affected by minor version in version 6 if majorVersion == 6: minorVersion = 0 if majorVersion >= 6: return majorVersion + minorVersion # else we don't know what version of the compiler this is return None def find_msvcrt(): """Return the name of the VC runtime dll""" version = _get_build_version() if version is None: # better be safe than sorry return None if version <= 6: clibname = 'msvcrt' else: clibname = 'msvcr%d' % (version * 10) # If python was built with in debug mode import imp if imp.get_suffixes()[0][0] == '_d.pyd': clibname += 'd' return clibname+'.dll' def find_library(name): if name in ('c', 'm'): return find_msvcrt() # See MSDN for the REAL search order. for directory in os.environ['PATH'].split(os.pathsep): fname = os.path.join(directory, name) if os.path.isfile(fname): return fname if fname.lower().endswith(".dll"): continue fname = fname + ".dll" if os.path.isfile(fname): return fname return None if os.name == "ce": # search path according to MSDN: # - absolute path specified by filename # - The .exe launch directory # - the Windows directory # - ROM dll files (where are they?) # - OEM specified search path: HKLM\Loader\SystemPath def find_library(name): return name if os.name == "posix" and sys.platform == "darwin": from ctypes.macholib.dyld import dyld_find as _dyld_find def find_library(name): possible = ['lib%s.dylib' % name, '%s.dylib' % name, '%s.framework/%s' % (name, name)] for name in possible: try: return _dyld_find(name) except ValueError: continue return None elif os.name == "posix": # Andreas Degert's find functions, using gcc, /sbin/ldconfig, objdump import re, tempfile, errno def _findLib_gcc(name): expr = r'[^\(\)\s]*lib%s\.[^\(\)\s]*' % re.escape(name) fdout, ccout = tempfile.mkstemp() os.close(fdout) cmd = 'if type gcc >/dev/null 2>&1; then CC=gcc; elif type cc >/dev/null 2>&1; then CC=cc;else exit 10; fi;' \ '$CC -Wl,-t -o ' + ccout + ' 2>&1 -l' + name try: f = os.popen(cmd) try: trace = f.read() finally: rv = f.close() finally: try: os.unlink(ccout) except OSError, e: if e.errno != errno.ENOENT: raise if rv == 10: raise OSError, 'gcc or cc command not found' res = re.search(expr, trace) if not res: return None return res.group(0) if sys.platform == "sunos5": # use /usr/ccs/bin/dump on solaris def _get_soname(f): if not f: return None cmd = "/usr/ccs/bin/dump -Lpv 2>/dev/null " + f f = os.popen(cmd) try: data = f.read() finally: f.close() res = re.search(r'\[.*\]\sSONAME\s+([^\s]+)', data) if not res: return None return res.group(1) else: def _get_soname(f): # assuming GNU binutils / ELF if not f: return None cmd = 'if ! type objdump >/dev/null 2>&1; then exit 10; fi;' \ "objdump -p -j .dynamic 2>/dev/null " + f f = os.popen(cmd) dump = f.read() rv = f.close() if rv == 10: raise OSError, 'objdump command not found' f = os.popen(cmd) try: data = f.read() finally: f.close() res = re.search(r'\sSONAME\s+([^\s]+)', data) if not res: return None return res.group(1) if (sys.platform.startswith("freebsd") or sys.platform.startswith("openbsd") or sys.platform.startswith("dragonfly")): def _num_version(libname): # "libxyz.so.MAJOR.MINOR" => [ MAJOR, MINOR ] parts = libname.split(".") nums = [] try: while parts: nums.insert(0, int(parts.pop())) except ValueError: pass return nums or [ sys.maxint ] def find_library(name): ename = re.escape(name) expr = r':-l%s\.\S+ => \S*/(lib%s\.\S+)' % (ename, ename) f = os.popen('/sbin/ldconfig -r 2>/dev/null') try: data = f.read() finally: f.close() res = re.findall(expr, data) if not res: return _get_soname(_findLib_gcc(name)) res.sort(cmp= lambda x,y: cmp(_num_version(x), _num_version(y))) return res[-1] elif sys.platform == "sunos5": def _findLib_crle(name, is64): if not os.path.exists('/usr/bin/crle'): return None if is64: cmd = 'env LC_ALL=C /usr/bin/crle -64 2>/dev/null' else: cmd = 'env LC_ALL=C /usr/bin/crle 2>/dev/null' for line in os.popen(cmd).readlines(): line = line.strip() if line.startswith('Default Library Path (ELF):'): paths = line.split()[4] if not paths: return None for dir in paths.split(":"): libfile = os.path.join(dir, "lib%s.so" % name) if os.path.exists(libfile): return libfile return None def find_library(name, is64 = False): return _get_soname(_findLib_crle(name, is64) or _findLib_gcc(name)) else: def _findSoname_ldconfig(name): import struct if struct.calcsize('l') == 4: machine = os.uname()[4] + '-32' else: machine = os.uname()[4] + '-64' mach_map = { 'x86_64-64': 'libc6,x86-64', 'ppc64-64': 'libc6,64bit', 'sparc64-64': 'libc6,64bit', 's390x-64': 'libc6,64bit', 'ia64-64': 'libc6,IA-64', } abi_type = mach_map.get(machine, 'libc6') # XXX assuming GLIBC's ldconfig (with option -p) expr = r'\s+(lib%s\.[^\s]+)\s+\(%s' % (re.escape(name), abi_type) f = os.popen('/sbin/ldconfig -p 2>/dev/null') try: data = f.read() finally: f.close() res = re.search(expr, data) if not res: return None return res.group(1) def find_library(name): return _findSoname_ldconfig(name) or _get_soname(_findLib_gcc(name)) ################################################################ # test code def test(): from ctypes import cdll if os.name == "nt": print cdll.msvcrt print cdll.load("msvcrt") print find_library("msvcrt") if os.name == "posix": # find and load_version print find_library("m") print find_library("c") print find_library("bz2") # getattr ## print cdll.m ## print cdll.bz2 # load if sys.platform == "darwin": print cdll.LoadLibrary("libm.dylib") print cdll.LoadLibrary("libcrypto.dylib") print cdll.LoadLibrary("libSystem.dylib") print cdll.LoadLibrary("System.framework/System") else: print cdll.LoadLibrary("libm.so") print cdll.LoadLibrary("libcrypt.so") print find_library("crypt") if __name__ == "__main__": test() PK!Vd  _endian.pycnu[ pfc@sddlZddlTeeZdZdeefdYZejdkr{dZ eZ defd YZ n@ejd krd Z eZ d efd YZ n e ddS(iN(t*cCsft|trt|tSt|tr?t|j|jSt|t rR|St d|dS(sReturn the type with the 'other' byte order. Simple types like c_int and so on already have __ctype_be__ and __ctype_le__ attributes which contain the types, for more complicated types arrays and structures are supported. s+This type does not support other endian: %sN( thasattrt _OTHER_ENDIANtgetattrt isinstancet _array_typet _other_endiant_type_t_length_t issubclasst Structuret TypeError(ttyp((s&/usr/lib64/python2.7/ctypes/_endian.pyR s t _swapped_metacBseZdZRS(cCs|dkrgg}xI|D]A}|d}|d}|d}|j|t|f|qW|}ntt|j||dS(Nt_fields_iii(tappendRtsuperR t __setattr__(tselftattrnametvaluetfieldstdesctnameR trest((s&/usr/lib64/python2.7/ctypes/_endian.pyRs     ! (t__name__t __module__R(((s&/usr/lib64/python2.7/ctypes/_endian.pyR stlittlet __ctype_be__tBigEndianStructurecBseZdZeZdZRS(s$Structure with big endian byte orderN(RRt__doc__R t __metaclass__tNonet_swappedbytes_(((s&/usr/lib64/python2.7/ctypes/_endian.pyR1stbigt __ctype_le__tLittleEndianStructurecBseZdZeZdZRS(s'Structure with little endian byte orderN(RRRR RR R!(((s&/usr/lib64/python2.7/ctypes/_endian.pyR$:ssInvalid byteorder( tsystctypesttypetArrayRRR R t byteorderRR$Rt RuntimeError(((s&/usr/lib64/python2.7/ctypes/_endian.pyts    PK!٨%NN __init__.pyonu[ pfc@sQ dZddlZddlZdZddlmZmZm Z ddlm Z ddlm Z ddlmZ ddlmZmZdd lmZdd lmZee kred ee nejdukrddlmZneZejdkrBejdkrBeejdjdddkrBeZqBnddlmZmZm Z!m"Z#ddZ%ddZ&iZ'dZ(ejdvkrddlm)Z*ddlm+Z,ejd kreZ,niZ-dZ.e.jr*e(jj/dde._q*n"ejdkr*ddlm0Z*nddlm1Z1m2Z2m3Z3m4Z4m5Z5dd lm6Z6m7Z7dd!lm8Z8dd"Z9d#e8fd$YZ:e9e:d%d&e8fd'YZ;e9e;d(e8fd)YZ<e9e<d*e8fd+YZ=e9e=d,e8fd-YZ>e9e>ed.ed/krNe=Z?e>Z@n@d0e8fd1YZ?e9e?d2e8fd3YZ@e9e@d4e8fd5YZAe9eAd6e8fd7YZBe9eBd8e8fd9YZCe1eCe1eBkreBZCned/ed:kr,e=ZDe>ZEn@d;e8fd<YZDe9eDd=e8fd>YZEe9eEd?e8fd@YZFeFeF_GeF_He9eFdAe8fdBYZIeIeI_GeI_He9eIdCe8fdDYZJeJeJ_GeJ_He9eJdEe8fdFYZKe9eKd%dGe8fdHYZLeLZMe9eLdIe8fdJYZNddKlmOZOmPZPmQZQdLZRyddMlmSZSWneTk rneXejdwkreSdNdOn eSdPdQdRe8fdSYZUdTe8fdUYZVddVZWdWZXdXZYdYeZfdZYZ[d[e[fd\YZ\ejdxkrd]e[fd^YZ]dd_lm^Z^m8Z8d`e8fdaYZ_dbe[fdcYZ`nddeZfdeYZaeae[Zbeae\Zcejdykr e\dfdejdZen5ejdgkr2e\dhejfd Zen e\dZeejdzkreae]Zgeae`Zhejd kregjijjZjn egjkjjZjddilmlZlmmZmdddjZnne1e@e1eLkre@Zoe?ZpnNe1e>e1eLkre>Zoe=Zpn'e1eEe1eLkr,eEZoeDZpnddklmqZqmrZrmsZsmtZte(eLeLeLeoeqZue(eLeLe?eoerZvdlZwewe:eLe:e:etZxdmZyewe:eLe?esZzddnZ{yddolm|Z|WneTk rn%Xewe:eLe?e|Z}ddpZ~ejd{krE dqZdrZnddslmZmZeIZeFZxke;e?e=eDgD]WZe1edkr eZqz e1edtkr eZqz e1edkrz eZqz qz Wxke<e@e>eEgD]WZe1edkr eZq e1edtkr$ eZq e1edkr eZq q W[eRdS(|s,create and manipulate C data types in PythoniNs1.1.0(tUniont StructuretArray(t_Pointer(tCFuncPtr(t __version__(t RTLD_LOCALt RTLD_GLOBAL(t ArgumentError(tcalcsizesVersion number mismatchtnttce(t FormatErrortposixtdarwinit.ii(tFUNCFLAG_CDECLtFUNCFLAG_PYTHONAPItFUNCFLAG_USE_ERRNOtFUNCFLAG_USE_LASTERRORcCst|ttfrT|dkr4t|d}nt|}|}||_|St|ttfrt|}|}|St |dS(screate_string_buffer(aString) -> character array create_string_buffer(anInteger) -> character array create_string_buffer(aString, anInteger) -> character array iN( t isinstancetstrtunicodetNonetlentc_chartvaluetinttlongt TypeError(tinittsizetbuftypetbuf((s'/usr/lib64/python2.7/ctypes/__init__.pytcreate_string_buffer4s      cCs t||S(N(R"(RR((s'/usr/lib64/python2.7/ctypes/__init__.pytc_bufferFscst|jdtr%tOn|jdtrDtOn|rctd|jnytfSWnGtk rdt ffdY}|tf<|SXdS(sCFUNCTYPE(restype, *argtypes, use_errno=False, use_last_error=False) -> function prototype. restype: the result type argtypes: a sequence specifying the argument types The function prototype can be called in different ways to create a callable object: prototype(integer address) -> foreign function prototype(callable) -> create and return a C callable function from callable prototype(integer index, method name[, paramflags]) -> foreign function calling a COM method prototype((ordinal number, dll object)[, paramflags]) -> foreign function exported by ordinal prototype((function name, dll object)[, paramflags]) -> foreign function exported by name t use_errnotuse_last_errors!unexpected keyword argument(s) %st CFunctionTypecseZZZZRS((t__name__t __module__t _argtypes_t _restype_t_flags_((targtypestflagstrestype(s'/usr/lib64/python2.7/ctypes/__init__.pyR&hsN( t_FUNCFLAG_CDECLtpoptFalset_FUNCFLAG_USE_ERRNOt_FUNCFLAG_USE_LASTERRORt ValueErrortkeyst_c_functype_cachetKeyErrort _CFuncPtr(R.R,tkwR&((R,R-R.s'/usr/lib64/python2.7/ctypes/__init__.pyt CFUNCTYPENs   "(t LoadLibrary(tFUNCFLAG_STDCALLcst|jdtr%tOn|jdtrDtOn|rctd|jnytfSWnGtk rdt ffdY}|tf<|SXdS(NR$R%s!unexpected keyword argument(s) %stWinFunctionTypecseZZZZRS((R'R(R)R*R+((R,R-R.(s'/usr/lib64/python2.7/ctypes/__init__.pyR=s( t_FUNCFLAG_STDCALLR0R1R2R3R4R5t_win_functype_cacheR7R8(R.R,R9R=((R,R-R.s'/usr/lib64/python2.7/ctypes/__init__.pyt WINFUNCTYPEws   "R:R@(tdlopen(tsizeoftbyreft addressoft alignmenttresize(t get_errnot set_errno(t _SimpleCDatacCsmddlm}|dkr(|j}nt|||}}||kritd|||fndS(Ni(R s"sizeof(%s) wrong: %d instead of %d(tstructR Rt_type_RBt SystemError(ttypttypecodeR tactualtrequired((s'/usr/lib64/python2.7/ctypes/__init__.pyt _check_sizes   t py_objectcBseZdZdZRS(tOcCs=ytt|jSWntk r8dt|jSXdS(Ns %s()(tsuperRRt__repr__R4ttypeR'(tself((s'/usr/lib64/python2.7/ctypes/__init__.pyRUs (R'R(RKRU(((s'/usr/lib64/python2.7/ctypes/__init__.pyRRstPtc_shortcBseZdZRS(th(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyRYstc_ushortcBseZdZRS(tH(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyR[stc_longcBseZdZRS(tl(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyR]stc_ulongcBseZdZRS(tL(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyR_stiR^tc_intcBseZdZRS(Ra(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyRbstc_uintcBseZdZRS(tI(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyRcstc_floatcBseZdZRS(tf(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyRestc_doublecBseZdZRS(td(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyRgst c_longdoublecBseZdZRS(tg(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyRistqt c_longlongcBseZdZRS(Rk(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyRlst c_ulonglongcBseZdZRS(tQ(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyRmstc_ubytecBseZdZRS(tB(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyRostc_bytecBseZdZRS(tb(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyRqsRcBseZdZRS(tc(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyRstc_char_pcBs2eZdZejdkr'dZn dZRS(tzR cCsLtjj|ds,d|jj|jfSd|jjt|tjfS(Nis%s(%r)s%s(%s)(twindlltkernel32tIsBadStringPtrAt __class__R'Rtcasttc_void_p(RW((s'/usr/lib64/python2.7/ctypes/__init__.pyRUscCs d|jjt|tjfS(Ns%s(%s)(RyR'RzR{R(RW((s'/usr/lib64/python2.7/ctypes/__init__.pyRUs(R'R(RKt_ostnameRU(((s'/usr/lib64/python2.7/ctypes/__init__.pyRts R{cBseZdZRS(RX(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyR{stc_boolcBseZdZRS(t?(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyR~s(tPOINTERtpointert_pointer_type_cachecCsbtjtjtjdkr0tjntjtt _t jtt _t td character array create_unicode_buffer(anInteger) -> character array create_unicode_buffer(aString, anInteger) -> character array iN( RRRRRRRRRR(RRR R!((s'/usr/lib64/python2.7/ctypes/__init__.pytcreate_unicode_buffer$s      cCsptj|ddk r'tdnt|tkrHtdn|j||t|.qsort -> callable object ['qsort'] -> callable object Calling the functions releases the Python GIL during the call and reacquires it afterwards. cs|_j|r%tOn|r8tOndtffdY}|_|dkrtj|_n |_dS(Nt_FuncPtrcseZZjZRS((R'R(R+t_func_restype_R*((R-RW(s'/usr/lib64/python2.7/ctypes/__init__.pyRbs( t_namet _func_flags_R2R3R8RRt_dlopent_handle(RWR}tmodethandleR$R%R((R-RWs'/usr/lib64/python2.7/ctypes/__init__.pyt__init__Xs      cCsDd|jj|j|jtjdd@t|tjdd@fS(Ns<%s '%s', handle %x at %x>ii(RyR'RRt_systmaxintR(RW((s'/usr/lib64/python2.7/ctypes/__init__.pyRUlscCsP|jdr-|jdr-t|n|j|}t||||S(Nt__(t startswithtendswithtAttributeErrort __getitem__tsetattr(RWR}tfunc((s'/usr/lib64/python2.7/ctypes/__init__.pyt __getattr__rs cCs:|j||f}t|ttfs6||_n|S(N(RRRRR'(RWtname_or_ordinalR((s'/usr/lib64/python2.7/ctypes/__init__.pyRys N(R'R(t__doc__R/RRbRt DEFAULT_MODERR1RRURR(((s'/usr/lib64/python2.7/ctypes/__init__.pyRGs    tPyDLLcBseZdZeeBZRS(sThis class represents the Python library itself. It allows to access Python API functions. The GIL is not released, and Python exceptions are handled correctly. (R'R(RR/t_FUNCFLAG_PYTHONAPIR(((s'/usr/lib64/python2.7/ctypes/__init__.pyRstWinDLLcBseZdZeZRS(snThis class represents a dll exporting functions using the Windows stdcall calling convention. (R'R(RR>R(((s'/usr/lib64/python2.7/ctypes/__init__.pyRs(t_check_HRESULTRItHRESULTcBseZdZeZRS(R^(R'R(RKRt_check_retval_(((s'/usr/lib64/python2.7/ctypes/__init__.pyRs tOleDLLcBseZdZeZeZRS(sThis class represents a dll exporting functions using the Windows stdcall calling convention, and returning HRESULT. HRESULT error values are automatically raised as WindowsError exceptions. (R'R(RR>RRR(((s'/usr/lib64/python2.7/ctypes/__init__.pyRst LibraryLoadercBs,eZdZdZdZdZRS(cCs ||_dS(N(t_dlltype(RWtdlltype((s'/usr/lib64/python2.7/ctypes/__init__.pyRscCsB|ddkrt|n|j|}t||||S(Nit_(RRR(RWR}tdll((s'/usr/lib64/python2.7/ctypes/__init__.pyRs cCs t||S(N(tgetattr(RWR}((s'/usr/lib64/python2.7/ctypes/__init__.pyRscCs |j|S(N(R(RWR}((s'/usr/lib64/python2.7/ctypes/__init__.pyR;s(R'R(RRRR;(((s'/usr/lib64/python2.7/ctypes/__init__.pyRs   s python dlltcygwinslibpython%d.%d.dll(tget_last_errortset_last_errorcCsF|dkrt}n|dkr9t|j}nt||S(N(Rt GetLastErrorR tstript WindowsError(tcodetdescr((s'/usr/lib64/python2.7/ctypes/__init__.pytWinErrors    (t _memmove_addrt _memset_addrt_string_at_addrt _cast_addrcs#dtffdY}|S(NR&cseZZZeeBZRS((R'R(R)R*R/RR+((R,R.(s'/usr/lib64/python2.7/ctypes/__init__.pyR&s(R8(R.R,R&((R,R.s'/usr/lib64/python2.7/ctypes/__init__.pyt PYFUNCTYPEscCst|||S(N(t_cast(tobjRM((s'/usr/lib64/python2.7/ctypes/__init__.pyRzscCs t||S(sAstring_at(addr[, size]) -> string Return the string at addr.(t _string_at(tptrR((s'/usr/lib64/python2.7/ctypes/__init__.pyt string_ats(t_wstring_at_addrcCs t||S(sFwstring_at(addr[, size]) -> string Return the string at addr.(t _wstring_at(RR((s'/usr/lib64/python2.7/ctypes/__init__.pyt wstring_atscCsNy"tdttdg}Wntk r6dSX|j|||SdS(Nscomtypes.server.inprocservert*i(t __import__tglobalstlocalst ImportErrortDllGetClassObject(trclsidtriidtppvtccom((s'/usr/lib64/python2.7/ctypes/__init__.pyRs " cCsAy"tdttdg}Wntk r6dSX|jS(Nscomtypes.server.inprocserverRi(RRRRtDllCanUnloadNow(R((s'/usr/lib64/python2.7/ctypes/__init__.pyRs " (tBigEndianStructuretLittleEndianStructurei(sntsce(sntsce(sntsce(sntsce(sntsce(sntsce(sntsce(RtosR|tsysRRt_ctypesRRRRRR8t_ctypes_versionRRRRJR t _calcsizet ExceptionR}R RtplatformRtunametsplitRR/RRRR2RR3RR"R#R6R:R;RR<R>R?R@treplaceRARBRCRDRERFRGRHRIRQRRRYR[R]R_RbRcReRgRiRlRmRot __ctype_le__t __ctype_be__RqRRtR{tc_voidpR~RRRRRRRRRRRtobjectRRRRRRRtcdlltpydllt dllhandlet pythonapit version_infoRvtoledllRwRtcoredllRRRtc_size_tt c_ssize_tRRRRtmemmovetmemsetRRRzRRRRRRRtctypes._endianRRtc_int8tc_uint8tkindtc_int16tc_int32tc_int64tc_uint16tc_uint32tc_uint64(((s'/usr/lib64/python2.7/ctypes/__init__.pytsJ ) "   !   (                         8           "             PK!t7ymacholib/__init__.pynu[""" Enough Mach-O to make your head spin. See the relevant header files in /usr/include/mach-o And also Apple's documentation. """ __version__ = '1.0' PK! Hdmacholib/framework.pynu[""" Generic framework path manipulation """ import re __all__ = ['framework_info'] STRICT_FRAMEWORK_RE = re.compile(r"""(?x) (?P^.*)(?:^|/) (?P (?P\w+).framework/ (?:Versions/(?P[^/]+)/)? (?P=shortname) (?:_(?P[^_]+))? )$ """) def framework_info(filename): """ A framework name can take one of the following four forms: Location/Name.framework/Versions/SomeVersion/Name_Suffix Location/Name.framework/Versions/SomeVersion/Name Location/Name.framework/Name_Suffix Location/Name.framework/Name returns None if not found, or a mapping equivalent to: dict( location='Location', name='Name.framework/Versions/SomeVersion/Name_Suffix', shortname='Name', version='SomeVersion', suffix='Suffix', ) Note that SomeVersion and Suffix are optional and may be None if not present """ is_framework = STRICT_FRAMEWORK_RE.match(filename) if not is_framework: return None return is_framework.groupdict() def test_framework_info(): def d(location=None, name=None, shortname=None, version=None, suffix=None): return dict( location=location, name=name, shortname=shortname, version=version, suffix=suffix ) assert framework_info('completely/invalid') is None assert framework_info('completely/invalid/_debug') is None assert framework_info('P/F.framework') is None assert framework_info('P/F.framework/_debug') is None assert framework_info('P/F.framework/F') == d('P', 'F.framework/F', 'F') assert framework_info('P/F.framework/F_debug') == d('P', 'F.framework/F_debug', 'F', suffix='debug') assert framework_info('P/F.framework/Versions') is None assert framework_info('P/F.framework/Versions/A') is None assert framework_info('P/F.framework/Versions/A/F') == d('P', 'F.framework/Versions/A/F', 'F', 'A') assert framework_info('P/F.framework/Versions/A/F_debug') == d('P', 'F.framework/Versions/A/F_debug', 'F', 'A', 'debug') if __name__ == '__main__': test_framework_info() PK!~macholib/dyld.pyonu[ pfc@sIdZddlZddlmZddlmZddlTdddd gZejj d d d d gZ ejj ddddgZ dZ dZ ddZddZddZddZddZddZddZddZddZdddZdddZdZed krEendS(!s dyld emulation iN(tframework_info(t dylib_info(t*t dyld_findtframework_findRRs~/Library/Frameworkss/Library/Frameworkss/Network/Library/Frameworkss/System/Library/Frameworkss~/libs/usr/local/libs/libs/usr/libcCs t|tr|jdS|S(sCNot all of PyObjC and Python understand unicode paths very well yettutf8(t isinstancetunicodetencode(ts((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pyt ensure_utf8"s cCsD|dkrtj}n|j|}|dkr7gS|jdS(Nt:(tNonetostenvirontgettsplit(tenvtvartrval((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pytdyld_env(s    cCs%|dkrtj}n|jdS(NtDYLD_IMAGE_SUFFIX(R R RR(R((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pytdyld_image_suffix0s  cCs t|dS(NtDYLD_FRAMEWORK_PATH(R(R((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pytdyld_framework_path5scCs t|dS(NtDYLD_LIBRARY_PATH(R(R((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pytdyld_library_path8scCs t|dS(NtDYLD_FALLBACK_FRAMEWORK_PATH(R(R((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pytdyld_fallback_framework_path;scCs t|dS(NtDYLD_FALLBACK_LIBRARY_PATH(R(R((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pytdyld_fallback_library_path>scCs2t|}|dkr|S||d}|S(s>For a potential path iterator, add DYLD_IMAGE_SUFFIX semanticscssMxF|D]>}|jdr7|td |dVn ||V|VqWdS(Ns.dylib(tendswithtlen(titeratortsuffixtpath((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pyt_injectFs   N(RR (R!RR"R$((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pytdyld_image_suffix_searchAs   ccst|}|dk rJx/t|D]}tjj||dVq%Wnx4t|D]&}tjj|tjj|VqWWdS(Ntname(RR RR R#tjoinRtbasename(R&Rt frameworkR#((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pytdyld_override_searchOs   ccs@|jdr<|dk r<tjj||tdVndS(Ns@executable_path/(t startswithR R R#R'R (R&texecutable_path((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pytdyld_executable_path_search`sccs|Vt|}|dk rUt|}x)|D]}tjj||dVq0Wnt|}x.|D]&}tjj|tjj|VqhW|dk r| rx)tD]}tjj||dVqWn|s x1t D]&}tjj|tjj|VqWndS(NR&( RR RR R#R'RR(tDEFAULT_FRAMEWORK_FALLBACKtDEFAULT_LIBRARY_FALLBACK(R&RR)tfallback_framework_pathR#tfallback_library_path((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pytdyld_default_searchgs      $  cCst|}t|}xTttt||t||t|||D]}tjj|rO|SqOWt d|fdS(s: Find a library or framework using dyld semantics sdylib %s could not be foundN( R R%tchainR*R-R2R R#tisfilet ValueError(R&R,RR#((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pyR}s      cCsyt|d|d|SWntk r/}nX|jd}|dkrdt|}|d7}ntjj|tjj|| }yt|d|d|SWntk r|nXdS(s Find a framework using dyld semantics in a very loose manner. Will take input such as: Python Python.framework Python.framework/Versions/Current R,Rs .frameworkiN(RR5trfindR R R#R'R((tfnR,Rtet fmwk_index((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pyRs    % cCs i}dS(N((R((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pyttest_dyld_findst__main__(t__doc__R R)RtdylibRt itertoolst__all__R#t expanduserR.R/R RR RRRRRR%R*R-R2RRR:t__name__(((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pyts<                  PK!il<<macholib/__init__.pycnu[ pfc@sdZdZdS(s~ Enough Mach-O to make your head spin. See the relevant header files in /usr/include/mach-o And also Apple's documentation. s1.0N(t__doc__t __version__(((s0/usr/lib64/python2.7/ctypes/macholib/__init__.pyt sPK!Ymacholib/dylib.pyonu[ pfc@sVdZddlZdgZejdZdZdZedkrRendS(s! Generic dylib path manipulation iNt dylib_infos(?x) (?P^.*)(?:^|/) (?P (?P\w+?) (?:\.(?P[^._]+))? (?:_(?P[^._]+))? \.dylib$ ) cCs#tj|}|sdS|jS(s1 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(tDYLIB_REtmatchtNonet groupdict(tfilenametis_dylib((s-/usr/lib64/python2.7/ctypes/macholib/dylib.pyRscCsdddddd}dS(Nc Ss%td|d|d|d|d|S(Ntlocationtnamet shortnametversiontsuffix(tdict(RRR R R ((s-/usr/lib64/python2.7/ctypes/macholib/dylib.pytd1s (R(R ((s-/usr/lib64/python2.7/ctypes/macholib/dylib.pyttest_dylib_info0st__main__(t__doc__tret__all__tcompileRRRt__name__(((s-/usr/lib64/python2.7/ctypes/macholib/dylib.pyts      PK!J((macholib/README.ctypesnu[Files in this directory come from Bob Ippolito's py2app. License: Any components of the py2app suite may be distributed under the MIT or PSF open source licenses. This is version 1.0, SVN revision 789, from 2006/01/25. The main repository is http://svn.red-bean.com/bob/macholib/trunk/macholib/PK!6z$$macholib/dylib.pynu[""" Generic dylib path manipulation """ import re __all__ = ['dylib_info'] DYLIB_RE = re.compile(r"""(?x) (?P^.*)(?:^|/) (?P (?P\w+?) (?:\.(?P[^._]+))? (?:_(?P[^._]+))? \.dylib$ ) """) def dylib_info(filename): """ 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. """ is_dylib = DYLIB_RE.match(filename) if not is_dylib: return None return is_dylib.groupdict() def test_dylib_info(): def d(location=None, name=None, shortname=None, version=None, suffix=None): return dict( location=location, name=name, shortname=shortname, version=version, suffix=suffix ) assert dylib_info('completely/invalid') is None assert dylib_info('completely/invalide_debug') is None assert dylib_info('P/Foo.dylib') == d('P', 'Foo.dylib', 'Foo') assert dylib_info('P/Foo_debug.dylib') == d('P', 'Foo_debug.dylib', 'Foo', suffix='debug') assert dylib_info('P/Foo.A.dylib') == d('P', 'Foo.A.dylib', 'Foo', 'A') assert dylib_info('P/Foo_debug.A.dylib') == d('P', 'Foo_debug.A.dylib', 'Foo_debug', 'A') assert dylib_info('P/Foo.A_debug.dylib') == d('P', 'Foo.A_debug.dylib', 'Foo', 'A', 'debug') if __name__ == '__main__': test_dylib_info() PK!il<<macholib/__init__.pyonu[ pfc@sdZdZdS(s~ Enough Mach-O to make your head spin. See the relevant header files in /usr/include/mach-o And also Apple's documentation. s1.0N(t__doc__t __version__(((s0/usr/lib64/python2.7/ctypes/macholib/__init__.pyt sPK!JgMmacholib/dyld.pynu[""" dyld emulation """ import os from ctypes.macholib.framework import framework_info from ctypes.macholib.dylib import dylib_info from itertools import * try: from _ctypes import _dyld_shared_cache_contains_path except ImportError: def _dyld_shared_cache_contains_path(*args): raise NotImplementedError __all__ = [ 'dyld_find', 'framework_find', 'framework_info', 'dylib_info', ] # These are the defaults as per man dyld(1) # DEFAULT_FRAMEWORK_FALLBACK = [ os.path.expanduser("~/Library/Frameworks"), "/Library/Frameworks", "/Network/Library/Frameworks", "/System/Library/Frameworks", ] DEFAULT_LIBRARY_FALLBACK = [ os.path.expanduser("~/lib"), "/usr/local/lib", "/lib", "/usr/lib", ] def dyld_env(env, var): if env is None: env = os.environ rval = env.get(var) if rval is None: return [] return rval.split(':') def dyld_image_suffix(env=None): if env is None: env = os.environ return env.get('DYLD_IMAGE_SUFFIX') def dyld_framework_path(env=None): return dyld_env(env, 'DYLD_FRAMEWORK_PATH') def dyld_library_path(env=None): return dyld_env(env, 'DYLD_LIBRARY_PATH') def dyld_fallback_framework_path(env=None): return dyld_env(env, 'DYLD_FALLBACK_FRAMEWORK_PATH') def dyld_fallback_library_path(env=None): return dyld_env(env, 'DYLD_FALLBACK_LIBRARY_PATH') def dyld_image_suffix_search(iterator, env=None): """For a potential path iterator, add DYLD_IMAGE_SUFFIX semantics""" suffix = dyld_image_suffix(env) if suffix is None: return iterator def _inject(iterator=iterator, suffix=suffix): for path in iterator: if path.endswith('.dylib'): yield path[:-len('.dylib')] + suffix + '.dylib' else: yield path + suffix yield path return _inject() def dyld_override_search(name, env=None): # If DYLD_FRAMEWORK_PATH is set and this dylib_name is a # framework name, use the first file that exists in the framework # path if any. If there is none go on to search the DYLD_LIBRARY_PATH # if any. framework = framework_info(name) if framework is not None: for path in dyld_framework_path(env): yield os.path.join(path, framework['name']) # If DYLD_LIBRARY_PATH is set then use the first file that exists # in the path. If none use the original name. for path in dyld_library_path(env): yield os.path.join(path, os.path.basename(name)) def dyld_executable_path_search(name, executable_path=None): # If we haven't done any searching and found a library and the # dylib_name starts with "@executable_path/" then construct the # library name. if name.startswith('@executable_path/') and executable_path is not None: yield os.path.join(executable_path, name[len('@executable_path/'):]) def dyld_default_search(name, env=None): yield name framework = framework_info(name) if framework is not None: fallback_framework_path = dyld_fallback_framework_path(env) for path in fallback_framework_path: yield os.path.join(path, framework['name']) fallback_library_path = dyld_fallback_library_path(env) for path in fallback_library_path: yield os.path.join(path, os.path.basename(name)) if framework is not None and not fallback_framework_path: for path in DEFAULT_FRAMEWORK_FALLBACK: yield os.path.join(path, framework['name']) if not fallback_library_path: for path in DEFAULT_LIBRARY_FALLBACK: yield os.path.join(path, os.path.basename(name)) def dyld_find(name, executable_path=None, env=None): """ Find a library or framework using dyld semantics """ for path in dyld_image_suffix_search(chain( dyld_override_search(name, env), dyld_executable_path_search(name, executable_path), dyld_default_search(name, env), ), env): if os.path.isfile(path): return path try: if _dyld_shared_cache_contains_path(path): return path except NotImplementedError: pass raise ValueError("dylib %s could not be found" % (name,)) def framework_find(fn, executable_path=None, env=None): """ Find a framework using dyld semantics in a very loose manner. Will take input such as: Python Python.framework Python.framework/Versions/Current """ error = None try: return dyld_find(fn, executable_path=executable_path, env=env) except ValueError as e: error = e fmwk_index = fn.rfind('.framework') if fmwk_index == -1: fmwk_index = len(fn) fn += '.framework' fn = os.path.join(fn, os.path.basename(fn[:fmwk_index])) try: return dyld_find(fn, executable_path=executable_path, env=env) except ValueError: raise error finally: error = None def test_dyld_find(): env = {} assert dyld_find('libSystem.dylib') == '/usr/lib/libSystem.dylib' assert dyld_find('System.framework/System') == '/System/Library/Frameworks/System.framework/System' if __name__ == '__main__': test_dyld_find() PK!macholib/dyld.pycnu[ pfc@sIdZddlZddlmZddlmZddlTdddd gZejj d d d d gZ ejj ddddgZ dZ dZ ddZddZddZddZddZddZddZddZddZdddZdddZdZed krEendS(!s dyld emulation iN(tframework_info(t dylib_info(t*t dyld_findtframework_findRRs~/Library/Frameworkss/Library/Frameworkss/Network/Library/Frameworkss/System/Library/Frameworkss~/libs/usr/local/libs/libs/usr/libcCs t|tr|jdS|S(sCNot all of PyObjC and Python understand unicode paths very well yettutf8(t isinstancetunicodetencode(ts((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pyt ensure_utf8"s cCsD|dkrtj}n|j|}|dkr7gS|jdS(Nt:(tNonetostenvirontgettsplit(tenvtvartrval((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pytdyld_env(s    cCs%|dkrtj}n|jdS(NtDYLD_IMAGE_SUFFIX(R R RR(R((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pytdyld_image_suffix0s  cCs t|dS(NtDYLD_FRAMEWORK_PATH(R(R((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pytdyld_framework_path5scCs t|dS(NtDYLD_LIBRARY_PATH(R(R((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pytdyld_library_path8scCs t|dS(NtDYLD_FALLBACK_FRAMEWORK_PATH(R(R((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pytdyld_fallback_framework_path;scCs t|dS(NtDYLD_FALLBACK_LIBRARY_PATH(R(R((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pytdyld_fallback_library_path>scCs2t|}|dkr|S||d}|S(s>For a potential path iterator, add DYLD_IMAGE_SUFFIX semanticscssMxF|D]>}|jdr7|td |dVn ||V|VqWdS(Ns.dylib(tendswithtlen(titeratortsuffixtpath((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pyt_injectFs   N(RR (R!RR"R$((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pytdyld_image_suffix_searchAs   ccst|}|dk rJx/t|D]}tjj||dVq%Wnx4t|D]&}tjj|tjj|VqWWdS(Ntname(RR RR R#tjoinRtbasename(R&Rt frameworkR#((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pytdyld_override_searchOs   ccs@|jdr<|dk r<tjj||tdVndS(Ns@executable_path/(t startswithR R R#R'R (R&texecutable_path((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pytdyld_executable_path_search`sccs|Vt|}|dk rUt|}x)|D]}tjj||dVq0Wnt|}x.|D]&}tjj|tjj|VqhW|dk r| rx)tD]}tjj||dVqWn|s x1t D]&}tjj|tjj|VqWndS(NR&( RR RR R#R'RR(tDEFAULT_FRAMEWORK_FALLBACKtDEFAULT_LIBRARY_FALLBACK(R&RR)tfallback_framework_pathR#tfallback_library_path((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pytdyld_default_searchgs      $  cCst|}t|}xTttt||t||t|||D]}tjj|rO|SqOWt d|fdS(s: Find a library or framework using dyld semantics sdylib %s could not be foundN( R R%tchainR*R-R2R R#tisfilet ValueError(R&R,RR#((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pyR}s      cCsyt|d|d|SWntk r/}nX|jd}|dkrdt|}|d7}ntjj|tjj|| }yt|d|d|SWntk r|nXdS(s Find a framework using dyld semantics in a very loose manner. Will take input such as: Python Python.framework Python.framework/Versions/Current R,Rs .frameworkiN(RR5trfindR R R#R'R((tfnR,Rtet fmwk_index((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pyRs    % cCs:i}tddksttddks6tdS(NslibSystem.dylibs/usr/lib/libSystem.dylibsSystem.framework/Systems2/System/Library/Frameworks/System.framework/System(RtAssertionError(R((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pyttest_dyld_findst__main__(t__doc__R R)RtdylibRt itertoolst__all__R#t expanduserR.R/R RR RRRRRR%R*R-R2RRR;t__name__(((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pyts<                  PK!UrA A macholib/framework.pycnu[ pfc@sVdZddlZdgZejdZdZdZedkrRendS(s% Generic framework path manipulation iNtframework_infos(?x) (?P^.*)(?:^|/) (?P (?P\w+).framework/ (?:Versions/(?P[^/]+)/)? (?P=shortname) (?:_(?P[^_]+))? )$ cCs#tj|}|sdS|jS(s} A framework name can take one of the following four forms: Location/Name.framework/Versions/SomeVersion/Name_Suffix Location/Name.framework/Versions/SomeVersion/Name Location/Name.framework/Name_Suffix Location/Name.framework/Name returns None if not found, or a mapping equivalent to: dict( location='Location', name='Name.framework/Versions/SomeVersion/Name_Suffix', shortname='Name', version='SomeVersion', suffix='Suffix', ) Note that SomeVersion and Suffix are optional and may be None if not present N(tSTRICT_FRAMEWORK_REtmatchtNonet groupdict(tfilenamet is_framework((s1/usr/lib64/python2.7/ctypes/macholib/framework.pyRscCsKdddddd}tddks0ttddksHttddks`ttddksxttd|ddd ksttd |dd d d d ksttddksttddksttd|ddd dksttd|ddd dd ksGtdS(Nc Ss%td|d|d|d|d|S(Ntlocationtnamet shortnametversiontsuffix(tdict(RRR R R ((s1/usr/lib64/python2.7/ctypes/macholib/framework.pytd0s scompletely/invalidscompletely/invalid/_debugs P/F.frameworksP/F.framework/_debugsP/F.framework/FtPs F.framework/FtFsP/F.framework/F_debugsF.framework/F_debugR tdebugsP/F.framework/VersionssP/F.framework/Versions/AsP/F.framework/Versions/A/FsF.framework/Versions/A/FtAs P/F.framework/Versions/A/F_debugsF.framework/Versions/A/F_debug(RRtAssertionError(R ((s1/usr/lib64/python2.7/ctypes/macholib/framework.pyttest_framework_info/s$*'t__main__(t__doc__tret__all__tcompileRRRt__name__(((s1/usr/lib64/python2.7/ctypes/macholib/framework.pyts      PK!K CTTmacholib/fetch_macholibnuȯ#!/bin/sh svn export --force http://svn.red-bean.com/bob/macholib/trunk/macholib/ . PK![D macholib/dylib.pycnu[ pfc@sVdZddlZdgZejdZdZdZedkrRendS(s! Generic dylib path manipulation iNt dylib_infos(?x) (?P^.*)(?:^|/) (?P (?P\w+?) (?:\.(?P[^._]+))? (?:_(?P[^._]+))? \.dylib$ ) cCs#tj|}|sdS|jS(s1 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(tDYLIB_REtmatchtNonet groupdict(tfilenametis_dylib((s-/usr/lib64/python2.7/ctypes/macholib/dylib.pyRscCsdddddd}tddks0ttddksHttd|dddkslttd|dd dd d ksttd |dd ddksttd|ddddksttd|ddddd kstdS(Nc Ss%td|d|d|d|d|S(Ntlocationtnamet shortnametversiontsuffix(tdict(RRR R R ((s-/usr/lib64/python2.7/ctypes/macholib/dylib.pytd1s scompletely/invalidscompletely/invalide_debugs P/Foo.dylibtPs Foo.dylibtFoosP/Foo_debug.dylibsFoo_debug.dylibR tdebugs P/Foo.A.dylibs Foo.A.dylibtAsP/Foo_debug.A.dylibsFoo_debug.A.dylibt Foo_debugsP/Foo.A_debug.dylibsFoo.A_debug.dylib(RRtAssertionError(R ((s-/usr/lib64/python2.7/ctypes/macholib/dylib.pyttest_dylib_info0s$*''t__main__(t__doc__tret__all__tcompileRRRt__name__(((s-/usr/lib64/python2.7/ctypes/macholib/dylib.pyts      PK!yDSSmacholib/framework.pyonu[ pfc@sVdZddlZdgZejdZdZdZedkrRendS(s% Generic framework path manipulation iNtframework_infos(?x) (?P^.*)(?:^|/) (?P (?P\w+).framework/ (?:Versions/(?P[^/]+)/)? (?P=shortname) (?:_(?P[^_]+))? )$ cCs#tj|}|sdS|jS(s} A framework name can take one of the following four forms: Location/Name.framework/Versions/SomeVersion/Name_Suffix Location/Name.framework/Versions/SomeVersion/Name Location/Name.framework/Name_Suffix Location/Name.framework/Name returns None if not found, or a mapping equivalent to: dict( location='Location', name='Name.framework/Versions/SomeVersion/Name_Suffix', shortname='Name', version='SomeVersion', suffix='Suffix', ) Note that SomeVersion and Suffix are optional and may be None if not present N(tSTRICT_FRAMEWORK_REtmatchtNonet groupdict(tfilenamet is_framework((s1/usr/lib64/python2.7/ctypes/macholib/framework.pyRscCsdddddd}dS(Nc Ss%td|d|d|d|d|S(Ntlocationtnamet shortnametversiontsuffix(tdict(RRR R R ((s1/usr/lib64/python2.7/ctypes/macholib/framework.pytd0s (R(R ((s1/usr/lib64/python2.7/ctypes/macholib/framework.pyttest_framework_info/st__main__(t__doc__tret__all__tcompileRRRt__name__(((s1/usr/lib64/python2.7/ctypes/macholib/framework.pyts      PK!Vd  _endian.pyonu[ pfc@sddlZddlTeeZdZdeefdYZejdkr{dZ eZ defd YZ n@ejd krd Z eZ d efd YZ n e ddS(iN(t*cCsft|trt|tSt|tr?t|j|jSt|t rR|St d|dS(sReturn the type with the 'other' byte order. Simple types like c_int and so on already have __ctype_be__ and __ctype_le__ attributes which contain the types, for more complicated types arrays and structures are supported. s+This type does not support other endian: %sN( thasattrt _OTHER_ENDIANtgetattrt isinstancet _array_typet _other_endiant_type_t_length_t issubclasst Structuret TypeError(ttyp((s&/usr/lib64/python2.7/ctypes/_endian.pyR s t _swapped_metacBseZdZRS(cCs|dkrgg}xI|D]A}|d}|d}|d}|j|t|f|qW|}ntt|j||dS(Nt_fields_iii(tappendRtsuperR t __setattr__(tselftattrnametvaluetfieldstdesctnameR trest((s&/usr/lib64/python2.7/ctypes/_endian.pyRs     ! (t__name__t __module__R(((s&/usr/lib64/python2.7/ctypes/_endian.pyR stlittlet __ctype_be__tBigEndianStructurecBseZdZeZdZRS(s$Structure with big endian byte orderN(RRt__doc__R t __metaclass__tNonet_swappedbytes_(((s&/usr/lib64/python2.7/ctypes/_endian.pyR1stbigt __ctype_le__tLittleEndianStructurecBseZdZeZdZRS(s'Structure with little endian byte orderN(RRRR RR R!(((s&/usr/lib64/python2.7/ctypes/_endian.pyR$:ssInvalid byteorder( tsystctypesttypetArrayRRR R t byteorderRR$Rt RuntimeError(((s&/usr/lib64/python2.7/ctypes/_endian.pyts    PK!l7676util.pynu[import os import shutil import subprocess import sys # find_library(name) returns the pathname of a library, or None. if os.name == "nt": def _get_build_version(): """Return the version of MSVC that was used to build Python. For Python 2.3 and up, the version number is included in sys.version. For earlier versions, assume the compiler is MSVC 6. """ # This function was copied from Lib/distutils/msvccompiler.py prefix = "MSC v." i = sys.version.find(prefix) if i == -1: return 6 i = i + len(prefix) s, rest = sys.version[i:].split(" ", 1) majorVersion = int(s[:-2]) - 6 if majorVersion >= 13: majorVersion += 1 minorVersion = int(s[2:3]) / 10.0 # I don't think paths are affected by minor version in version 6 if majorVersion == 6: minorVersion = 0 if majorVersion >= 6: return majorVersion + minorVersion # else we don't know what version of the compiler this is return None def find_msvcrt(): """Return the name of the VC runtime dll""" version = _get_build_version() if version is None: # better be safe than sorry return None if version <= 6: clibname = 'msvcrt' elif version <= 13: clibname = 'msvcr%d' % (version * 10) else: # CRT is no longer directly loadable. See issue23606 for the # discussion about alternative approaches. return None # If python was built with in debug mode import importlib.machinery if '_d.pyd' in importlib.machinery.EXTENSION_SUFFIXES: clibname += 'd' return clibname+'.dll' def find_library(name): if name in ('c', 'm'): return find_msvcrt() # See MSDN for the REAL search order. for directory in os.environ['PATH'].split(os.pathsep): fname = os.path.join(directory, name) if os.path.isfile(fname): return fname if fname.lower().endswith(".dll"): continue fname = fname + ".dll" if os.path.isfile(fname): return fname return None elif os.name == "posix" and sys.platform == "darwin": from ctypes.macholib.dyld import dyld_find as _dyld_find def find_library(name): possible = ['lib%s.dylib' % name, '%s.dylib' % name, '%s.framework/%s' % (name, name)] for name in possible: try: return _dyld_find(name) except ValueError: continue return None elif sys.platform.startswith("aix"): # AIX has two styles of storing shared libraries # GNU auto_tools refer to these as svr4 and aix # svr4 (System V Release 4) is a regular file, often with .so as suffix # AIX style uses an archive (suffix .a) with members (e.g., shr.o, libssl.so) # see issue#26439 and _aix.py for more details from ctypes._aix import find_library elif os.name == "posix": # Andreas Degert's find functions, using gcc, /sbin/ldconfig, objdump import re, tempfile def _is_elf(filename): "Return True if the given file is an ELF file" elf_header = b'\x7fELF' with open(filename, 'br') as thefile: return thefile.read(4) == elf_header def _findLib_gcc(name): # Run GCC's linker with the -t (aka --trace) option and examine the # library name it prints out. The GCC command will fail because we # haven't supplied a proper program with main(), but that does not # matter. expr = os.fsencode(r'[^\(\)\s]*lib%s\.[^\(\)\s]*' % re.escape(name)) c_compiler = shutil.which('gcc') if not c_compiler: c_compiler = shutil.which('cc') if not c_compiler: # No C compiler available, give up return None temp = tempfile.NamedTemporaryFile() try: args = [c_compiler, '-Wl,-t', '-o', temp.name, '-l' + name] env = dict(os.environ) env['LC_ALL'] = 'C' env['LANG'] = 'C' try: proc = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=env) except OSError: # E.g. bad executable return None with proc: trace = proc.stdout.read() finally: try: temp.close() except FileNotFoundError: # Raised if the file was already removed, which is the normal # behaviour of GCC if linking fails pass res = re.findall(expr, trace) if not res: return None for file in res: # Check if the given file is an elf file: gcc can report # some files that are linker scripts and not actual # shared objects. See bpo-41976 for more details if not _is_elf(file): continue return os.fsdecode(file) if sys.platform == "sunos5": # use /usr/ccs/bin/dump on solaris def _get_soname(f): if not f: return None try: proc = subprocess.Popen(("/usr/ccs/bin/dump", "-Lpv", f), stdout=subprocess.PIPE, stderr=subprocess.DEVNULL) except OSError: # E.g. command not found return None with proc: data = proc.stdout.read() res = re.search(br'\[.*\]\sSONAME\s+([^\s]+)', data) if not res: return None return os.fsdecode(res.group(1)) else: def _get_soname(f): # assuming GNU binutils / ELF if not f: return None objdump = shutil.which('objdump') if not objdump: # objdump is not available, give up return None try: proc = subprocess.Popen((objdump, '-p', '-j', '.dynamic', f), stdout=subprocess.PIPE, stderr=subprocess.DEVNULL) except OSError: # E.g. bad executable return None with proc: dump = proc.stdout.read() res = re.search(br'\sSONAME\s+([^\s]+)', dump) if not res: return None return os.fsdecode(res.group(1)) if sys.platform.startswith(("freebsd", "openbsd", "dragonfly")): def _num_version(libname): # "libxyz.so.MAJOR.MINOR" => [ MAJOR, MINOR ] parts = libname.split(b".") nums = [] try: while parts: nums.insert(0, int(parts.pop())) except ValueError: pass return nums or [sys.maxsize] def find_library(name): ename = re.escape(name) expr = r':-l%s\.\S+ => \S*/(lib%s\.\S+)' % (ename, ename) expr = os.fsencode(expr) try: proc = subprocess.Popen(('/sbin/ldconfig', '-r'), stdout=subprocess.PIPE, stderr=subprocess.DEVNULL) except OSError: # E.g. command not found data = b'' else: with proc: data = proc.stdout.read() res = re.findall(expr, data) if not res: return _get_soname(_findLib_gcc(name)) res.sort(key=_num_version) return os.fsdecode(res[-1]) elif sys.platform == "sunos5": def _findLib_crle(name, is64): if not os.path.exists('/usr/bin/crle'): return None env = dict(os.environ) env['LC_ALL'] = 'C' if is64: args = ('/usr/bin/crle', '-64') else: args = ('/usr/bin/crle',) paths = None try: proc = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, env=env) except OSError: # E.g. bad executable return None with proc: for line in proc.stdout: line = line.strip() if line.startswith(b'Default Library Path (ELF):'): paths = os.fsdecode(line).split()[4] if not paths: return None for dir in paths.split(":"): libfile = os.path.join(dir, "lib%s.so" % name) if os.path.exists(libfile): return libfile return None def find_library(name, is64 = False): return _get_soname(_findLib_crle(name, is64) or _findLib_gcc(name)) else: def _findSoname_ldconfig(name): import struct if struct.calcsize('l') == 4: machine = os.uname().machine + '-32' else: machine = os.uname().machine + '-64' mach_map = { 'x86_64-64': 'libc6,x86-64', 'ppc64-64': 'libc6,64bit', 'sparc64-64': 'libc6,64bit', 's390x-64': 'libc6,64bit', 'ia64-64': 'libc6,IA-64', } abi_type = mach_map.get(machine, 'libc6') # XXX assuming GLIBC's ldconfig (with option -p) regex = r'\s+(lib%s\.[^\s]+)\s+\(%s' regex = os.fsencode(regex % (re.escape(name), abi_type)) try: with subprocess.Popen(['/sbin/ldconfig', '-p'], stdin=subprocess.DEVNULL, stderr=subprocess.DEVNULL, stdout=subprocess.PIPE, env={'LC_ALL': 'C', 'LANG': 'C'}) as p: res = re.search(regex, p.stdout.read()) if res: return os.fsdecode(res.group(1)) except OSError: pass def _findLib_ld(name): # See issue #9998 for why this is needed expr = r'[^\(\)\s]*lib%s\.[^\(\)\s]*' % re.escape(name) cmd = ['ld', '-t'] libpath = os.environ.get('LD_LIBRARY_PATH') if libpath: for d in libpath.split(':'): cmd.extend(['-L', d]) cmd.extend(['-o', os.devnull, '-l%s' % name]) result = None try: p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True) out, _ = p.communicate() res = re.findall(expr, os.fsdecode(out)) for file in res: # Check if the given file is an elf file: gcc can report # some files that are linker scripts and not actual # shared objects. See bpo-41976 for more details if not _is_elf(file): continue return os.fsdecode(file) except Exception: pass # result will be None return result def find_library(name): # See issue #9998 return _findSoname_ldconfig(name) or \ _get_soname(_findLib_gcc(name)) or _get_soname(_findLib_ld(name)) ################################################################ # test code def test(): from ctypes import cdll if os.name == "nt": print(cdll.msvcrt) print(cdll.load("msvcrt")) print(find_library("msvcrt")) if os.name == "posix": # find and load_version print(find_library("m")) print(find_library("c")) print(find_library("bz2")) # load if sys.platform == "darwin": print(cdll.LoadLibrary("libm.dylib")) print(cdll.LoadLibrary("libcrypto.dylib")) print(cdll.LoadLibrary("libSystem.dylib")) print(cdll.LoadLibrary("System.framework/System")) # issue-26439 - fix broken test call for AIX elif sys.platform.startswith("aix"): from ctypes import CDLL if sys.maxsize < 2**32: print(f"Using CDLL(name, os.RTLD_MEMBER): {CDLL('libc.a(shr.o)', os.RTLD_MEMBER)}") print(f"Using cdll.LoadLibrary(): {cdll.LoadLibrary('libc.a(shr.o)')}") # librpm.so is only available as 32-bit shared library print(find_library("rpm")) print(cdll.LoadLibrary("librpm.so")) else: print(f"Using CDLL(name, os.RTLD_MEMBER): {CDLL('libc.a(shr_64.o)', os.RTLD_MEMBER)}") print(f"Using cdll.LoadLibrary(): {cdll.LoadLibrary('libc.a(shr_64.o)')}") print(f"crypt\t:: {find_library('crypt')}") print(f"crypt\t:: {cdll.LoadLibrary(find_library('crypt'))}") print(f"crypto\t:: {find_library('crypto')}") print(f"crypto\t:: {cdll.LoadLibrary(find_library('crypto'))}") else: print(cdll.LoadLibrary("libm.so")) print(cdll.LoadLibrary("libcrypt.so")) print(find_library("crypt")) if __name__ == "__main__": test() PK! wintypes.pynu[# The most useful windows datatypes import ctypes BYTE = ctypes.c_byte WORD = ctypes.c_ushort DWORD = ctypes.c_ulong #UCHAR = ctypes.c_uchar CHAR = ctypes.c_char WCHAR = ctypes.c_wchar UINT = ctypes.c_uint INT = ctypes.c_int DOUBLE = ctypes.c_double FLOAT = ctypes.c_float BOOLEAN = BYTE BOOL = ctypes.c_long class VARIANT_BOOL(ctypes._SimpleCData): _type_ = "v" def __repr__(self): return "%s(%r)" % (self.__class__.__name__, self.value) ULONG = ctypes.c_ulong LONG = ctypes.c_long USHORT = ctypes.c_ushort SHORT = ctypes.c_short # in the windows header files, these are structures. _LARGE_INTEGER = LARGE_INTEGER = ctypes.c_longlong _ULARGE_INTEGER = ULARGE_INTEGER = ctypes.c_ulonglong LPCOLESTR = LPOLESTR = OLESTR = ctypes.c_wchar_p LPCWSTR = LPWSTR = ctypes.c_wchar_p LPCSTR = LPSTR = ctypes.c_char_p LPCVOID = LPVOID = ctypes.c_void_p # WPARAM is defined as UINT_PTR (unsigned type) # LPARAM is defined as LONG_PTR (signed type) if ctypes.sizeof(ctypes.c_long) == ctypes.sizeof(ctypes.c_void_p): WPARAM = ctypes.c_ulong LPARAM = ctypes.c_long elif ctypes.sizeof(ctypes.c_longlong) == ctypes.sizeof(ctypes.c_void_p): WPARAM = ctypes.c_ulonglong LPARAM = ctypes.c_longlong ATOM = WORD LANGID = WORD COLORREF = DWORD LGRPID = DWORD LCTYPE = DWORD LCID = DWORD ################################################################ # HANDLE types HANDLE = ctypes.c_void_p # in the header files: void * HACCEL = HANDLE HBITMAP = HANDLE HBRUSH = HANDLE HCOLORSPACE = HANDLE HDC = HANDLE HDESK = HANDLE HDWP = HANDLE HENHMETAFILE = HANDLE HFONT = HANDLE HGDIOBJ = HANDLE HGLOBAL = HANDLE HHOOK = HANDLE HICON = HANDLE HINSTANCE = HANDLE HKEY = HANDLE HKL = HANDLE HLOCAL = HANDLE HMENU = HANDLE HMETAFILE = HANDLE HMODULE = HANDLE HMONITOR = HANDLE HPALETTE = HANDLE HPEN = HANDLE HRGN = HANDLE HRSRC = HANDLE HSTR = HANDLE HTASK = HANDLE HWINSTA = HANDLE HWND = HANDLE SC_HANDLE = HANDLE SERVICE_STATUS_HANDLE = HANDLE ################################################################ # Some important structure definitions class RECT(ctypes.Structure): _fields_ = [("left", LONG), ("top", LONG), ("right", LONG), ("bottom", LONG)] tagRECT = _RECTL = RECTL = RECT class _SMALL_RECT(ctypes.Structure): _fields_ = [('Left', SHORT), ('Top', SHORT), ('Right', SHORT), ('Bottom', SHORT)] SMALL_RECT = _SMALL_RECT class _COORD(ctypes.Structure): _fields_ = [('X', SHORT), ('Y', SHORT)] class POINT(ctypes.Structure): _fields_ = [("x", LONG), ("y", LONG)] tagPOINT = _POINTL = POINTL = POINT class SIZE(ctypes.Structure): _fields_ = [("cx", LONG), ("cy", LONG)] tagSIZE = SIZEL = SIZE def RGB(red, green, blue): return red + (green << 8) + (blue << 16) class FILETIME(ctypes.Structure): _fields_ = [("dwLowDateTime", DWORD), ("dwHighDateTime", DWORD)] _FILETIME = FILETIME class MSG(ctypes.Structure): _fields_ = [("hWnd", HWND), ("message", UINT), ("wParam", WPARAM), ("lParam", LPARAM), ("time", DWORD), ("pt", POINT)] tagMSG = MSG MAX_PATH = 260 class WIN32_FIND_DATAA(ctypes.Structure): _fields_ = [("dwFileAttributes", DWORD), ("ftCreationTime", FILETIME), ("ftLastAccessTime", FILETIME), ("ftLastWriteTime", FILETIME), ("nFileSizeHigh", DWORD), ("nFileSizeLow", DWORD), ("dwReserved0", DWORD), ("dwReserved1", DWORD), ("cFileName", CHAR * MAX_PATH), ("cAlternateFileName", CHAR * 14)] class WIN32_FIND_DATAW(ctypes.Structure): _fields_ = [("dwFileAttributes", DWORD), ("ftCreationTime", FILETIME), ("ftLastAccessTime", FILETIME), ("ftLastWriteTime", FILETIME), ("nFileSizeHigh", DWORD), ("nFileSizeLow", DWORD), ("dwReserved0", DWORD), ("dwReserved1", DWORD), ("cFileName", WCHAR * MAX_PATH), ("cAlternateFileName", WCHAR * 14)] ################################################################ # Pointer types LPBOOL = PBOOL = ctypes.POINTER(BOOL) PBOOLEAN = ctypes.POINTER(BOOLEAN) LPBYTE = PBYTE = ctypes.POINTER(BYTE) PCHAR = ctypes.POINTER(CHAR) LPCOLORREF = ctypes.POINTER(COLORREF) LPDWORD = PDWORD = ctypes.POINTER(DWORD) LPFILETIME = PFILETIME = ctypes.POINTER(FILETIME) PFLOAT = ctypes.POINTER(FLOAT) LPHANDLE = PHANDLE = ctypes.POINTER(HANDLE) PHKEY = ctypes.POINTER(HKEY) LPHKL = ctypes.POINTER(HKL) LPINT = PINT = ctypes.POINTER(INT) PLARGE_INTEGER = ctypes.POINTER(LARGE_INTEGER) PLCID = ctypes.POINTER(LCID) LPLONG = PLONG = ctypes.POINTER(LONG) LPMSG = PMSG = ctypes.POINTER(MSG) LPPOINT = PPOINT = ctypes.POINTER(POINT) PPOINTL = ctypes.POINTER(POINTL) LPRECT = PRECT = ctypes.POINTER(RECT) LPRECTL = PRECTL = ctypes.POINTER(RECTL) LPSC_HANDLE = ctypes.POINTER(SC_HANDLE) PSHORT = ctypes.POINTER(SHORT) LPSIZE = PSIZE = ctypes.POINTER(SIZE) LPSIZEL = PSIZEL = ctypes.POINTER(SIZEL) PSMALL_RECT = ctypes.POINTER(SMALL_RECT) LPUINT = PUINT = ctypes.POINTER(UINT) PULARGE_INTEGER = ctypes.POINTER(ULARGE_INTEGER) PULONG = ctypes.POINTER(ULONG) PUSHORT = ctypes.POINTER(USHORT) PWCHAR = ctypes.POINTER(WCHAR) LPWIN32_FIND_DATAA = PWIN32_FIND_DATAA = ctypes.POINTER(WIN32_FIND_DATAA) LPWIN32_FIND_DATAW = PWIN32_FIND_DATAW = ctypes.POINTER(WIN32_FIND_DATAW) LPWORD = PWORD = ctypes.POINTER(WORD) PK!FpCC wintypes.pycnu[ pfcZ@sddlTeZeZeZeZe Z e Z e ZeZeZeZddlmZdefdYZeZeZeZeZeZZeZZ e!Z"Z#Z$e!Z%Z&e'Z(Z)e*Z+Z,e-ee-e*kreZ.eZ/n'e-ee-e*kreZ.eZ/neZ0eZ1eZ2eZ3eZ4eZ5e*Z6e6Z7e6Z8e6Z9e6Z:e6Z;e6Z<e6Z=e6Z>e6Z?e6Z@e6ZAe6ZBe6ZCe6ZDe6ZEe6ZFe6ZGe6ZHe6ZIe6ZJe6ZKe6ZLe6ZMe6ZNe6ZOe6ZPe6ZQe6ZRe6ZSe6ZTe6ZUdeVfdYZWeWZXZYZZdeVfdYZ[e[Z\d eVfd YZ]d eVfd YZ^e^Z_Z`Zad eVfdYZbebZcZddZedeVfdYZfefZgdeVfdYZhehZidZjdeVfdYZkdeVfdYZlddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOddPd dQddRdSdTdUdVd dWdXdYdZd[d\dd]ddd^d_d d`dadbdcddddedfdgdhgZZmdiS(ji(t*(t _SimpleCDatat VARIANT_BOOLcBseZdZdZRS(tvcCsd|jj|jfS(Ns%s(%r)(t __class__t__name__tvalue(tself((s'/usr/lib64/python2.7/ctypes/wintypes.pyt__repr__s(Rt __module__t_type_R(((s'/usr/lib64/python2.7/ctypes/wintypes.pyRstRECTcBs2eZdefdefdefdefgZRS(tleftttoptrighttbottom(RR tc_longt_fields_(((s'/usr/lib64/python2.7/ctypes/wintypes.pyR ds   t _SMALL_RECTcBs2eZdefdefdefdefgZRS(tLefttToptRighttBottom(RR tc_shortR(((s'/usr/lib64/python2.7/ctypes/wintypes.pyRks   t_COORDcBs eZdefdefgZRS(tXtY(RR RR(((s'/usr/lib64/python2.7/ctypes/wintypes.pyRrs tPOINTcBs eZdefdefgZRS(txty(RR RR(((s'/usr/lib64/python2.7/ctypes/wintypes.pyRvs tSIZEcBs eZdefdefgZRS(tcxtcy(RR RR(((s'/usr/lib64/python2.7/ctypes/wintypes.pyR{s cCs||d>|d>S(Nii((tredtgreentblue((s'/usr/lib64/python2.7/ctypes/wintypes.pytRGBstFILETIMEcBs eZdefdefgZRS(t dwLowDateTimetdwHighDateTime(RR tDWORDR(((s'/usr/lib64/python2.7/ctypes/wintypes.pyR%s tMSGcBsDeZdefdefdefdefdefdefgZRS(thWndtmessagetwParamtlParamttimetpt( RR tHWNDtc_uinttWPARAMtLPARAMR(RR(((s'/usr/lib64/python2.7/ctypes/wintypes.pyR)s      itWIN32_FIND_DATAAc BspeZdefdefdefdefdefdefdefdefdeefd ed fg ZRS( tdwFileAttributestftCreationTimetftLastAccessTimetftLastWriteTimet nFileSizeHight nFileSizeLowt dwReserved0t dwReserved1t cFileNametcAlternateFileNamei(RR R(R%tc_chartMAX_PATHR(((s'/usr/lib64/python2.7/ctypes/wintypes.pyR4s         tWIN32_FIND_DATAWc BspeZdefdefdefdefdefdefdefdefdeefd ed fg ZRS( R5R6R7R8R9R:R;R<R=R>i(RR R(R%tc_wcharR@R(((s'/usr/lib64/python2.7/ctypes/wintypes.pyRAs         tATOMtBOOLtBOOLEANtBYTEtCOLORREFtDOUBLER(tFLOATtHACCELtHANDLEtHBITMAPtHBRUSHt HCOLORSPACEtHDCtHDESKtHDWPt HENHMETAFILEtHFONTtHGDIOBJtHGLOBALtHHOOKtHICONt HINSTANCEtHKEYtHKLtHLOCALtHMENUt HMETAFILEtHMODULEtHMONITORtHPALETTEtHPENtHRGNtHRSRCtHSTRtHTASKtHWINSTAR0tINTtLANGIDt LARGE_INTEGERtLCIDtLCTYPEtLGRPIDtLONGR3t LPCOLESTRtLPCSTRtLPCVOIDtLPCWSTRtLPOLESTRtLPSTRtLPVOIDtLPWSTRR@tOLESTRtPOINTLtRECTLR$t SC_HANDLEtSERVICE_STATUS_HANDLEtSHORTtSIZELt SMALL_RECTtUINTtULARGE_INTEGERtULONGtUSHORTtWCHARtWORDR2t _FILETIMEt_LARGE_INTEGERt_POINTLt_RECTLt_ULARGE_INTEGERttagMSGttagPOINTttagRECTttagSIZEN(ntctypestc_byteRFtc_ushortRtc_ulongR(RBRR1R~tc_intRgtc_doubleRHtc_floatRIRERRDRRRRmRRR{t c_longlongRRit c_ulonglongRRt c_wchar_pRnRrRvRqRutc_char_pRoRstc_void_pRpRttsizeofR2R3RCRhRGRlRkRjRKRJRLRMRNRORPRQRRRSRTRURVRWRXRYRZR[R\R]R^R_R`RaRbRcRdReRfR0RyRzt StructureR RRRxRR}RRRRRwRRR|R$R%RR)RR@R4RAt__all__(((s'/usr/lib64/python2.7/ctypes/wintypes.pyts             PK!K94""util.pycnu[ pfc@sddlZddlZejdkrEdZdZdZnejdkr`dZnejdkrejd krdd lmZ d Znejdkrddl Z ddl Z ddl Z d Z ejd krdZn dZejjds0ejjds0ejjdrEdZdZqejd krldZedZqdZdZndZedkrendS(iNtntcCsd}tjj|}|dkr(dS|t|}tj|jdd\}}t|d d}t|dd!d }|dkrd }n|dkr||Sd S( sReturn the version of MSVC that was used to build Python. For Python 2.3 and up, the version number is included in sys.version. For earlier versions, assume the compiler is MSVC 6. sMSC v.iit iiiig$@iN(tsystversiontfindtlentsplittinttNone(tprefixtitstrestt majorVersiont minorVersion((s#/usr/lib64/python2.7/ctypes/util.pyt_get_build_version s    cCswt}|dkrdS|dkr.d}nd|d}ddl}|jdddkro|d 7}n|d S( s%Return the name of the VC runtime dllitmsvcrtsmsvcr%di iNis_d.pydtds.dll(RRtimpt get_suffixes(RtclibnameR((s#/usr/lib64/python2.7/ctypes/util.pyt find_msvcrt s      cCs|dkrtSxtjdjtjD]l}tjj||}tjj|r^|S|jj dryq-n|d}tjj|r-|Sq-WdS(NtctmtPATHs.dll(RR( RtostenvironRtpathseptpathtjointisfiletlowertendswithR(tnamet directorytfname((s#/usr/lib64/python2.7/ctypes/util.pyt find_library1s   tcecCs|S(N((R!((s#/usr/lib64/python2.7/ctypes/util.pyR$Gstposixtdarwin(t dyld_findcCs[d|d|d||fg}x3|D]+}yt|SWq(tk rRq(q(Xq(WdS(Ns lib%s.dylibs%s.dylibs%s.framework/%s(t _dyld_findt ValueErrorR(R!tpossible((s#/usr/lib64/python2.7/ctypes/util.pyR$Ls   c Csdtj|}tj\}}tj|d|d|}z3tj|}z|j}Wd|j}XWdytj|Wn+t k r}|j t j krqnXX|dkrt dntj ||} | sdS| jdS(Ns[^\(\)\s]*lib%s\.[^\(\)\s]*srif type gcc >/dev/null 2>&1; then CC=gcc; elif type cc >/dev/null 2>&1; then CC=cc;else exit 10; fi;$CC -Wl,-t -o s 2>&1 -li sgcc or cc command not foundi(tretescapettempfiletmkstempRtclosetpopentreadtunlinktOSErrorterrnotENOENTtsearchRtgroup( R!texprtfdouttccouttcmdtfttracetrvtetres((s#/usr/lib64/python2.7/ctypes/util.pyt _findLib_gcc[s(    tsunos5cCsj|s dSd|}tj|}z|j}Wd|jXtjd|}|s]dS|jdS(Ns#/usr/ccs/bin/dump -Lpv 2>/dev/null s\[.*\]\sSONAME\s+([^\s]+)i(RRR1R2R0R,R7R8(R=R<tdataRA((s#/usr/lib64/python2.7/ctypes/util.pyt _get_sonamews  cCs|s dSd|}tj|}|j}|j}|dkrWtjj|Stj|}z|j}Wd|jXtjd|}|sdS|j dS(NsWif ! type objdump >/dev/null 2>&1; then exit 10; fi;objdump -p -j .dynamic 2>/dev/null i s\sSONAME\s+([^\s]+)i( RRR1R2R0RtbasenameR,R7R8(R=R<tdumpR?RDRA((s#/usr/lib64/python2.7/ctypes/util.pyREs"    tfreebsdtopenbsdt dragonflycCsf|jd}g}y-x&|r@|jdt|jqWWntk rUnX|petjgS(Nt.i(RtinsertRtpopR*Rtmaxint(tlibnametpartstnums((s#/usr/lib64/python2.7/ctypes/util.pyt _num_versions $ cCstj|}d||f}tjd}z|j}Wd|jXtj||}|sttt|S|j dd|dS(Ns:-l%s\.\S+ => \S*/(lib%s\.\S+)s/sbin/ldconfig -r 2>/dev/nulltcmpcSstt|t|S(N(RSRR(txty((s#/usr/lib64/python2.7/ctypes/util.pytsi( R,R-RR1R2R0tfindallRERBtsort(R!tenameR9R=RDRA((s#/usr/lib64/python2.7/ctypes/util.pyR$s cCstjjdsdS|r%d}nd}xKtj|jD]4}|j}|jdrA|jd}qAqAW|sdSxF|jdD]5}tjj |d|}tjj|r|SqWdS(Ns /usr/bin/crles*env LC_ALL=C /usr/bin/crle -64 2>/dev/nulls&env LC_ALL=C /usr/bin/crle 2>/dev/nullsDefault Library Path (ELF):it:slib%s.so( RRtexistsRR1t readlineststript startswithRR(R!tis64R<tlinetpathstdirtlibfile((s#/usr/lib64/python2.7/ctypes/util.pyt _findLib_crles   cCstt||pt|S(N(RERdRB(R!R_((s#/usr/lib64/python2.7/ctypes/util.pyR$sc Csddl}|jddkr8tjdd}ntjdd}idd6dd 6dd 6dd 6d d 6}|j|d}dtj||f}tjd}z|j}Wd|j Xtj ||}|sdS|j dS(Nitlis-32s-64s libc6,x86-64s x86_64-64s libc6,64bitsppc64-64s sparc64-64ss390x-64s libc6,IA-64sia64-64tlibc6s\s+(lib%s\.[^\s]+)\s+\(%ss/sbin/ldconfig -p 2>/dev/nulli( tstructtcalcsizeRtunametgetR,R-R1R2R0R7RR8( R!Rgtmachinetmach_maptabi_typeR9R=RDRA((s#/usr/lib64/python2.7/ctypes/util.pyt_findSoname_ldconfigs(   cCst|ptt|S(N(RnRERB(R!((s#/usr/lib64/python2.7/ctypes/util.pyR$scCsddlm}tjdkrC|jGH|jdGHtdGHntjdkrtdGHtdGHtdGHtjd kr|j d GH|j d GH|j d GH|j d GHq|j dGH|j dGHtdGHndS(Ni(tcdllRRR&RRtbz2R's libm.dylibslibcrypto.dylibslibSystem.dylibsSystem.framework/Systemslibm.sos libcrypt.sotcrypt( tctypesRoRR!RtloadR$Rtplatformt LoadLibrary(Ro((s#/usr/lib64/python2.7/ctypes/util.pyttests"   t__main__(RRR!RRR$Rttctypes.macholib.dyldR(R)R,R.R5RBRER^RRRdtFalseRnRvt__name__(((s#/usr/lib64/python2.7/ctypes/util.pyts8     $         PK!kO9)__pycache__/wintypes.cpython-36.opt-1.pycnu[3 \@sddlZejZejZejZejZej Z ej Z ej ZejZejZeZejZGdddejZejZejZejZejZejZZej Z!Z"ej#Z$Z%Z&ej#Z'Z(ej)Z*Z+ej,Z-Z.ej/ejej/ej,krejZ0ejZ1n$ej/ejej/ej,krej Z0ejZ1eZ2eZ3eZ4eZ5eZ6eZ7ej,Z8e8Z9e8Z:e8Z;e8Ze8Z?e8Z@e8ZAe8ZBe8ZCe8ZDe8ZEe8ZFe8ZGe8ZHe8ZIe8ZJe8ZKe8ZLe8ZMe8ZNe8ZOe8ZPe8ZQe8ZRe8ZSe8ZTe8ZUe8ZVe8ZWGdddejXZYeYZZZ[Z\GdddejXZ]e]Z^Gdd d ejXZ_Gd d d ejXZ`e`ZaZbZcGd d d ejXZdedZeZfddZgGdddejXZhehZiGdddejXZjejZkdZlGdddejXZmGdddejXZnejoeZpZqejoeZrejoeZsZtejoeZuejoe4ZvejoeZwZxejoehZyZzejoeZ{ejoe8Z|Z}ejoeGZ~ejoeHZejoeZZejoeZejoe7ZejoeZZejoejZZejoe`ZZejoecZejoeYZZejoe\ZZejoeVZejoeZejoedZZejoefZZejoe^Zejoe ZZejoe"ZejoeZejoeZejoe ZejoemZZejoenZZejoeZZdS)Nc@seZdZdZddZdS) VARIANT_BOOLvcCsd|jj|jfS)Nz%s(%r)) __class____name__value)selfr /usr/lib64/python3.6/wintypes.py__repr__szVARIANT_BOOL.__repr__N)r __module__ __qualname__Z_type_r rrrr rsrc@s(eZdZdefdefdefdefgZdS)RECTlefttoprightZbottomN)rr r LONG_fields_rrrr r asr c@s(eZdZdefdefdefdefgZdS) _SMALL_RECTZLeftZTopZRightZBottomN)rr r SHORTrrrrr rhsrc@seZdZdefdefgZdS)_COORDXYN)rr r rrrrrr rosrc@seZdZdefdefgZdS)POINTxyN)rr r rrrrrr rssrc@seZdZdefdefgZdS)SIZEZcxZcyN)rr r rrrrrr rxsrcCs||d>|d>S)Nr)ZredZgreenZbluerrr RGB}src@seZdZdefdefgZdS)FILETIMEZ dwLowDateTimeZdwHighDateTimeN)rr r DWORDrrrrr rsrc@s4eZdZdefdefdefdefdefdefgZ dS)MSGZhWndmessageZwParamZlParamZtimeZptN) rr r HWNDUINTWPARAMLPARAMr rrrrrr r!s r!ic @sTeZdZdefdefdefdefdefdefdefdefd eefd ed fg Zd S) WIN32_FIND_DATAAdwFileAttributesftCreationTimeftLastAccessTimeftLastWriteTime nFileSizeHigh nFileSizeLow dwReserved0 dwReserved1 cFileNamecAlternateFileNameN)rr r r rCHARMAX_PATHrrrrr r's r'c @sTeZdZdefdefdefdefdefdefdefdefd eefd ed fg Zd S) WIN32_FIND_DATAWr(r)r*r+r,r-r.r/r0r1r2N)rr r r rWCHARr4rrrrr r5s r5)ZctypesZc_byteZBYTEZc_ushortZWORDZc_ulongr Zc_charr3Zc_wcharr6Zc_uintr$Zc_intZINTZc_doubleZDOUBLEZc_floatZFLOATZBOOLEANZc_longZBOOLZ _SimpleCDatarZULONGrZUSHORTZc_shortrZ c_longlongZ_LARGE_INTEGERZ LARGE_INTEGERZ c_ulonglongZ_ULARGE_INTEGERZULARGE_INTEGERZ c_wchar_pZ LPCOLESTRZLPOLESTRZOLESTRZLPCWSTRZLPWSTRZc_char_pZLPCSTRZLPSTRZc_void_pZLPCVOIDZLPVOIDZsizeofr%r&ZATOMZLANGIDZCOLORREFZLGRPIDZLCTYPEZLCIDZHANDLEZHACCELZHBITMAPZHBRUSHZ HCOLORSPACEZHDCZHDESKZHDWPZ HENHMETAFILEZHFONTZHGDIOBJZHGLOBALZHHOOKZHICONZ HINSTANCEZHKEYZHKLZHLOCALZHMENUZ HMETAFILEZHMODULEZHMONITORZHPALETTEZHPENZHRGNZHRSRCZHSTRZHTASKZHWINSTAr#Z SC_HANDLEZSERVICE_STATUS_HANDLEZ Structurer ZtagRECTZ_RECTLZRECTLrZ SMALL_RECTrrZtagPOINTZ_POINTLZPOINTLrZtagSIZEZSIZELrrZ _FILETIMEr!ZtagMSGr4r'r5ZPOINTERZLPBOOLZPBOOLZPBOOLEANZLPBYTEZPBYTEZPCHARZ LPCOLORREFZLPDWORDZPDWORDZ LPFILETIMEZ PFILETIMEZPFLOATZLPHANDLEZPHANDLEZPHKEYZLPHKLZLPINTZPINTZPLARGE_INTEGERZPLCIDZLPLONGZPLONGZLPMSGZPMSGZLPPOINTZPPOINTZPPOINTLZLPRECTZPRECTZLPRECTLZPRECTLZ LPSC_HANDLEZPSHORTZLPSIZEZPSIZEZLPSIZELZPSIZELZ PSMALL_RECTZLPUINTZPUINTZPULARGE_INTEGERZPULONGZPUSHORTZPWCHARZLPWIN32_FIND_DATAAZPWIN32_FIND_DATAAZLPWIN32_FIND_DATAWZPWIN32_FIND_DATAWZLPWORDZPWORDrrrr s                        PK!)__pycache__/wintypes.cpython-36.opt-2.pycnu[3 \@sddlZejZejZejZejZej Z ej Z ej ZejZejZeZejZGdddejZejZejZejZejZejZZej Z!Z"ej#Z$Z%Z&ej#Z'Z(ej)Z*Z+ej,Z-Z.ej/ejej/ej,krejZ0ejZ1n$ej/ejej/ej,krej Z0ejZ1eZ2eZ3eZ4eZ5eZ6eZ7ej,Z8e8Z9e8Z:e8Z;e8Ze8Z?e8Z@e8ZAe8ZBe8ZCe8ZDe8ZEe8ZFe8ZGe8ZHe8ZIe8ZJe8ZKe8ZLe8ZMe8ZNe8ZOe8ZPe8ZQe8ZRe8ZSe8ZTe8ZUe8ZVe8ZWGdddejXZYeYZZZ[Z\GdddejXZ]e]Z^Gdd d ejXZ_Gd d d ejXZ`e`ZaZbZcGd d d ejXZdedZeZfddZgGdddejXZhehZiGdddejXZjejZkdZlGdddejXZmGdddejXZnejoeZpZqejoeZrejoeZsZtejoeZuejoe4ZvejoeZwZxejoehZyZzejoeZ{ejoe8Z|Z}ejoeGZ~ejoeHZejoeZZejoeZejoe7ZejoeZZejoejZZejoe`ZZejoecZejoeYZZejoe\ZZejoeVZejoeZejoedZZejoefZZejoe^Zejoe ZZejoe"ZejoeZejoeZejoe ZejoemZZejoenZZejoeZZdS)Nc@seZdZdZddZdS) VARIANT_BOOLvcCsd|jj|jfS)Nz%s(%r)) __class____name__value)selfr'/usr/lib64/python3.6/ctypes/wintypes.py__repr__szVARIANT_BOOL.__repr__N)r __module__ __qualname__Z_type_r rrrr rsrc@s(eZdZdefdefdefdefgZdS)RECTlefttoprightZbottomN)rr r LONG_fields_rrrr r asr c@s(eZdZdefdefdefdefgZdS) _SMALL_RECTZLeftZTopZRightZBottomN)rr r SHORTrrrrr rhsrc@seZdZdefdefgZdS)_COORDXYN)rr r rrrrrr rosrc@seZdZdefdefgZdS)POINTxyN)rr r rrrrrr rssrc@seZdZdefdefgZdS)SIZEZcxZcyN)rr r rrrrrr rxsrcCs||d>|d>S)Nr)ZredZgreenZbluerrr RGB}src@seZdZdefdefgZdS)FILETIMEZ dwLowDateTimeZdwHighDateTimeN)rr r DWORDrrrrr rsrc@s4eZdZdefdefdefdefdefdefgZ dS)MSGZhWndmessageZwParamZlParamZtimeZptN) rr r HWNDUINTWPARAMLPARAMr rrrrrr r!s r!ic @sTeZdZdefdefdefdefdefdefdefdefd eefd ed fg Zd S) WIN32_FIND_DATAAdwFileAttributesftCreationTimeftLastAccessTimeftLastWriteTime nFileSizeHigh nFileSizeLow dwReserved0 dwReserved1 cFileNamecAlternateFileNameN)rr r r rCHARMAX_PATHrrrrr r's r'c @sTeZdZdefdefdefdefdefdefdefdefd eefd ed fg Zd S) WIN32_FIND_DATAWr(r)r*r+r,r-r.r/r0r1r2N)rr r r rWCHARr4rrrrr r5s r5)ZctypesZc_byteZBYTEZc_ushortZWORDZc_ulongr Zc_charr3Zc_wcharr6Zc_uintr$Zc_intZINTZc_doubleZDOUBLEZc_floatZFLOATZBOOLEANZc_longZBOOLZ _SimpleCDatarZULONGrZUSHORTZc_shortrZ c_longlongZ_LARGE_INTEGERZ LARGE_INTEGERZ c_ulonglongZ_ULARGE_INTEGERZULARGE_INTEGERZ c_wchar_pZ LPCOLESTRZLPOLESTRZOLESTRZLPCWSTRZLPWSTRZc_char_pZLPCSTRZLPSTRZc_void_pZLPCVOIDZLPVOIDZsizeofr%r&ZATOMZLANGIDZCOLORREFZLGRPIDZLCTYPEZLCIDZHANDLEZHACCELZHBITMAPZHBRUSHZ HCOLORSPACEZHDCZHDESKZHDWPZ HENHMETAFILEZHFONTZHGDIOBJZHGLOBALZHHOOKZHICONZ HINSTANCEZHKEYZHKLZHLOCALZHMENUZ HMETAFILEZHMODULEZHMONITORZHPALETTEZHPENZHRGNZHRSRCZHSTRZHTASKZHWINSTAr#Z SC_HANDLEZSERVICE_STATUS_HANDLEZ Structurer ZtagRECTZ_RECTLZRECTLrZ SMALL_RECTrrZtagPOINTZ_POINTLZPOINTLrZtagSIZEZSIZELrrZ _FILETIMEr!ZtagMSGr4r'r5ZPOINTERZLPBOOLZPBOOLZPBOOLEANZLPBYTEZPBYTEZPCHARZ LPCOLORREFZLPDWORDZPDWORDZ LPFILETIMEZ PFILETIMEZPFLOATZLPHANDLEZPHANDLEZPHKEYZLPHKLZLPINTZPINTZPLARGE_INTEGERZPLCIDZLPLONGZPLONGZLPMSGZPMSGZLPPOINTZPPOINTZPPOINTLZLPRECTZPRECTZLPRECTLZPRECTLZ LPSC_HANDLEZPSHORTZLPSIZEZPSIZEZLPSIZELZPSIZELZ PSMALL_RECTZLPUINTZPUINTZPULARGE_INTEGERZPULONGZPUSHORTZPWCHARZLPWIN32_FIND_DATAAZPWIN32_FIND_DATAAZLPWIN32_FIND_DATAWZPWIN32_FIND_DATAWZLPWORDZPWORDrrrr s                        PK!.,,(__pycache__/_endian.cpython-36.opt-2.pycnu[3 \@sddlZddlTeeZddZGdddeeZejdkr\dZ eZ Gd d d eed Z n0ejd krd Z eZ Gdddeed Z ne ddS)N)*cCsLt|trt|tSt|tr.t|j|jSt|t r<|St d|dS)Nz+This type does not support other endian: %s) hasattr _OTHER_ENDIANgetattr isinstance _array_type _other_endianZ_type_Z_length_ issubclass Structure TypeError)typr &/usr/lib64/python3.6/ctypes/_endian.pyrs    rcseZdZfddZZS) _swapped_metacsb|dkrPg}x>|D]6}|d}|d}|dd}|j|t|f|qW|}tj||dS)NZ_fields_r)appendrsuper __setattr__)selfZattrnamevalueZfieldsZdescnamer rest) __class__r rrs  z_swapped_meta.__setattr__)__name__ __module__ __qualname__r __classcell__r r )rrrsrlittleZ __ctype_be__c@seZdZfZdZdS)BigEndianStructureN)rrr __slots___swappedbytes_r r r rr.sr) metaclassZbigZ __ctype_le__c@seZdZfZdZdS)LittleEndianStructureN)rrrr r!r r r rr#7sr#zInvalid byteorder) sysZctypestypeZArrayrrr r byteorderrr#r RuntimeErrorr r r rs  PK!=W55%__pycache__/util.cpython-36.opt-1.pycnu[3 \-@sddlZddlZddlZddlZejdkrBddZddZddZejd krlejd krldd l m Z d dZnejd krddl Z ddl Z d dZejdkrddZnddZejjd%rddZddZn6ejdkrddZd&ddZnddZdd Zd!dZd"d#Zed$kredS)'NntcCsd}tjj|}|d krdS|t|}tj|djdd\}}t|dd d}|dkrf|d7}t|ddd }|dkrd }|dkr||SdS) zReturn the version of MSVC that was used to build Python. For Python 2.3 and up, the version number is included in sys.version. For earlier versions, assume the compiler is MSVC 6. zMSC v.N  g$@r)sysversionfindlensplitint)prefixisrestZ majorVersionZ minorVersionr/usr/lib64/python3.6/util.py_get_build_version s  rcCs^t}|dkrdS|dkr d}n|dkr6d|d}ndSddl}d|jjkrV|d 7}|d S) z%Return the name of the VC runtime dllNrmsvcrtrzmsvcr%d rz_d.pyddz.dll)rZimportlib.machinery machineryEXTENSION_SUFFIXES)r Zclibname importlibrrr find_msvcrt"s rcCst|dkrtSx`tjdjtjD]J}tjj||}tjj|rD|S|jj drTq"|d}tjj|r"|Sq"WdS)NcmPATHz.dll)rr ) rosenvironrpathseppathjoinisfilelowerendswith)nameZ directoryZfnamerrr find_library7s  r+posixdarwin) dyld_findc CsLd|d|d||fg}x,|D]$}yt|Stk rBw Yq Xq WdS)Nz lib%s.dylibz%s.dylibz%s.framework/%s) _dyld_find ValueError)r*possiblerrrr+Hs  c !Cstjdtj|}tjd}|s,tjd}|s4dStj}z||dd|jd|g}t tj }d|d<d|d <yt j |t j t j|d }Wntk rdSX||jj}WdQRXWdy |jWntk rYnXXtj||}|sdStj|jd S) Nz[^\(\)\s]*lib%s\.[^\(\)\s]*gccZccz-Wl,-tz-oz-lCLC_ALLLANG)stdoutstderrenvr)r"fsencodereescapeshutilwhichtempfileZNamedTemporaryFiler*dictr# subprocessPopenPIPEZSTDOUTOSErrorr6readcloseFileNotFoundErrorsearchfsdecodegroup) r*exprZ c_compilerZtempargsr8procZtraceresrrr _findLib_gccWs:      rNZsunos5cCsz|sdSytjdd|ftjtjd}Wntk r:dSX||jj}WdQRXtjd|}|sjdSt j |j dS)Nz/usr/ccs/bin/dumpz-Lpv)r6r7s\[.*\]\sSONAME\s+([^\s]+)r) r@rArBDEVNULLrCr6rDr:rGr"rHrI)frLdatarMrrr _get_sonames  rRcCs|sdStjd}|sdSy"tj|ddd|ftjtjd}Wntk rPdSX||jj}WdQRXt j d|}|sdSt j |j dS)Nobjdumpz-pz-jz.dynamic)r6r7s\sSONAME\s+([^\s]+)r)r<r=r@rArBrOrCr6rDr:rGr"rHrI)rPrSrLdumprMrrrrRs"  freebsdopenbsd dragonflyc CsR|jd}g}y"x|r,|jdt|jqWWntk rDYnX|pPtjgS)N.r)rinsertrpopr0r maxsize)ZlibnamepartsZnumsrrr _num_versions r]cCstj|}d||f}tj|}ytjdtjtjd}Wntk rPd}YnX||j j }WdQRXtj ||}|st t |S|jtdtj|d S) Nz:-l%s\.\S+ => \S*/(lib%s\.\S+)/sbin/ldconfig-r)r6r7)keyr)r^r_r )r:r;r"r9r@rArBrOrCr6rDfindallrRrNsortr]rH)r*ZenamerJrLrQrMrrrr+s        c CstjjdsdSttj}d|d<|r,d }nd }d}ytj|tjtj|d}Wnt k rbdSX|:x2|j D](}|j }|j drrtj |jd}qrWWdQRX|sdSx4|jdD]&}tjj|d |}tjj|r|SqWdS) N /usr/bin/crler3r4-64)r6r7r8sDefault Library Path (ELF)::zlib%s.so)rdre)rd)r"r%existsr?r#r@rArBrOrCr6strip startswithrHrr&) r*is64r8rKpathsrLlinedirZlibfilerrr _findLib_crles6       roFcCstt||pt|S)N)rRrorN)r*rkrrrr+scCsddl}|jddkr&tjjd}ntjjd}dddddd }|j|d }d }tj|tj||f}yZt j d d gt j t j t j dddd,}tj ||jj}|rtj|jdSWdQRXWntk rYnXdS)Nrlrfz-32z-64z libc6,x86-64z libc6,64bitz libc6,IA-64)z x86_64-64zppc64-64z sparc64-64zs390x-64zia64-64Zlibc6z\s+(lib%s\.[^\s]+)\s+\(%sz/sbin/ldconfigz-pr3)r4r5)stdinr7r6r8r)structcalcsizer"unamemachinegetr9r:r;r@rArOrBrGr6rDrHrIrC)r*rrruZmach_mapZabi_typeZregexprMrrr_findSoname_ldconfigs.  rxc Csdtj|}ddg}tjjd}|rHx |jdD]}|jd|gq2W|jdtjd|gd}yFtj |tj tj d d }|j \}}tj |tj |} | r| jd }Wn"tk r} zWYdd} ~ XnX|S) Nz[^\(\)\s]*lib%s\.[^\(\)\s]*Zldz-tZLD_LIBRARY_PATHrgz-Lz-oz-l%sT)r6r7Zuniversal_newlinesr)r:r;r"r#rvrextenddevnullr@rArBZ communicaterGrHrI Exception) r*rJcmdZlibpathrresultrwout_rMerrr _findLib_lds&   rcCst|ptt|pt|S)N)rxrRrNr)r*rrrr+,scCsddlm}tjdkr:t|jt|jdttdtjdkrttdttdttdtj d krt|j d t|j d t|j d t|j d n(t|j dt|j dttddS)Nr)cdllrrr,r rbz2r-z libm.dylibzlibcrypto.dylibzlibSystem.dylibzSystem.framework/Systemzlibm.soz libcrypt.soZcrypt) Zctypesrr"r*printrloadr+r platformZ LoadLibrary)rrrrtest4s"         r__main__)rUrVrW)F)r"r<r@r r*rrr+rZctypes.macholib.dyldr.r/r:r>rNrRrjr]rorxrr__name__rrrrs8   +     $  PK!+D"__pycache__/_endian.cpython-36.pycnu[3 \@sddlZddlTeeZddZGdddeeZejdkr\dZ eZ Gd d d eed Z n0ejd krd Z eZ Gdddeed Z ne ddS)N)*cCsLt|trt|tSt|tr.t|j|jSt|t r<|St d|dS)zReturn the type with the 'other' byte order. Simple types like c_int and so on already have __ctype_be__ and __ctype_le__ attributes which contain the types, for more complicated types arrays and structures are supported. z+This type does not support other endian: %sN) hasattr _OTHER_ENDIANgetattr isinstance _array_type _other_endianZ_type_Z_length_ issubclass Structure TypeError)typr /usr/lib64/python3.6/_endian.pyrs    rcseZdZfddZZS) _swapped_metacsb|dkrPg}x>|D]6}|d}|d}|dd}|j|t|f|qW|}tj||dS)NZ_fields_r)appendrsuper __setattr__)selfZattrnamevalueZfieldsZdescnamer rest) __class__r rrs  z_swapped_meta.__setattr__)__name__ __module__ __qualname__r __classcell__r r )rrrsrlittleZ __ctype_be__c@seZdZdZfZdZdS)BigEndianStructurez$Structure with big endian byte orderN)rrr__doc__ __slots___swappedbytes_r r r rr.sr) metaclassZbigZ __ctype_le__c@seZdZdZfZdZdS)LittleEndianStructurez'Structure with little endian byte orderN)rrrr r!r"r r r rr$7sr$zInvalid byteorder) sysZctypestypeZArrayrrr r byteorderrr$r RuntimeErrorr r r rs  PK!}.>.>)__pycache__/__init__.cpython-36.opt-1.pycnu[3 /f1@ @s>dZddlZddlZdZddlmZmZm Z ddlm Z ddlm Z ddlmZ ddlmZmZdd lmZdd lmZee kred ee ejd krdd lmZeZejdkrejdkreejjjdddkreZddlmZmZ m!Z"m#Z$d}ddZ%d~ddZ&iZ'ddZ(ejd kr\ddlm)Z*ddlm+Z,iZ-ddZ.e.jrte(jj/dde._nejdkrtddlm0Z*ddlm1Z1m2Z2m3Z3m4Z4m5Z5ddlm6Z6m7Z7dd lm8Z8dd!d"Z9Gd#d$d$e8Z:e9e:d%Gd&d'd'e8Z;e9e;Gd(d)d)e8Ze9e>ed.ed/krLe=Z?e>Z@n0Gd0d1d1e8Z?e9e?Gd2d3d3e8Z@e9e@Gd4d5d5e8ZAe9eAGd6d7d7e8ZBe9eBGd8d9d9e8ZCe1eCe1eBkreBZCed/ed:kre=ZDe>ZEn0Gd;d<dd>e8ZEe9eEGd?d@d@e8ZFeFeF_GeF_He9eFGdAdBdBe8ZIeIeI_GeI_He9eIGdCdDdDe8ZJeJeJ_GeJ_He9eJGdEdFdFe8ZKe9eKd%GdGdHdHe8ZLeLZMe9eLGdIdJdJe8ZNddKlmOZOmPZPmQZQGdLdMdMe8ZRGdNdOdOe8ZSdPdQZTddRdSZUdTdUZVdVdWZWGdXdYdYeXZYGdZd[d[eYZZejd krGd\d]d]eYZ[dd^lm\Z\m8Z8Gd_d`d`e8Z]GdadbdbeYZ^GdcddddeXZ_e_eYZ`e_eZZaejd kreZdedejbZcn,ejdfkreZdgejdddhZcneZdZcejd krNe_e[Zee_e^Zfejd kr,eejgjhZhneejijhZhddilmjZjmkZkddjdkZle1e@e1eLkrje@Zme?Znn6e1e>e1eLkre>Zme=Znne1eEe1eLkreEZmeDZnddllmoZompZpmqZqmrZre(eLeLeLemeoZse(eLeLe?emepZtdmdnZueue:eLe:e:erZvdodpZweue:eLe?eqZxddrdsZyyddtlmzZzWne{k r>YnXeue:eLe?ezZ|ddudvZ}ejd krvdwdxZ~dydzZdd{lmZmZeIZeFZxPe;e?e=eDgD]@Ze1edhkreZn&e1ed|kreZne1edkreZqWxPeeEgD]@Ze1edhkreZn&e1ed|kreZne1edkreZqW[eTdS)z,create and manipulate C data types in PythonNz1.1.0)Union StructureArray)_Pointer)CFuncPtr) __version__) RTLD_LOCAL RTLD_GLOBAL) ArgumentError)calcsizezVersion number mismatchnt) FormatErrorposixdarwin.)FUNCFLAG_CDECLFUNCFLAG_PYTHONAPIFUNCFLAG_USE_ERRNOFUNCFLAG_USE_LASTERRORcCs^t|tr6|dkrt|d}t|}|}||_|St|trRt|}|}|St|dS)zcreate_string_buffer(aBytes) -> character array create_string_buffer(anInteger) -> character array create_string_buffer(aBytes, anInteger) -> character array N) isinstancebyteslenc_charvalueint TypeError)initsizebuftypebufr" /usr/lib64/python3.6/__init__.pycreate_string_buffer/s   r$cCs t||S)N)r$)rrr"r"r#c_bufferAsr%c st|jddrtO|jddr,tO|r@td|jytfStk rGfdddt}|tf<|SXdS)aCFUNCTYPE(restype, *argtypes, use_errno=False, use_last_error=False) -> function prototype. restype: the result type argtypes: a sequence specifying the argument types The function prototype can be called in different ways to create a callable object: prototype(integer address) -> foreign function prototype(callable) -> create and return a C callable function from callable prototype(integer index, method name[, paramflags]) -> foreign function calling a COM method prototype((ordinal number, dll object)[, paramflags]) -> foreign function exported by ordinal prototype((function name, dll object)[, paramflags]) -> foreign function exported by name use_errnoFuse_last_errorz!unexpected keyword argument(s) %scseZdZZZZdS)z CFUNCTYPE..CFunctionTypeN)__name__ __module__ __qualname__ _argtypes_ _restype__flags_r")argtypesflagsrestyper"r# CFunctionTypecsr1N) _FUNCFLAG_CDECLpop_FUNCFLAG_USE_ERRNO_FUNCFLAG_USE_LASTERROR ValueErrorkeys_c_functype_cacheKeyError _CFuncPtr)r0r.kwr1r")r.r/r0r# CFUNCTYPEIs  r<) LoadLibrary)FUNCFLAG_STDCALLc st|jddrtO|jddr,tO|r@td|jytfStk rGfdddt}|tf<|SXdS)Nr&Fr'z!unexpected keyword argument(s) %scseZdZZZZdS)z$WINFUNCTYPE..WinFunctionTypeN)r(r)r*r+r,r-r")r.r/r0r"r#WinFunctionType{sr?) _FUNCFLAG_STDCALLr3r4r5r6r7_win_functype_cacher9r:)r0r.r;r?r")r.r/r0r# WINFUNCTYPEos  rB)dlopen)sizeofbyref addressof alignmentresize) get_errno set_errno) _SimpleCDatacCsJddlm}|dkr|j}t|||}}||krFtd|||fdS)Nr)r z"sizeof(%s) wrong: %d instead of %d)structr _type_rD SystemError)typtypecoder actualZrequiredr"r"r# _check_sizes rRcs eZdZdZfddZZS) py_objectOc s.y tjStk r(dt|jSXdS)Nz %s())super__repr__r6typer()self) __class__r"r#rVs zpy_object.__repr__)r(r)r*rMrV __classcell__r"r")rYr#rSsrSPc@seZdZdZdS)c_shorthN)r(r)r*rMr"r"r"r#r\sr\c@seZdZdZdS)c_ushortHN)r(r)r*rMr"r"r"r#r^sr^c@seZdZdZdS)c_longlN)r(r)r*rMr"r"r"r#r`sr`c@seZdZdZdS)c_ulongLN)r(r)r*rMr"r"r"r#rbsrbirac@seZdZdZdS)c_intrdN)r(r)r*rMr"r"r"r#resrec@seZdZdZdS)c_uintIN)r(r)r*rMr"r"r"r#rfsrfc@seZdZdZdS)c_floatfN)r(r)r*rMr"r"r"r#rhsrhc@seZdZdZdS)c_doubledN)r(r)r*rMr"r"r"r#rjsrjc@seZdZdZdS) c_longdoublegN)r(r)r*rMr"r"r"r#rlsrlqc@seZdZdZdS) c_longlongrnN)r(r)r*rMr"r"r"r#rosroc@seZdZdZdS) c_ulonglongQN)r(r)r*rMr"r"r"r#rpsrpc@seZdZdZdS)c_ubyteBN)r(r)r*rMr"r"r"r#rrsrrc@seZdZdZdS)c_bytebN)r(r)r*rMr"r"r"r#rtsrtc@seZdZdZdS)rcN)r(r)r*rMr"r"r"r#rsrc@seZdZdZddZdS)c_char_pzcCsd|jjtj|jfS)Nz%s(%s))rYr(c_void_p from_bufferr)rXr"r"r#rVszc_char_p.__repr__N)r(r)r*rMrVr"r"r"r#rwsrwc@seZdZdZdS)ryr[N)r(r)r*rMr"r"r"r#rysryc@seZdZdZdS)c_bool?N)r(r)r*rMr"r"r"r#r{sr{)POINTERpointer_pointer_type_cachec@seZdZdZddZdS) c_wchar_pZcCsd|jjtj|jfS)Nz%s(%s))rYr(ryrzr)rXr"r"r#rVszc_wchar_p.__repr__N)r(r)r*rMrVr"r"r"r#rsrc@seZdZdZdS)c_wcharuN)r(r)r*rMr"r"r"r#rsrcCsFtjtjtjdkr"tjtjtt _t jtt _t td<dS)Nr ) rclearr8_osnamerArZ from_paramr}rrwrryr"r"r"r# _reset_caches   rcCs^t|tr6|dkrt|d}t|}|}||_|St|trRt|}|}|St|dS)zcreate_unicode_buffer(aString) -> character array create_unicode_buffer(anInteger) -> character array create_unicode_buffer(aString, anInteger) -> character array Nr)rstrrrrrr)rrr r!r"r"r#create_unicode_buffers   rcCsLtj|ddk rtdt|tkr,td|j||t|<tt|=dS)Nz%This type already exists in the cachezWhat's this???)rget RuntimeErroridZset_type)r~clsr"r"r#SetPointerType"s  rcCs||S)Nr")rOrr"r"r#ARRAY,src@sNeZdZdZeZeZdZdZ dZ e dddfddZ dd Z d d Zd d ZdS)CDLLaAn instance of this class represents a loaded dll/shared library, exporting functions using the standard C calling convention (named 'cdecl' on Windows). The exported functions can be accessed as attributes, or by indexing with the function name. Examples: .qsort -> callable object ['qsort'] -> callable object Calling the functions releases the Python GIL during the call and reacquires it afterwards. zrNFcsb|_j|rtO|r$tOGfdddt}|_|dkrXtj|_n|_dS)NcseZdZZjZdS)zCDLL.__init__.._FuncPtrN)r(r)r*r-_func_restype_r,r")r/rXr"r#_FuncPtrQsr)_name _func_flags_r4r5r:r_dlopen_handle)rXrmodeZhandler&r'rr")r/rXr#__init__Gsz CDLL.__init__cCs8d|jj|j|jtjdd@t|tjdd@fS)Nz<%s '%s', handle %x at %#x>r)rYr(rr_sysmaxsizer)rXr"r"r#rV[s z CDLL.__repr__cCs6|jdr|jdrt||j|}t||||S)N__) startswithendswithAttributeError __getitem__setattr)rXrfuncr"r"r# __getattr__as   zCDLL.__getattr__cCs"|j||f}t|ts||_|S)N)rrrr()rXZname_or_ordinalrr"r"r#rhs zCDLL.__getitem__)r(r)r*__doc__r2rrerrrr DEFAULT_MODErrVrrr"r"r"r#r2s  rc@seZdZdZeeBZdS)PyDLLzThis class represents the Python library itself. It allows accessing Python API functions. The GIL is not released, and Python exceptions are handled correctly. N)r(r)r*rr2_FUNCFLAG_PYTHONAPIrr"r"r"r#rnsrc@seZdZdZeZdS)WinDLLznThis class represents a dll exporting functions using the Windows stdcall calling convention. N)r(r)r*rr@rr"r"r"r#rwsr)_check_HRESULTrKc@seZdZdZeZdS)HRESULTraN)r(r)r*rMrZ_check_retval_r"r"r"r#rs rc@seZdZdZeZeZdS)OleDLLzThis class represents a dll exporting functions using the Windows stdcall calling convention, and returning HRESULT. HRESULT error values are automatically raised as OSError exceptions. N)r(r)r*rr@rrrr"r"r"r#rsrc@s,eZdZddZddZddZddZd S) LibraryLoadercCs ||_dS)N)_dlltype)rXZdlltyper"r"r#rszLibraryLoader.__init__cCs.|ddkrt||j|}t||||S)Nr_)rrr)rXrZdllr"r"r#rs    zLibraryLoader.__getattr__cCs t||S)N)getattr)rXrr"r"r#rszLibraryLoader.__getitem__cCs |j|S)N)r)rXrr"r"r#r=szLibraryLoader.LoadLibraryN)r(r)r*rrrr=r"r"r"r#rsrz python dllcygwinzlibpython%d.%d.dllr)get_last_errorset_last_errorcCs0|dkrt}|dkr"t|j}td|d|S)N) GetLastErrorr stripOSError)codeZdescrr"r"r#WinErrors  r) _memmove_addr _memset_addr_string_at_addr _cast_addrcsGfdddt}|S)NcseZdZZZeeBZdS)z!PYFUNCTYPE..CFunctionTypeN)r(r)r*r+r,r2rr-r")r.r0r"r#r1sr1)r:)r0r.r1r")r.r0r# PYFUNCTYPEsrcCs t|||S)N)_cast)objrOr"r"r#castsrrcCs t||S)zAstring_at(addr[, size]) -> string Return the string at addr.) _string_at)ptrrr"r"r# string_atsr)_wstring_at_addrcCs t||S)zFwstring_at(addr[, size]) -> string Return the string at addr.) _wstring_at)rrr"r"r# wstring_atsrc Cs@ytdttdg}Wntk r,dSX|j|||SdS)Nzcomtypes.server.inprocserver*ii) __import__globalslocals ImportErrorDllGetClassObject)ZrclsidZriidZppvccomr"r"r#rs rc Cs6ytdttdg}Wntk r,dSX|jS)Nzcomtypes.server.inprocserverrr)rrrrDllCanUnloadNow)rr"r"r#rs r)BigEndianStructureLittleEndianStructure)N)N)N)N)NN)rr)r)rosrsysrrZ_ctypesrrrrrr:Z_ctypes_versionrr r rLr Z _calcsize Exceptionrr rplatformrunamereleasesplitrr2rrrr4rr5r$r%r8r<r=rr>r@rArBreplacerCrDrErFrGrHrIrJrKrRrSr\r^r`rbrerfrhrjrlrorprrZ __ctype_le__Z __ctype_be__rtrrwryZc_voidpr{r}r~rrrrrrrobjectrrrrrrrZcdllZpydllZ dllhandleZ pythonapi version_infoZwindllZoledllZkernel32rZcoredllrrrZc_size_tZ c_ssize_trrrrZmemmoveZmemsetrrrrrrrrrrrZctypes._endianrrZc_int8Zc_uint8ZkindZc_int16Zc_int32Zc_int64Zc_uint16Zc_uint32Zc_uint64r"r"r"r#s8          !              <              PK!+D(__pycache__/_endian.cpython-36.opt-1.pycnu[3 \@sddlZddlTeeZddZGdddeeZejdkr\dZ eZ Gd d d eed Z n0ejd krd Z eZ Gdddeed Z ne ddS)N)*cCsLt|trt|tSt|tr.t|j|jSt|t r<|St d|dS)zReturn the type with the 'other' byte order. Simple types like c_int and so on already have __ctype_be__ and __ctype_le__ attributes which contain the types, for more complicated types arrays and structures are supported. z+This type does not support other endian: %sN) hasattr _OTHER_ENDIANgetattr isinstance _array_type _other_endianZ_type_Z_length_ issubclass Structure TypeError)typr /usr/lib64/python3.6/_endian.pyrs    rcseZdZfddZZS) _swapped_metacsb|dkrPg}x>|D]6}|d}|d}|dd}|j|t|f|qW|}tj||dS)NZ_fields_r)appendrsuper __setattr__)selfZattrnamevalueZfieldsZdescnamer rest) __class__r rrs  z_swapped_meta.__setattr__)__name__ __module__ __qualname__r __classcell__r r )rrrsrlittleZ __ctype_be__c@seZdZdZfZdZdS)BigEndianStructurez$Structure with big endian byte orderN)rrr__doc__ __slots___swappedbytes_r r r rr.sr) metaclassZbigZ __ctype_le__c@seZdZdZfZdZdS)LittleEndianStructurez'Structure with little endian byte orderN)rrrr r!r"r r r rr$7sr$zInvalid byteorder) sysZctypestypeZArrayrrr r byteorderrr$r RuntimeErrorr r r rs  PK!exB[DD%__pycache__/util.cpython-36.opt-2.pycnu[3 \-@sddlZddlZddlZddlZejdkrBddZddZddZejd krlejd krldd l m Z d dZnejd krddl Z ddl Z d dZejdkrddZnddZejjd%rddZddZn6ejdkrddZd&ddZnddZdd Zd!dZd"d#Zed$kredS)'NntcCsd}tjj|}|d krdS|t|}tj|djdd\}}t|dd d}|dkrf|d7}t|ddd}|dkrd }|dkr||SdS) NzMSC v.  g$@r)sysversionfindlensplitint)prefixisrestZ majorVersionZ minorVersionr#/usr/lib64/python3.6/ctypes/util.py_get_build_version s  rcCs^t}|dkrdS|dkr d}n|dkr6d|d}ndSddl}d|jjkrV|d7}|d S) Nrmsvcrtrzmsvcr%d rz_d.pyddz.dll)rimportlib.machinery machineryEXTENSION_SUFFIXES)r Zclibname importlibrrr find_msvcrt"s rcCst|dkrtSx`tjdjtjD]J}tjj||}tjj|rD|S|jj drTq"|d}tjj|r"|Sq"WdS)NcmPATHz.dll)r r!) rosenvironrpathseppathjoinisfilelowerendswith)nameZ directoryZfnamerrr find_library7s  r,posixdarwin) dyld_findc CsLd|d|d||fg}x,|D]$}yt|Stk rBw Yq Xq WdS)Nz lib%s.dylibz%s.dylibz%s.framework/%s) _dyld_find ValueError)r+possiblerrrr,Hs  c !Cstjdtj|}tjd}|s,tjd}|s4dStj}z||dd|jd|g}t tj }d|d<d|d <yt j |t j t j|d }Wntk rdSX||jj}WdQRXWdy |jWntk rYnXXtj||}|sdStj|jd S) Nz[^\(\)\s]*lib%s\.[^\(\)\s]*gccZccz-Wl,-tz-oz-lCLC_ALLLANG)stdoutstderrenvr)r#fsencodereescapeshutilwhichtempfileZNamedTemporaryFiler+dictr$ subprocessPopenPIPEZSTDOUTOSErrorr7readcloseFileNotFoundErrorsearchfsdecodegroup) r+exprZ c_compilerZtempargsr9procZtraceresrrr _findLib_gccWs:      rOZsunos5cCsz|sdSytjdd|ftjtjd}Wntk r:dSX||jj}WdQRXtjd|}|sjdSt j |j dS)Nz/usr/ccs/bin/dumpz-Lpv)r7r8s\[.*\]\sSONAME\s+([^\s]+)r) rArBrCDEVNULLrDr7rEr;rHr#rIrJ)frMdatarNrrr _get_sonames  rScCs|sdStjd}|sdSy"tj|ddd|ftjtjd}Wntk rPdSX||jj}WdQRXt j d|}|sdSt j |j dS)Nobjdumpz-pz-jz.dynamic)r7r8s\sSONAME\s+([^\s]+)r)r=r>rArBrCrPrDr7rEr;rHr#rIrJ)rQrTrMdumprNrrrrSs"  freebsdopenbsd dragonflyc CsR|jd}g}y"x|r,|jdt|jqWWntk rDYnX|pPtjgS)N.r)rinsertrpopr1r maxsize)ZlibnamepartsZnumsrrr _num_versions r^cCstj|}d||f}tj|}ytjdtjtjd}Wntk rPd}YnX||j j }WdQRXtj ||}|st t |S|jtdtj|d S) Nz:-l%s\.\S+ => \S*/(lib%s\.\S+)/sbin/ldconfig-r)r7r8)keyr)r_r`r )r;r<r#r:rArBrCrPrDr7rEfindallrSrOsortr^rI)r+ZenamerKrMrRrNrrrr,s        c CstjjdsdSttj}d|d<|r,d }nd }d}ytj|tjtj|d}Wnt k rbdSX|:x2|j D](}|j }|j drrtj |jd}qrWWdQRX|sdSx4|jdD]&}tjj|d |}tjj|r|SqWdS) N /usr/bin/crler4r5-64)r7r8r9sDefault Library Path (ELF)::zlib%s.so)rerf)re)r#r&existsr@r$rArBrCrPrDr7strip startswithrIrr') r+is64r9rLpathsrMlinedirZlibfilerrr _findLib_crles6       rpFcCstt||pt|S)N)rSrprO)r+rlrrrr,scCsddl}|jddkr&tjjd}ntjjd}dddddd }|j|d }d }tj|tj||f}yZt j d d gt j t j t j dddd,}tj ||jj}|rtj|jdSWdQRXWntk rYnXdS)Nrlrgz-32z-64z libc6,x86-64z libc6,64bitz libc6,IA-64)z x86_64-64zppc64-64z sparc64-64zs390x-64zia64-64Zlibc6z\s+(lib%s\.[^\s]+)\s+\(%sz/sbin/ldconfigz-pr4)r5r6)stdinr8r7r9r)structZcalcsizer#unamemachinegetr:r;r<rArBrPrCrHr7rErIrJrD)r+rsruZmach_mapZabi_typeZregexprNrrr_findSoname_ldconfigs.  rxc Csdtj|}ddg}tjjd}|rHx |jdD]}|jd|gq2W|jdtjd|gd}yFtj |tj tj d d }|j \}}tj |tj |} | r| jd }Wn"tk r} zWYdd} ~ XnX|S) Nz[^\(\)\s]*lib%s\.[^\(\)\s]*Zldz-tZLD_LIBRARY_PATHrhz-Lz-oz-l%sT)r7r8Zuniversal_newlinesr)r;r<r#r$rvrextenddevnullrArBrCZ communicaterHrIrJ Exception) r+rKcmdZlibpathrresultrwout_rNerrr _findLib_lds&   rcCst|ptt|pt|S)N)rxrSrOr)r+rrrr,,scCsddlm}tjdkr:t|jt|jdttdtjdkrttdttdttdtj d krt|j d t|j d t|j d t|j d n(t|j dt|j dttddS)Nr)cdllrrr-r!r bz2r.z libm.dylibzlibcrypto.dylibzlibSystem.dylibzSystem.framework/Systemzlibm.soz libcrypt.soZcrypt) Zctypesrr#r+printrloadr,r platformZ LoadLibrary)rrrrtest4s"         r__main__)rVrWrX)F)r#r=rAr r+rrr,rZctypes.macholib.dyldr/r0r;r?rOrSrkr^rprxrr__name__rrrrs8   +     $  PK!}.>.>#__pycache__/__init__.cpython-36.pycnu[3 /f1@ @s>dZddlZddlZdZddlmZmZm Z ddlm Z ddlm Z ddlmZ ddlmZmZdd lmZdd lmZee kred ee ejd krdd lmZeZejdkrejdkreejjjdddkreZddlmZmZ m!Z"m#Z$d}ddZ%d~ddZ&iZ'ddZ(ejd kr\ddlm)Z*ddlm+Z,iZ-ddZ.e.jrte(jj/dde._nejdkrtddlm0Z*ddlm1Z1m2Z2m3Z3m4Z4m5Z5ddlm6Z6m7Z7dd lm8Z8dd!d"Z9Gd#d$d$e8Z:e9e:d%Gd&d'd'e8Z;e9e;Gd(d)d)e8Ze9e>ed.ed/krLe=Z?e>Z@n0Gd0d1d1e8Z?e9e?Gd2d3d3e8Z@e9e@Gd4d5d5e8ZAe9eAGd6d7d7e8ZBe9eBGd8d9d9e8ZCe1eCe1eBkreBZCed/ed:kre=ZDe>ZEn0Gd;d<dd>e8ZEe9eEGd?d@d@e8ZFeFeF_GeF_He9eFGdAdBdBe8ZIeIeI_GeI_He9eIGdCdDdDe8ZJeJeJ_GeJ_He9eJGdEdFdFe8ZKe9eKd%GdGdHdHe8ZLeLZMe9eLGdIdJdJe8ZNddKlmOZOmPZPmQZQGdLdMdMe8ZRGdNdOdOe8ZSdPdQZTddRdSZUdTdUZVdVdWZWGdXdYdYeXZYGdZd[d[eYZZejd krGd\d]d]eYZ[dd^lm\Z\m8Z8Gd_d`d`e8Z]GdadbdbeYZ^GdcddddeXZ_e_eYZ`e_eZZaejd kreZdedejbZcn,ejdfkreZdgejdddhZcneZdZcejd krNe_e[Zee_e^Zfejd kr,eejgjhZhneejijhZhddilmjZjmkZkddjdkZle1e@e1eLkrje@Zme?Znn6e1e>e1eLkre>Zme=Znne1eEe1eLkreEZmeDZnddllmoZompZpmqZqmrZre(eLeLeLemeoZse(eLeLe?emepZtdmdnZueue:eLe:e:erZvdodpZweue:eLe?eqZxddrdsZyyddtlmzZzWne{k r>YnXeue:eLe?ezZ|ddudvZ}ejd krvdwdxZ~dydzZdd{lmZmZeIZeFZxPe;e?e=eDgD]@Ze1edhkreZn&e1ed|kreZne1edkreZqWxPeeEgD]@Ze1edhkreZn&e1ed|kreZne1edkreZqW[eTdS)z,create and manipulate C data types in PythonNz1.1.0)Union StructureArray)_Pointer)CFuncPtr) __version__) RTLD_LOCAL RTLD_GLOBAL) ArgumentError)calcsizezVersion number mismatchnt) FormatErrorposixdarwin.)FUNCFLAG_CDECLFUNCFLAG_PYTHONAPIFUNCFLAG_USE_ERRNOFUNCFLAG_USE_LASTERRORcCs^t|tr6|dkrt|d}t|}|}||_|St|trRt|}|}|St|dS)zcreate_string_buffer(aBytes) -> character array create_string_buffer(anInteger) -> character array create_string_buffer(aBytes, anInteger) -> character array N) isinstancebyteslenc_charvalueint TypeError)initsizebuftypebufr" /usr/lib64/python3.6/__init__.pycreate_string_buffer/s   r$cCs t||S)N)r$)rrr"r"r#c_bufferAsr%c st|jddrtO|jddr,tO|r@td|jytfStk rGfdddt}|tf<|SXdS)aCFUNCTYPE(restype, *argtypes, use_errno=False, use_last_error=False) -> function prototype. restype: the result type argtypes: a sequence specifying the argument types The function prototype can be called in different ways to create a callable object: prototype(integer address) -> foreign function prototype(callable) -> create and return a C callable function from callable prototype(integer index, method name[, paramflags]) -> foreign function calling a COM method prototype((ordinal number, dll object)[, paramflags]) -> foreign function exported by ordinal prototype((function name, dll object)[, paramflags]) -> foreign function exported by name use_errnoFuse_last_errorz!unexpected keyword argument(s) %scseZdZZZZdS)z CFUNCTYPE..CFunctionTypeN)__name__ __module__ __qualname__ _argtypes_ _restype__flags_r")argtypesflagsrestyper"r# CFunctionTypecsr1N) _FUNCFLAG_CDECLpop_FUNCFLAG_USE_ERRNO_FUNCFLAG_USE_LASTERROR ValueErrorkeys_c_functype_cacheKeyError _CFuncPtr)r0r.kwr1r")r.r/r0r# CFUNCTYPEIs  r<) LoadLibrary)FUNCFLAG_STDCALLc st|jddrtO|jddr,tO|r@td|jytfStk rGfdddt}|tf<|SXdS)Nr&Fr'z!unexpected keyword argument(s) %scseZdZZZZdS)z$WINFUNCTYPE..WinFunctionTypeN)r(r)r*r+r,r-r")r.r/r0r"r#WinFunctionType{sr?) _FUNCFLAG_STDCALLr3r4r5r6r7_win_functype_cacher9r:)r0r.r;r?r")r.r/r0r# WINFUNCTYPEos  rB)dlopen)sizeofbyref addressof alignmentresize) get_errno set_errno) _SimpleCDatacCsJddlm}|dkr|j}t|||}}||krFtd|||fdS)Nr)r z"sizeof(%s) wrong: %d instead of %d)structr _type_rD SystemError)typtypecoder actualZrequiredr"r"r# _check_sizes rRcs eZdZdZfddZZS) py_objectOc s.y tjStk r(dt|jSXdS)Nz %s())super__repr__r6typer()self) __class__r"r#rVs zpy_object.__repr__)r(r)r*rMrV __classcell__r"r")rYr#rSsrSPc@seZdZdZdS)c_shorthN)r(r)r*rMr"r"r"r#r\sr\c@seZdZdZdS)c_ushortHN)r(r)r*rMr"r"r"r#r^sr^c@seZdZdZdS)c_longlN)r(r)r*rMr"r"r"r#r`sr`c@seZdZdZdS)c_ulongLN)r(r)r*rMr"r"r"r#rbsrbirac@seZdZdZdS)c_intrdN)r(r)r*rMr"r"r"r#resrec@seZdZdZdS)c_uintIN)r(r)r*rMr"r"r"r#rfsrfc@seZdZdZdS)c_floatfN)r(r)r*rMr"r"r"r#rhsrhc@seZdZdZdS)c_doubledN)r(r)r*rMr"r"r"r#rjsrjc@seZdZdZdS) c_longdoublegN)r(r)r*rMr"r"r"r#rlsrlqc@seZdZdZdS) c_longlongrnN)r(r)r*rMr"r"r"r#rosroc@seZdZdZdS) c_ulonglongQN)r(r)r*rMr"r"r"r#rpsrpc@seZdZdZdS)c_ubyteBN)r(r)r*rMr"r"r"r#rrsrrc@seZdZdZdS)c_bytebN)r(r)r*rMr"r"r"r#rtsrtc@seZdZdZdS)rcN)r(r)r*rMr"r"r"r#rsrc@seZdZdZddZdS)c_char_pzcCsd|jjtj|jfS)Nz%s(%s))rYr(c_void_p from_bufferr)rXr"r"r#rVszc_char_p.__repr__N)r(r)r*rMrVr"r"r"r#rwsrwc@seZdZdZdS)ryr[N)r(r)r*rMr"r"r"r#rysryc@seZdZdZdS)c_bool?N)r(r)r*rMr"r"r"r#r{sr{)POINTERpointer_pointer_type_cachec@seZdZdZddZdS) c_wchar_pZcCsd|jjtj|jfS)Nz%s(%s))rYr(ryrzr)rXr"r"r#rVszc_wchar_p.__repr__N)r(r)r*rMrVr"r"r"r#rsrc@seZdZdZdS)c_wcharuN)r(r)r*rMr"r"r"r#rsrcCsFtjtjtjdkr"tjtjtt _t jtt _t td<dS)Nr ) rclearr8_osnamerArZ from_paramr}rrwrryr"r"r"r# _reset_caches   rcCs^t|tr6|dkrt|d}t|}|}||_|St|trRt|}|}|St|dS)zcreate_unicode_buffer(aString) -> character array create_unicode_buffer(anInteger) -> character array create_unicode_buffer(aString, anInteger) -> character array Nr)rstrrrrrr)rrr r!r"r"r#create_unicode_buffers   rcCsLtj|ddk rtdt|tkr,td|j||t|<tt|=dS)Nz%This type already exists in the cachezWhat's this???)rget RuntimeErroridZset_type)r~clsr"r"r#SetPointerType"s  rcCs||S)Nr")rOrr"r"r#ARRAY,src@sNeZdZdZeZeZdZdZ dZ e dddfddZ dd Z d d Zd d ZdS)CDLLaAn instance of this class represents a loaded dll/shared library, exporting functions using the standard C calling convention (named 'cdecl' on Windows). The exported functions can be accessed as attributes, or by indexing with the function name. Examples: .qsort -> callable object ['qsort'] -> callable object Calling the functions releases the Python GIL during the call and reacquires it afterwards. zrNFcsb|_j|rtO|r$tOGfdddt}|_|dkrXtj|_n|_dS)NcseZdZZjZdS)zCDLL.__init__.._FuncPtrN)r(r)r*r-_func_restype_r,r")r/rXr"r#_FuncPtrQsr)_name _func_flags_r4r5r:r_dlopen_handle)rXrmodeZhandler&r'rr")r/rXr#__init__Gsz CDLL.__init__cCs8d|jj|j|jtjdd@t|tjdd@fS)Nz<%s '%s', handle %x at %#x>r)rYr(rr_sysmaxsizer)rXr"r"r#rV[s z CDLL.__repr__cCs6|jdr|jdrt||j|}t||||S)N__) startswithendswithAttributeError __getitem__setattr)rXrfuncr"r"r# __getattr__as   zCDLL.__getattr__cCs"|j||f}t|ts||_|S)N)rrrr()rXZname_or_ordinalrr"r"r#rhs zCDLL.__getitem__)r(r)r*__doc__r2rrerrrr DEFAULT_MODErrVrrr"r"r"r#r2s  rc@seZdZdZeeBZdS)PyDLLzThis class represents the Python library itself. It allows accessing Python API functions. The GIL is not released, and Python exceptions are handled correctly. N)r(r)r*rr2_FUNCFLAG_PYTHONAPIrr"r"r"r#rnsrc@seZdZdZeZdS)WinDLLznThis class represents a dll exporting functions using the Windows stdcall calling convention. N)r(r)r*rr@rr"r"r"r#rwsr)_check_HRESULTrKc@seZdZdZeZdS)HRESULTraN)r(r)r*rMrZ_check_retval_r"r"r"r#rs rc@seZdZdZeZeZdS)OleDLLzThis class represents a dll exporting functions using the Windows stdcall calling convention, and returning HRESULT. HRESULT error values are automatically raised as OSError exceptions. N)r(r)r*rr@rrrr"r"r"r#rsrc@s,eZdZddZddZddZddZd S) LibraryLoadercCs ||_dS)N)_dlltype)rXZdlltyper"r"r#rszLibraryLoader.__init__cCs.|ddkrt||j|}t||||S)Nr_)rrr)rXrZdllr"r"r#rs    zLibraryLoader.__getattr__cCs t||S)N)getattr)rXrr"r"r#rszLibraryLoader.__getitem__cCs |j|S)N)r)rXrr"r"r#r=szLibraryLoader.LoadLibraryN)r(r)r*rrrr=r"r"r"r#rsrz python dllcygwinzlibpython%d.%d.dllr)get_last_errorset_last_errorcCs0|dkrt}|dkr"t|j}td|d|S)N) GetLastErrorr stripOSError)codeZdescrr"r"r#WinErrors  r) _memmove_addr _memset_addr_string_at_addr _cast_addrcsGfdddt}|S)NcseZdZZZeeBZdS)z!PYFUNCTYPE..CFunctionTypeN)r(r)r*r+r,r2rr-r")r.r0r"r#r1sr1)r:)r0r.r1r")r.r0r# PYFUNCTYPEsrcCs t|||S)N)_cast)objrOr"r"r#castsrrcCs t||S)zAstring_at(addr[, size]) -> string Return the string at addr.) _string_at)ptrrr"r"r# string_atsr)_wstring_at_addrcCs t||S)zFwstring_at(addr[, size]) -> string Return the string at addr.) _wstring_at)rrr"r"r# wstring_atsrc Cs@ytdttdg}Wntk r,dSX|j|||SdS)Nzcomtypes.server.inprocserver*ii) __import__globalslocals ImportErrorDllGetClassObject)ZrclsidZriidZppvccomr"r"r#rs rc Cs6ytdttdg}Wntk r,dSX|jS)Nzcomtypes.server.inprocserverrr)rrrrDllCanUnloadNow)rr"r"r#rs r)BigEndianStructureLittleEndianStructure)N)N)N)N)NN)rr)r)rosrsysrrZ_ctypesrrrrrr:Z_ctypes_versionrr r rLr Z _calcsize Exceptionrr rplatformrunamereleasesplitrr2rrrr4rr5r$r%r8r<r=rr>r@rArBreplacerCrDrErFrGrHrIrJrKrRrSr\r^r`rbrerfrhrjrlrorprrZ __ctype_le__Z __ctype_be__rtrrwryZc_voidpr{r}r~rrrrrrrobjectrrrrrrrZcdllZpydllZ dllhandleZ pythonapi version_infoZwindllZoledllZkernel32rZcoredllrrrZc_size_tZ c_ssize_trrrrZmemmoveZmemsetrrrrrrrrrrrZctypes._endianrrZc_int8Zc_uint8ZkindZc_int16Zc_int32Zc_int64Zc_uint16Zc_uint32Zc_uint64r"r"r"r#s8          !              <              PK!=W55__pycache__/util.cpython-36.pycnu[3 \-@sddlZddlZddlZddlZejdkrBddZddZddZejd krlejd krldd l m Z d dZnejd krddl Z ddl Z d dZejdkrddZnddZejjd%rddZddZn6ejdkrddZd&ddZnddZdd Zd!dZd"d#Zed$kredS)'NntcCsd}tjj|}|d krdS|t|}tj|djdd\}}t|dd d}|dkrf|d7}t|ddd }|dkrd }|dkr||SdS) zReturn the version of MSVC that was used to build Python. For Python 2.3 and up, the version number is included in sys.version. For earlier versions, assume the compiler is MSVC 6. zMSC v.N  g$@r)sysversionfindlensplitint)prefixisrestZ majorVersionZ minorVersionr/usr/lib64/python3.6/util.py_get_build_version s  rcCs^t}|dkrdS|dkr d}n|dkr6d|d}ndSddl}d|jjkrV|d 7}|d S) z%Return the name of the VC runtime dllNrmsvcrtrzmsvcr%d rz_d.pyddz.dll)rZimportlib.machinery machineryEXTENSION_SUFFIXES)r Zclibname importlibrrr find_msvcrt"s rcCst|dkrtSx`tjdjtjD]J}tjj||}tjj|rD|S|jj drTq"|d}tjj|r"|Sq"WdS)NcmPATHz.dll)rr ) rosenvironrpathseppathjoinisfilelowerendswith)nameZ directoryZfnamerrr find_library7s  r+posixdarwin) dyld_findc CsLd|d|d||fg}x,|D]$}yt|Stk rBw Yq Xq WdS)Nz lib%s.dylibz%s.dylibz%s.framework/%s) _dyld_find ValueError)r*possiblerrrr+Hs  c !Cstjdtj|}tjd}|s,tjd}|s4dStj}z||dd|jd|g}t tj }d|d<d|d <yt j |t j t j|d }Wntk rdSX||jj}WdQRXWdy |jWntk rYnXXtj||}|sdStj|jd S) Nz[^\(\)\s]*lib%s\.[^\(\)\s]*gccZccz-Wl,-tz-oz-lCLC_ALLLANG)stdoutstderrenvr)r"fsencodereescapeshutilwhichtempfileZNamedTemporaryFiler*dictr# subprocessPopenPIPEZSTDOUTOSErrorr6readcloseFileNotFoundErrorsearchfsdecodegroup) r*exprZ c_compilerZtempargsr8procZtraceresrrr _findLib_gccWs:      rNZsunos5cCsz|sdSytjdd|ftjtjd}Wntk r:dSX||jj}WdQRXtjd|}|sjdSt j |j dS)Nz/usr/ccs/bin/dumpz-Lpv)r6r7s\[.*\]\sSONAME\s+([^\s]+)r) r@rArBDEVNULLrCr6rDr:rGr"rHrI)frLdatarMrrr _get_sonames  rRcCs|sdStjd}|sdSy"tj|ddd|ftjtjd}Wntk rPdSX||jj}WdQRXt j d|}|sdSt j |j dS)Nobjdumpz-pz-jz.dynamic)r6r7s\sSONAME\s+([^\s]+)r)r<r=r@rArBrOrCr6rDr:rGr"rHrI)rPrSrLdumprMrrrrRs"  freebsdopenbsd dragonflyc CsR|jd}g}y"x|r,|jdt|jqWWntk rDYnX|pPtjgS)N.r)rinsertrpopr0r maxsize)ZlibnamepartsZnumsrrr _num_versions r]cCstj|}d||f}tj|}ytjdtjtjd}Wntk rPd}YnX||j j }WdQRXtj ||}|st t |S|jtdtj|d S) Nz:-l%s\.\S+ => \S*/(lib%s\.\S+)/sbin/ldconfig-r)r6r7)keyr)r^r_r )r:r;r"r9r@rArBrOrCr6rDfindallrRrNsortr]rH)r*ZenamerJrLrQrMrrrr+s        c CstjjdsdSttj}d|d<|r,d }nd }d}ytj|tjtj|d}Wnt k rbdSX|:x2|j D](}|j }|j drrtj |jd}qrWWdQRX|sdSx4|jdD]&}tjj|d |}tjj|r|SqWdS) N /usr/bin/crler3r4-64)r6r7r8sDefault Library Path (ELF)::zlib%s.so)rdre)rd)r"r%existsr?r#r@rArBrOrCr6strip startswithrHrr&) r*is64r8rKpathsrLlinedirZlibfilerrr _findLib_crles6       roFcCstt||pt|S)N)rRrorN)r*rkrrrr+scCsddl}|jddkr&tjjd}ntjjd}dddddd }|j|d }d }tj|tj||f}yZt j d d gt j t j t j dddd,}tj ||jj}|rtj|jdSWdQRXWntk rYnXdS)Nrlrfz-32z-64z libc6,x86-64z libc6,64bitz libc6,IA-64)z x86_64-64zppc64-64z sparc64-64zs390x-64zia64-64Zlibc6z\s+(lib%s\.[^\s]+)\s+\(%sz/sbin/ldconfigz-pr3)r4r5)stdinr7r6r8r)structcalcsizer"unamemachinegetr9r:r;r@rArOrBrGr6rDrHrIrC)r*rrruZmach_mapZabi_typeZregexprMrrr_findSoname_ldconfigs.  rxc Csdtj|}ddg}tjjd}|rHx |jdD]}|jd|gq2W|jdtjd|gd}yFtj |tj tj d d }|j \}}tj |tj |} | r| jd }Wn"tk r} zWYdd} ~ XnX|S) Nz[^\(\)\s]*lib%s\.[^\(\)\s]*Zldz-tZLD_LIBRARY_PATHrgz-Lz-oz-l%sT)r6r7Zuniversal_newlinesr)r:r;r"r#rvrextenddevnullr@rArBZ communicaterGrHrI Exception) r*rJcmdZlibpathrresultrwout_rMerrr _findLib_lds&   rcCst|ptt|pt|S)N)rxrRrNr)r*rrrr+,scCsddlm}tjdkr:t|jt|jdttdtjdkrttdttdttdtj d krt|j d t|j d t|j d t|j d n(t|j dt|j dttddS)Nr)cdllrrr,r rbz2r-z libm.dylibzlibcrypto.dylibzlibSystem.dylibzSystem.framework/Systemzlibm.soz libcrypt.soZcrypt) Zctypesrr"r*printrloadr+r platformZ LoadLibrary)rrrrtest4s"         r__main__)rUrVrW)F)r"r<r@r r*rrr+rZctypes.macholib.dyldr.r/r:r>rNrRrjr]rorxrr__name__rrrrs8   +     $  PK!'Y5Y5)__pycache__/__init__.cpython-36.opt-2.pycnu[3 /f1@ @s:ddlZddlZdZddlmZmZmZddlm Z ddlm Z ddlmZ ddlm Z mZddlmZdd lmZee kred ee ejd krdd lmZe Zejd krejdkreejjjdddkreZddlmZmZm Z!m"Z#d|ddZ$d}ddZ%iZ&ddZ'ejd krXddlm(Z)ddlm*Z+iZ,ddZ-e-j.rpe'j.j/dde-_.nejd krpddlm0Z)ddlm1Z1m2Z2m3Z3m4Z4m5Z5ddlm6Z6m7Z7ddlm8Z8d~d d!Z9Gd"d#d#e8Z:e9e:d$Gd%d&d&e8Z;e9e;Gd'd(d(e8Ze9e>ed-ed.krHe=Z?e>Z@n0Gd/d0d0e8Z?e9e?Gd1d2d2e8Z@e9e@Gd3d4d4e8ZAe9eAGd5d6d6e8ZBe9eBGd7d8d8e8ZCe1eCe1eBkreBZCed.ed9kre=ZDe>ZEn0Gd:d;d;e8ZDe9eDGdd?d?e8ZFeFeF_GeF_He9eFGd@dAdAe8ZIeIeI_GeI_He9eIGdBdCdCe8ZJeJeJ_GeJ_He9eJGdDdEdEe8ZKe9eKd$GdFdGdGe8ZLeLZMe9eLGdHdIdIe8ZNddJlmOZOmPZPmQZQGdKdLdLe8ZRGdMdNdNe8ZSdOdPZTddQdRZUdSdTZVdUdVZWGdWdXdXeXZYGdYdZdZeYZZejd krGd[d\d\eYZ[dd]lm\Z\m8Z8Gd^d_d_e8Z]Gd`dadaeYZ^GdbdcdceXZ_e_eYZ`e_eZZaejd kreZdddejbZcn,ejdekreZdfejdddgZcneZdZcejd krJe_e[Zee_e^Zfejd kr(eejgjhZhneejijhZhddhlmjZjmkZkddidjZle1e@e1eLkrfe@Zme?Znn6e1e>e1eLkre>Zme=Znne1eEe1eLkreEZmeDZnddklmoZompZpmqZqmrZre'eLeLeLemeoZse'eLeLe?emepZtdldmZueue:eLe:e:erZvdndoZweue:eLe?eqZxddqdrZyyddslmzZzWne{k r:YnXeue:eLe?ezZ|ddtduZ}ejd krrdvdwZ~dxdyZddzlmZmZeIZeFZxPe;e?e=eDgD]@Ze1edgkreZn&e1ed{kreZne1edkreZqWxPeeEgD]@Ze1edgkreZn&e1ed{kreZne1edkreZqW[eTdS)Nz1.1.0)Union StructureArray)_Pointer)CFuncPtr) __version__) RTLD_LOCAL RTLD_GLOBAL) ArgumentError)calcsizezVersion number mismatchnt) FormatErrorposixdarwin.)FUNCFLAG_CDECLFUNCFLAG_PYTHONAPIFUNCFLAG_USE_ERRNOFUNCFLAG_USE_LASTERRORcCs^t|tr6|dkrt|d}t|}|}||_|St|trRt|}|}|St|dS)N) isinstancebyteslenc_charvalueint TypeError)initsizebuftypebufr"'/usr/lib64/python3.6/ctypes/__init__.pycreate_string_buffer/s   r$cCs t||S)N)r$)rrr"r"r#c_bufferAsr%c st|jddrtO|jddr,tO|r@td|jytfStk rGfdddt}|tf<|SXdS)N use_errnoFuse_last_errorz!unexpected keyword argument(s) %scseZdZZZZdS)z CFUNCTYPE..CFunctionTypeN)__name__ __module__ __qualname__ _argtypes_ _restype__flags_r")argtypesflagsrestyper"r# CFunctionTypecsr1) _FUNCFLAG_CDECLpop_FUNCFLAG_USE_ERRNO_FUNCFLAG_USE_LASTERROR ValueErrorkeys_c_functype_cacheKeyError _CFuncPtr)r0r.kwr1r")r.r/r0r# CFUNCTYPEIs  r<) LoadLibrary)FUNCFLAG_STDCALLc st|jddrtO|jddr,tO|r@td|jytfStk rGfdddt}|tf<|SXdS)Nr&Fr'z!unexpected keyword argument(s) %scseZdZZZZdS)z$WINFUNCTYPE..WinFunctionTypeN)r(r)r*r+r,r-r")r.r/r0r"r#WinFunctionType{sr?) _FUNCFLAG_STDCALLr3r4r5r6r7_win_functype_cacher9r:)r0r.r;r?r")r.r/r0r# WINFUNCTYPEos  rB)dlopen)sizeofbyref addressof alignmentresize) get_errno set_errno) _SimpleCDatacCsJddlm}|dkr|j}t|||}}||krFtd|||fdS)Nr)r z"sizeof(%s) wrong: %d instead of %d)structr _type_rD SystemError)typtypecoder ZactualZrequiredr"r"r# _check_sizes rQcs eZdZdZfddZZS) py_objectOc s.y tjStk r(dt|jSXdS)Nz %s())super__repr__r6typer()self) __class__r"r#rUs zpy_object.__repr__)r(r)r*rMrU __classcell__r"r")rXr#rRsrRPc@seZdZdZdS)c_shorthN)r(r)r*rMr"r"r"r#r[sr[c@seZdZdZdS)c_ushortHN)r(r)r*rMr"r"r"r#r]sr]c@seZdZdZdS)c_longlN)r(r)r*rMr"r"r"r#r_sr_c@seZdZdZdS)c_ulongLN)r(r)r*rMr"r"r"r#rasrair`c@seZdZdZdS)c_intrcN)r(r)r*rMr"r"r"r#rdsrdc@seZdZdZdS)c_uintIN)r(r)r*rMr"r"r"r#resrec@seZdZdZdS)c_floatfN)r(r)r*rMr"r"r"r#rgsrgc@seZdZdZdS)c_doubledN)r(r)r*rMr"r"r"r#risric@seZdZdZdS) c_longdoublegN)r(r)r*rMr"r"r"r#rksrkqc@seZdZdZdS) c_longlongrmN)r(r)r*rMr"r"r"r#rnsrnc@seZdZdZdS) c_ulonglongQN)r(r)r*rMr"r"r"r#rosroc@seZdZdZdS)c_ubyteBN)r(r)r*rMr"r"r"r#rqsrqc@seZdZdZdS)c_bytebN)r(r)r*rMr"r"r"r#rssrsc@seZdZdZdS)rcN)r(r)r*rMr"r"r"r#rsrc@seZdZdZddZdS)c_char_pzcCsd|jjtj|jfS)Nz%s(%s))rXr(c_void_p from_bufferr)rWr"r"r#rUszc_char_p.__repr__N)r(r)r*rMrUr"r"r"r#rvsrvc@seZdZdZdS)rxrZN)r(r)r*rMr"r"r"r#rxsrxc@seZdZdZdS)c_bool?N)r(r)r*rMr"r"r"r#rzsrz)POINTERpointer_pointer_type_cachec@seZdZdZddZdS) c_wchar_pZcCsd|jjtj|jfS)Nz%s(%s))rXr(rxryr)rWr"r"r#rUszc_wchar_p.__repr__N)r(r)r*rMrUr"r"r"r#rsrc@seZdZdZdS)c_wcharuN)r(r)r*rMr"r"r"r#rsrcCsFtjtjtjdkr"tjtjtt _t jtt _t td<dS)Nr ) r~clearr8_osnamerArZ from_paramr|rrvrrxr"r"r"r# _reset_caches   rcCs^t|tr6|dkrt|d}t|}|}||_|St|trRt|}|}|St|dS)Nr)rstrrrrrr)rrr r!r"r"r#create_unicode_buffers   rcCsLtj|ddk rtdt|tkr,td|j||t|<tt|=dS)Nz%This type already exists in the cachezWhat's this???)r~get RuntimeErroridZset_type)r}clsr"r"r#SetPointerType"s  rcCs||S)Nr")rOrr"r"r#ARRAY,src@sJeZdZeZeZdZdZdZ e dddfddZ ddZ d d Z d d ZdS) CDLLzrNFcsb|_j|rtO|r$tOGfdddt}|_|dkrXtj|_n|_dS)NcseZdZZjZdS)zCDLL.__init__.._FuncPtrN)r(r)r*r-_func_restype_r,r")r/rWr"r#_FuncPtrQsr)_name _func_flags_r4r5r:r_dlopen_handle)rWrmodeZhandler&r'rr")r/rWr#__init__Gsz CDLL.__init__cCs8d|jj|j|jtjdd@t|tjdd@fS)Nz<%s '%s', handle %x at %#x>r)rXr(rr_sysmaxsizer)rWr"r"r#rU[s z CDLL.__repr__cCs6|jdr|jdrt||j|}t||||S)N__) startswithendswithAttributeError __getitem__setattr)rWrfuncr"r"r# __getattr__as   zCDLL.__getattr__cCs"|j||f}t|ts||_|S)N)rrrr()rWZname_or_ordinalrr"r"r#rhs zCDLL.__getitem__)r(r)r*r2rrdrrrr DEFAULT_MODErrUrrr"r"r"r#r2s rc@seZdZeeBZdS)PyDLLN)r(r)r*r2_FUNCFLAG_PYTHONAPIrr"r"r"r#rnsrc@seZdZeZdS)WinDLLN)r(r)r*r@rr"r"r"r#rwsr)_check_HRESULTrKc@seZdZdZeZdS)HRESULTr`N)r(r)r*rMrZ_check_retval_r"r"r"r#rs rc@seZdZeZeZdS)OleDLLN)r(r)r*r@rrrr"r"r"r#rsrc@s,eZdZddZddZddZddZd S) LibraryLoadercCs ||_dS)N)_dlltype)rWZdlltyper"r"r#rszLibraryLoader.__init__cCs.|ddkrt||j|}t||||S)Nr_)rrr)rWrZdllr"r"r#rs    zLibraryLoader.__getattr__cCs t||S)N)getattr)rWrr"r"r#rszLibraryLoader.__getitem__cCs |j|S)N)r)rWrr"r"r#r=szLibraryLoader.LoadLibraryN)r(r)r*rrrr=r"r"r"r#rsrz python dllcygwinzlibpython%d.%d.dllr)get_last_errorset_last_errorcCs0|dkrt}|dkr"t|j}td|d|S)N) GetLastErrorr stripOSError)codeZdescrr"r"r#WinErrors  r) _memmove_addr _memset_addr_string_at_addr _cast_addrcsGfdddt}|S)NcseZdZZZeeBZdS)z!PYFUNCTYPE..CFunctionTypeN)r(r)r*r+r,r2rr-r")r.r0r"r#r1sr1)r:)r0r.r1r")r.r0r# PYFUNCTYPEsrcCs t|||S)N)_cast)objrOr"r"r#castsrrcCs t||S)N) _string_at)ptrrr"r"r# string_atsr)_wstring_at_addrcCs t||S)N) _wstring_at)rrr"r"r# wstring_atsrc Cs@ytdttdg}Wntk r,dSX|j|||SdS)Nzcomtypes.server.inprocserver*ii) __import__globalslocals ImportErrorDllGetClassObject)ZrclsidZriidZppvccomr"r"r#rs rc Cs6ytdttdg}Wntk r,dSX|jS)Nzcomtypes.server.inprocserverrr)rrrrDllCanUnloadNow)rr"r"r#rs r)BigEndianStructureLittleEndianStructure)N)N)N)N)NN)rr)r)osrsysrrZ_ctypesrrrrrr:Z_ctypes_versionrr r rLr Z _calcsize Exceptionrr rplatformrunamereleasesplitrr2rrrr4rr5r$r%r8r<r=rr>r@rArB__doc__replacerCrDrErFrGrHrIrJrKrQrRr[r]r_rardrergrirkrnrorqZ __ctype_le__Z __ctype_be__rsrrvrxZc_voidprzr|r}r~rrrrrrobjectrrrrrrrZcdllZpydllZ dllhandleZ pythonapi version_infoZwindllZoledllZkernel32rZcoredllrrrZc_size_tZ c_ssize_trrrrZmemmoveZmemsetrrrrrrrrrrrZctypes._endianrrZc_int8Zc_uint8ZkindZc_int16Zc_int32Zc_int64Zc_uint16Zc_uint32Zc_uint64r"r"r"r#s6          !              <              PK!kO9#__pycache__/wintypes.cpython-36.pycnu[3 \@sddlZejZejZejZejZej Z ej Z ej ZejZejZeZejZGdddejZejZejZejZejZejZZej Z!Z"ej#Z$Z%Z&ej#Z'Z(ej)Z*Z+ej,Z-Z.ej/ejej/ej,krejZ0ejZ1n$ej/ejej/ej,krej Z0ejZ1eZ2eZ3eZ4eZ5eZ6eZ7ej,Z8e8Z9e8Z:e8Z;e8Ze8Z?e8Z@e8ZAe8ZBe8ZCe8ZDe8ZEe8ZFe8ZGe8ZHe8ZIe8ZJe8ZKe8ZLe8ZMe8ZNe8ZOe8ZPe8ZQe8ZRe8ZSe8ZTe8ZUe8ZVe8ZWGdddejXZYeYZZZ[Z\GdddejXZ]e]Z^Gdd d ejXZ_Gd d d ejXZ`e`ZaZbZcGd d d ejXZdedZeZfddZgGdddejXZhehZiGdddejXZjejZkdZlGdddejXZmGdddejXZnejoeZpZqejoeZrejoeZsZtejoeZuejoe4ZvejoeZwZxejoehZyZzejoeZ{ejoe8Z|Z}ejoeGZ~ejoeHZejoeZZejoeZejoe7ZejoeZZejoejZZejoe`ZZejoecZejoeYZZejoe\ZZejoeVZejoeZejoedZZejoefZZejoe^Zejoe ZZejoe"ZejoeZejoeZejoe ZejoemZZejoenZZejoeZZdS)Nc@seZdZdZddZdS) VARIANT_BOOLvcCsd|jj|jfS)Nz%s(%r)) __class____name__value)selfr /usr/lib64/python3.6/wintypes.py__repr__szVARIANT_BOOL.__repr__N)r __module__ __qualname__Z_type_r rrrr rsrc@s(eZdZdefdefdefdefgZdS)RECTlefttoprightZbottomN)rr r LONG_fields_rrrr r asr c@s(eZdZdefdefdefdefgZdS) _SMALL_RECTZLeftZTopZRightZBottomN)rr r SHORTrrrrr rhsrc@seZdZdefdefgZdS)_COORDXYN)rr r rrrrrr rosrc@seZdZdefdefgZdS)POINTxyN)rr r rrrrrr rssrc@seZdZdefdefgZdS)SIZEZcxZcyN)rr r rrrrrr rxsrcCs||d>|d>S)Nr)ZredZgreenZbluerrr RGB}src@seZdZdefdefgZdS)FILETIMEZ dwLowDateTimeZdwHighDateTimeN)rr r DWORDrrrrr rsrc@s4eZdZdefdefdefdefdefdefgZ dS)MSGZhWndmessageZwParamZlParamZtimeZptN) rr r HWNDUINTWPARAMLPARAMr rrrrrr r!s r!ic @sTeZdZdefdefdefdefdefdefdefdefd eefd ed fg Zd S) WIN32_FIND_DATAAdwFileAttributesftCreationTimeftLastAccessTimeftLastWriteTime nFileSizeHigh nFileSizeLow dwReserved0 dwReserved1 cFileNamecAlternateFileNameN)rr r r rCHARMAX_PATHrrrrr r's r'c @sTeZdZdefdefdefdefdefdefdefdefd eefd ed fg Zd S) WIN32_FIND_DATAWr(r)r*r+r,r-r.r/r0r1r2N)rr r r rWCHARr4rrrrr r5s r5)ZctypesZc_byteZBYTEZc_ushortZWORDZc_ulongr Zc_charr3Zc_wcharr6Zc_uintr$Zc_intZINTZc_doubleZDOUBLEZc_floatZFLOATZBOOLEANZc_longZBOOLZ _SimpleCDatarZULONGrZUSHORTZc_shortrZ c_longlongZ_LARGE_INTEGERZ LARGE_INTEGERZ c_ulonglongZ_ULARGE_INTEGERZULARGE_INTEGERZ c_wchar_pZ LPCOLESTRZLPOLESTRZOLESTRZLPCWSTRZLPWSTRZc_char_pZLPCSTRZLPSTRZc_void_pZLPCVOIDZLPVOIDZsizeofr%r&ZATOMZLANGIDZCOLORREFZLGRPIDZLCTYPEZLCIDZHANDLEZHACCELZHBITMAPZHBRUSHZ HCOLORSPACEZHDCZHDESKZHDWPZ HENHMETAFILEZHFONTZHGDIOBJZHGLOBALZHHOOKZHICONZ HINSTANCEZHKEYZHKLZHLOCALZHMENUZ HMETAFILEZHMODULEZHMONITORZHPALETTEZHPENZHRGNZHRSRCZHSTRZHTASKZHWINSTAr#Z SC_HANDLEZSERVICE_STATUS_HANDLEZ Structurer ZtagRECTZ_RECTLZRECTLrZ SMALL_RECTrrZtagPOINTZ_POINTLZPOINTLrZtagSIZEZSIZELrrZ _FILETIMEr!ZtagMSGr4r'r5ZPOINTERZLPBOOLZPBOOLZPBOOLEANZLPBYTEZPBYTEZPCHARZ LPCOLORREFZLPDWORDZPDWORDZ LPFILETIMEZ PFILETIMEZPFLOATZLPHANDLEZPHANDLEZPHKEYZLPHKLZLPINTZPINTZPLARGE_INTEGERZPLCIDZLPLONGZPLONGZLPMSGZPMSGZLPPOINTZPPOINTZPPOINTLZLPRECTZPRECTZLPRECTLZPRECTLZ LPSC_HANDLEZPSHORTZLPSIZEZPSIZEZLPSIZELZPSIZELZ PSMALL_RECTZLPUINTZPUINTZPULARGE_INTEGERZPULONGZPUSHORTZPWCHARZLPWIN32_FIND_DATAAZPWIN32_FIND_DATAAZLPWIN32_FIND_DATAWZPWIN32_FIND_DATAWZLPWORDZPWORDrrrr s                        PK!Η14[[/macholib/__pycache__/dylib.cpython-36.opt-2.pycnu[3 \$@s:ddlZdgZejdZddZddZedkr6edS)N dylib_infoz(?x) (?P^.*)(?:^|/) (?P (?P\w+?) (?:\.(?P[^._]+))? (?:_(?P[^._]+))? \.dylib$ ) cCstj|}|sdS|jS)N)DYLIB_REmatch groupdict)filenameZis_dylibr-/usr/lib64/python3.6/ctypes/macholib/dylib.pyrs cCsddd}dS)NcSst|||||dS)N)locationname shortnameversionsuffix)dict)r r r r r rrrd.s ztest_dylib_info..d)NNNNNr)rrrrtest_dylib_info-s r__main__)re__all__compilerrr__name__rrrrsPK!KW3macholib/__pycache__/framework.cpython-36.opt-2.pycnu[3 \@s:ddlZdgZejdZddZddZedkr6edS)Nframework_infoz(?x) (?P^.*)(?:^|/) (?P (?P\w+).framework/ (?:Versions/(?P[^/]+)/)? (?P=shortname) (?:_(?P[^_]+))? )$ cCstj|}|sdS|jS)N)STRICT_FRAMEWORK_REmatch groupdict)filenameZ is_frameworkr1/usr/lib64/python3.6/ctypes/macholib/framework.pyrs cCsddd}dS)NcSst|||||dS)N)locationname shortnameversionsuffix)dict)r r r r r rrrd-s ztest_framework_info..d)NNNNNr)rrrrtest_framework_info,s r__main__)re__all__compilerrr__name__rrrrsPK!;7pp)macholib/__pycache__/dylib.cpython-36.pycnu[3 \$@s>dZddlZdgZejdZddZddZedkr:edS) z! Generic dylib path manipulation N dylib_infoz(?x) (?P^.*)(?:^|/) (?P (?P\w+?) (?:\.(?P[^._]+))? (?:_(?P[^._]+))? \.dylib$ ) cCstj|}|sdS|jS)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_REmatch groupdict)filenameZis_dylibr/usr/lib64/python3.6/dylib.pyrs cCsddd}tddksttddks*ttd|dddksBttd |dd dd d ks^ttd |ddddksxttd|ddddksttd|ddddd kstdS)NcSst|||||dS)N)locationname shortnameversionsuffix)dict)r r r r r rrrd.s ztest_dylib_info..dzcompletely/invalidzcompletely/invalide_debugz P/Foo.dylibPz Foo.dylibZFoozP/Foo_debug.dylibzFoo_debug.dylibdebug)r z P/Foo.A.dylibz Foo.A.dylibAzP/Foo_debug.A.dylibzFoo_debug.A.dylibZ Foo_debugzP/Foo.A_debug.dylibzFoo.A_debug.dylib)NNNNN)rAssertionError)rrrrtest_dylib_info-s r__main__)__doc__re__all__compilerrr__name__rrrrsPK!d(macholib/__pycache__/dyld.cpython-36.pycnu[3 \E@sdZddlZddlmZddlmZddlTdddd gZejj d d d d gZ ejj ddddgZ ddZ d+ddZ d,ddZd-ddZd.ddZd/ddZd0ddZd1d d!Zd2d"d#Zd3d$d%Zd4d&dZd5d'dZd(d)Zed*kredS)6z dyld emulation N)framework_info) dylib_info)* dyld_findframework_findrrz~/Library/Frameworksz/Library/Frameworksz/Network/Library/Frameworksz/System/Library/Frameworksz~/libz/usr/local/libz/libz/usr/libcCs.|dkrtj}|j|}|dkr$gS|jdS)N:)osenvirongetsplit)envvarZrvalr/usr/lib64/python3.6/dyld.pydyld_envs  rcCs|dkrtj}|jdS)NZDYLD_IMAGE_SUFFIX)rr r )r rrrdyld_image_suffix'srcCs t|dS)NZDYLD_FRAMEWORK_PATH)r)r rrrdyld_framework_path,srcCs t|dS)NZDYLD_LIBRARY_PATH)r)r rrrdyld_library_path/srcCs t|dS)NZDYLD_FALLBACK_FRAMEWORK_PATH)r)r rrrdyld_fallback_framework_path2srcCs t|dS)NZDYLD_FALLBACK_LIBRARY_PATH)r)r rrrdyld_fallback_library_path5srcCs(t|}|dkr|S||fdd}|S)z>For a potential path iterator, add DYLD_IMAGE_SUFFIX semanticsNcssJxD|D]<}|jdr2|dtd |dVn ||V|VqWdS)Nz.dylib)endswithlen)iteratorsuffixpathrrr_inject=s    z)dyld_image_suffix_search.._inject)r)rr rrrrrdyld_image_suffix_search8s rccsdt|}|dk r6x$t|D]}tjj||dVqWx(t|D]}tjj|tjj|Vq@WdS)Nname)rrrrjoinrbasename)rr frameworkrrrrdyld_override_searchFs r!ccs2|jdr.|dk r.tjj||tddVdS)Nz@executable_path/) startswithrrrr)rexecutable_pathrrrdyld_executable_path_searchWsr$ccs|Vt|}|dk r@t|}x |D]}tjj||dVq$Wt|}x$|D]}tjj|tjj|VqNW|dk r| rx tD]}tjj||dVqW|sx$tD]}tjj|tjj|VqWdS)Nr) rrrrrrrDEFAULT_FRAMEWORK_FALLBACKDEFAULT_LIBRARY_FALLBACK)rr r Zfallback_framework_pathrZfallback_library_pathrrrdyld_default_search^s    r'cCsPxs:               PK! 2macholib/__pycache__/__init__.cpython-36.opt-1.pycnu[3 \@s dZdZdS)z~ Enough Mach-O to make your head spin. See the relevant header files in /usr/include/mach-o And also Apple's documentation. z1.0N)__doc__ __version__rr /usr/lib64/python3.6/__init__.pysPK! ,macholib/__pycache__/__init__.cpython-36.pycnu[3 \@s dZdZdS)z~ Enough Mach-O to make your head spin. See the relevant header files in /usr/include/mach-o And also Apple's documentation. z1.0N)__doc__ __version__rr /usr/lib64/python3.6/__init__.pysPK!l8611.macholib/__pycache__/dyld.cpython-36.opt-1.pycnu[3 \E@sdZddlZddlmZddlmZddlTdddd gZejj d d d d gZ ejj ddddgZ ddZ d+ddZ d,ddZd-ddZd.ddZd/ddZd0ddZd1d d!Zd2d"d#Zd3d$d%Zd4d&dZd5d'dZd(d)Zed*kredS)6z dyld emulation N)framework_info) dylib_info)* dyld_findframework_findrrz~/Library/Frameworksz/Library/Frameworksz/Network/Library/Frameworksz/System/Library/Frameworksz~/libz/usr/local/libz/libz/usr/libcCs.|dkrtj}|j|}|dkr$gS|jdS)N:)osenvirongetsplit)envvarZrvalr/usr/lib64/python3.6/dyld.pydyld_envs  rcCs|dkrtj}|jdS)NZDYLD_IMAGE_SUFFIX)rr r )r rrrdyld_image_suffix'srcCs t|dS)NZDYLD_FRAMEWORK_PATH)r)r rrrdyld_framework_path,srcCs t|dS)NZDYLD_LIBRARY_PATH)r)r rrrdyld_library_path/srcCs t|dS)NZDYLD_FALLBACK_FRAMEWORK_PATH)r)r rrrdyld_fallback_framework_path2srcCs t|dS)NZDYLD_FALLBACK_LIBRARY_PATH)r)r rrrdyld_fallback_library_path5srcCs(t|}|dkr|S||fdd}|S)z>For a potential path iterator, add DYLD_IMAGE_SUFFIX semanticsNcssJxD|D]<}|jdr2|dtd |dVn ||V|VqWdS)Nz.dylib)endswithlen)iteratorsuffixpathrrr_inject=s    z)dyld_image_suffix_search.._inject)r)rr rrrrrdyld_image_suffix_search8s rccsdt|}|dk r6x$t|D]}tjj||dVqWx(t|D]}tjj|tjj|Vq@WdS)Nname)rrrrjoinrbasename)rr frameworkrrrrdyld_override_searchFs r!ccs2|jdr.|dk r.tjj||tddVdS)Nz@executable_path/) startswithrrrr)rexecutable_pathrrrdyld_executable_path_searchWsr$ccs|Vt|}|dk r@t|}x |D]}tjj||dVq$Wt|}x$|D]}tjj|tjj|VqNW|dk r| rx tD]}tjj||dVqW|sx$tD]}tjj|tjj|VqWdS)Nr) rrrrrrrDEFAULT_FRAMEWORK_FALLBACKDEFAULT_LIBRARY_FALLBACK)rr r Zfallback_framework_pathrZfallback_library_pathrrrdyld_default_search^s    r'cCsPxs:               PK!M2macholib/__pycache__/__init__.cpython-36.opt-2.pycnu[3 \@sdZdS)z1.0N) __version__rr0/usr/lib64/python3.6/ctypes/macholib/__init__.py sPK!.macholib/__pycache__/dyld.cpython-36.opt-2.pycnu[3 \E@sddlZddlmZddlmZddlTddddgZejjd d d d gZ ejjd dddgZ ddZ d*ddZ d+ddZ d,ddZd-ddZd.ddZd/ddZd0dd Zd1d!d"Zd2d#d$Zd3d%dZd4d&dZd'd(Zed)kredS)5N)framework_info) dylib_info)* dyld_findframework_findrrz~/Library/Frameworksz/Library/Frameworksz/Network/Library/Frameworksz/System/Library/Frameworksz~/libz/usr/local/libz/libz/usr/libcCs.|dkrtj}|j|}|dkr$gS|jdS)N:)osenvirongetsplit)envvarZrvalr,/usr/lib64/python3.6/ctypes/macholib/dyld.pydyld_envs  rcCs|dkrtj}|jdS)NZDYLD_IMAGE_SUFFIX)rr r )r rrrdyld_image_suffix'srcCs t|dS)NZDYLD_FRAMEWORK_PATH)r)r rrrdyld_framework_path,srcCs t|dS)NZDYLD_LIBRARY_PATH)r)r rrrdyld_library_path/srcCs t|dS)NZDYLD_FALLBACK_FRAMEWORK_PATH)r)r rrrdyld_fallback_framework_path2srcCs t|dS)NZDYLD_FALLBACK_LIBRARY_PATH)r)r rrrdyld_fallback_library_path5srcCs(t|}|dkr|S||fdd}|S)NcssJxD|D]<}|jdr2|dtd |dVn ||V|VqWdS)Nz.dylib)endswithlen)iteratorsuffixpathrrr_inject=s    z)dyld_image_suffix_search.._inject)r)rr rrrrrdyld_image_suffix_search8s rccsdt|}|dk r6x$t|D]}tjj||dVqWx(t|D]}tjj|tjj|Vq@WdS)Nname)rrrrjoinrbasename)rr frameworkrrrrdyld_override_searchFs r!ccs2|jdr.|dk r.tjj||tddVdS)Nz@executable_path/) startswithrrrr)rexecutable_pathrrrdyld_executable_path_searchWsr$ccs|Vt|}|dk r@t|}x |D]}tjj||dVq$Wt|}x$|D]}tjj|tjj|VqNW|dk r| rx tD]}tjj||dVqW|sx$tD]}tjj|tjj|VqWdS)Nr) rrrrrrrDEFAULT_FRAMEWORK_FALLBACKDEFAULT_LIBRARY_FALLBACK)rr r Zfallback_framework_pathrZfallback_library_pathrrrdyld_default_search^s    r'cCsPxs8               PK!lN993macholib/__pycache__/framework.cpython-36.opt-1.pycnu[3 \@s>dZddlZdgZejdZddZddZedkr:edS) z% Generic framework path manipulation Nframework_infoz(?x) (?P^.*)(?:^|/) (?P (?P\w+).framework/ (?:Versions/(?P[^/]+)/)? (?P=shortname) (?:_(?P[^_]+))? )$ cCstj|}|sdS|jS)a} A framework name can take one of the following four forms: Location/Name.framework/Versions/SomeVersion/Name_Suffix Location/Name.framework/Versions/SomeVersion/Name Location/Name.framework/Name_Suffix Location/Name.framework/Name returns None if not found, or a mapping equivalent to: dict( location='Location', name='Name.framework/Versions/SomeVersion/Name_Suffix', shortname='Name', version='SomeVersion', suffix='Suffix', ) Note that SomeVersion and Suffix are optional and may be None if not present N)STRICT_FRAMEWORK_REmatch groupdict)filenameZ is_frameworkr!/usr/lib64/python3.6/framework.pyrs cCsddd}dS)NcSst|||||dS)N)locationname shortnameversionsuffix)dict)r r r r r rrrd-s ztest_framework_info..d)NNNNNr)rrrrtest_framework_info,s r__main__)__doc__re__all__compilerrr__name__rrrrsPK!-macholib/__pycache__/framework.cpython-36.pycnu[3 \@s>dZddlZdgZejdZddZddZedkr:edS) z% Generic framework path manipulation Nframework_infoz(?x) (?P^.*)(?:^|/) (?P (?P\w+).framework/ (?:Versions/(?P[^/]+)/)? (?P=shortname) (?:_(?P[^_]+))? )$ cCstj|}|sdS|jS)a} A framework name can take one of the following four forms: Location/Name.framework/Versions/SomeVersion/Name_Suffix Location/Name.framework/Versions/SomeVersion/Name Location/Name.framework/Name_Suffix Location/Name.framework/Name returns None if not found, or a mapping equivalent to: dict( location='Location', name='Name.framework/Versions/SomeVersion/Name_Suffix', shortname='Name', version='SomeVersion', suffix='Suffix', ) Note that SomeVersion and Suffix are optional and may be None if not present N)STRICT_FRAMEWORK_REmatch groupdict)filenameZ is_frameworkr!/usr/lib64/python3.6/framework.pyrs cCsddd}tddksttddks*ttddks:ttddksJttd|dd d ksbttd |dd d d dks~ttddksttddksttd|ddd dksttd|ddd dd kstdS)NcSst|||||dS)N)locationname shortnameversionsuffix)dict)r r r r r rrrd-s ztest_framework_info..dzcompletely/invalidzcompletely/invalid/_debugz P/F.frameworkzP/F.framework/_debugzP/F.framework/FPz F.framework/FFzP/F.framework/F_debugzF.framework/F_debugdebug)r zP/F.framework/VersionszP/F.framework/Versions/AzP/F.framework/Versions/A/FzF.framework/Versions/A/FAz P/F.framework/Versions/A/F_debugzF.framework/Versions/A/F_debug)NNNNN)rAssertionError)rrrrtest_framework_info,s r__main__)__doc__re__all__compilerrr__name__rrrrsPK! sO/macholib/__pycache__/dylib.cpython-36.opt-1.pycnu[3 \$@s>dZddlZdgZejdZddZddZedkr:edS) z! Generic dylib path manipulation N dylib_infoz(?x) (?P^.*)(?:^|/) (?P (?P\w+?) (?:\.(?P[^._]+))? (?:_(?P[^._]+))? \.dylib$ ) cCstj|}|sdS|jS)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_REmatch groupdict)filenameZis_dylibr/usr/lib64/python3.6/dylib.pyrs cCsddd}dS)NcSst|||||dS)N)locationname shortnameversionsuffix)dict)r r r r r rrrd.s ztest_dylib_info..d)NNNNNr)rrrrtest_dylib_info-s r__main__)__doc__re__all__compilerrr__name__rrrrsPK!'k"__pycache__/_endian.cpython-35.pycnu[ Yf@sddlZddlTeeZddZGdddeeZejdkrdZ eZ Gd d d ed eZ nFejd krd Z eZ Gddded eZ n e ddS)N)*cCsft|trt|tSt|tr?t|j|jSt|t rR|St d|dS)zReturn the type with the 'other' byte order. Simple types like c_int and so on already have __ctype_be__ and __ctype_le__ attributes which contain the types, for more complicated types arrays and structures are supported. z+This type does not support other endian: %sN) hasattr _OTHER_ENDIANgetattr isinstance _array_type _other_endianZ_type_Z_length_ issubclass Structure TypeError)typr 3/opt/alt/python35/lib64/python3.5/ctypes/_endian.pyrs rcs"eZdZfddZS) _swapped_metacs|dkrjg}xO|D]G}|d}|d}|dd}|j|t|f|qW|}tj||dS)NZ_fields_r)appendrsuper __setattr__)selfZattrnamevalueZfieldsZdescnamer rest) __class__r rrs    !z_swapped_meta.__setattr__)__name__ __module__ __qualname__rr r )rrrs rlittleZ __ctype_be__c@s"eZdZdZfZdZdS)BigEndianStructurez$Structure with big endian byte orderN)rrr__doc__ __slots___swappedbytes_r r r rr.s r metaclassZbigZ __ctype_le__c@s"eZdZdZfZdZdS)LittleEndianStructurez'Structure with little endian byte orderN)rrrrr r!r r r rr#7s r#zInvalid byteorder) sysZctypestypeZArrayrrr r byteorderrr#r RuntimeErrorr r r rs    PK!Ifcjj#__pycache__/wintypes.cpython-35.pycnu[ Yf@sddlZejZejZejZejZej Z ej Z ej ZejZejZeZejZGdddejZejZejZejZejZejZZej Z!Z"ej#Z$Z%Z&ej#Z'Z(ej)Z*Z+ej,Z-Z.ej/ejej/ej,kr4ejZ0ejZ1n6ej/ejej/ej,krjej Z0ejZ1eZ2eZ3eZ4eZ5eZ6eZ7ej,Z8e8Z9e8Z:e8Z;e8Z<e8Z=e8Z>e8Z?e8Z@e8ZAe8ZBe8ZCe8ZDe8ZEe8ZFe8ZGe8ZHe8ZIe8ZJe8ZKe8ZLe8ZMe8ZNe8ZOe8ZPe8ZQe8ZRe8ZSe8ZTe8ZUe8ZVe8ZWGdddejXZYeYZZZ[Z\GdddejXZ]e]Z^Gdd d ejXZ_Gd d d ejXZ`e`ZaZbZcGd d d ejXZdedZeZfddZgGdddejXZhehZiGdddejXZjejZkdZlGdddejXZmGdddejXZnejoeZpZqejoeZrejoeZsZtejoeZuejoe4ZvejoeZwZxejoehZyZzejoeZ{ejoe8Z|Z}ejoeGZ~ejoeHZejoeZZejoeZejoe7ZejoeZZejoejZZejoe`ZZejoecZejoeYZZejoe\ZZejoeVZejoeZejoedZZejoefZZejoe^Zejoe ZZejoe"ZejoeZejoeZejoe ZejoemZZejoenZZejoeZZdS)Nc@s"eZdZdZddZdS) VARIANT_BOOLvcCsd|jj|jfS)Nz%s(%r)) __class____name__value)selfr4/opt/alt/python35/lib64/python3.5/ctypes/wintypes.py__repr__szVARIANT_BOOL.__repr__N)r __module__ __qualname__Z_type_r rrrr rs rc@s:eZdZdefdefdefdefgZdS)RECTlefttoprightZbottomN)rr r LONG_fields_rrrr r as    r c@s:eZdZdefdefdefdefgZdS) _SMALL_RECTZLeftZTopZRightZBottomN)rr r SHORTrrrrr rhs    rc@s(eZdZdefdefgZdS)_COORDXYN)rr r rrrrrr ros  rc@s(eZdZdefdefgZdS)POINTxyN)rr r rrrrrr rss  rc@s(eZdZdefdefgZdS)SIZEZcxZcyN)rr r rrrrrr rxs  rcCs||d>|d>S)Nr)ZredZgreenZbluerrr RGB}src@s(eZdZdefdefgZdS)FILETIMEZ dwLowDateTimeZdwHighDateTimeN)rr r DWORDrrrrr rs  rc@sLeZdZdefdefdefdefdefdefgZ dS)MSGZhWndmessageZwParamZlParamZtimeZptN) rr r HWNDUINTWPARAMLPARAMr rrrrrr r!s      r!ic @sxeZdZdefdefdefdefdefdefdefdefd eefd ed fg Zd S) WIN32_FIND_DATAAdwFileAttributesftCreationTimeftLastAccessTimeftLastWriteTime nFileSizeHigh nFileSizeLow dwReserved0 dwReserved1 cFileNamecAlternateFileNameN)rr r r rCHARMAX_PATHrrrrr r's          r'c @sxeZdZdefdefdefdefdefdefdefdefd eefd ed fg Zd S) WIN32_FIND_DATAWr(r)r*r+r,r-r.r/r0r1r2N)rr r r rWCHARr4rrrrr r5s          r5)ZctypesZc_byteZBYTEZc_ushortZWORDZc_ulongr Zc_charr3Zc_wcharr6Zc_uintr$Zc_intZINTZc_doubleZDOUBLEZc_floatZFLOATZBOOLEANZc_longZBOOLZ _SimpleCDatarZULONGrZUSHORTZc_shortrZ c_longlongZ_LARGE_INTEGERZ LARGE_INTEGERZ c_ulonglongZ_ULARGE_INTEGERZULARGE_INTEGERZ c_wchar_pZ LPCOLESTRZLPOLESTRZOLESTRZLPCWSTRZLPWSTRZc_char_pZLPCSTRZLPSTRZc_void_pZLPCVOIDZLPVOIDZsizeofr%r&ZATOMZLANGIDZCOLORREFZLGRPIDZLCTYPEZLCIDZHANDLEZHACCELZHBITMAPZHBRUSHZ HCOLORSPACEZHDCZHDESKZHDWPZ HENHMETAFILEZHFONTZHGDIOBJZHGLOBALZHHOOKZHICONZ HINSTANCEZHKEYZHKLZHLOCALZHMENUZ HMETAFILEZHMODULEZHMONITORZHPALETTEZHPENZHRGNZHRSRCZHSTRZHTASKZHWINSTAr#Z SC_HANDLEZSERVICE_STATUS_HANDLEZ Structurer ZtagRECTZ_RECTLZRECTLrZ SMALL_RECTrrZtagPOINTZ_POINTLZPOINTLrZtagSIZEZSIZELrrZ _FILETIMEr!ZtagMSGr4r'r5ZPOINTERZLPBOOLZPBOOLZPBOOLEANZLPBYTEZPBYTEZPCHARZ LPCOLORREFZLPDWORDZPDWORDZ LPFILETIMEZ PFILETIMEZPFLOATZLPHANDLEZPHANDLEZPHKEYZLPHKLZLPINTZPINTZPLARGE_INTEGERZPLCIDZLPLONGZPLONGZLPMSGZPMSGZLPPOINTZPPOINTZPPOINTLZLPRECTZPRECTZLPRECTLZPRECTLZ LPSC_HANDLEZPSHORTZLPSIZEZPSIZEZLPSIZELZPSIZELZ PSMALL_RECTZLPUINTZPUINTZPULARGE_INTEGERZPULONGZPUSHORTZPWCHARZLPWIN32_FIND_DATAAZPWIN32_FIND_DATAAZLPWIN32_FIND_DATAWZPWIN32_FIND_DATAWZLPWORDZPWORDrrrr s                    $  $      PK!4O+FF%__pycache__/util.cpython-35.opt-2.pycnu[ ]>+@sddlZddlZddlZddlZejdkrcddZddZddZejd kr~d dZejd krejd krdd l m Z ddZnejd krddl Z ddl Z ddZejdkr ddZn ddZejjd%rEddZddZnEejdkrrddZdddZndd Zd!dZd"d#Zed$kredS)&NntcCsd}tjj|}|d kr(dS|t|}tj|djdd\}}t|dd d}|dkr|d7}t|ddd}|dkrd }|dkr||SdS) NzMSC v.  g$@r)sysversionfindlensplitint)prefixisrestZ majorVersionZ minorVersionr)/opt/alt/python35/lib64/python3.5/util.py_get_build_version s %    rcCst}|dkrdS|dkr.d}n!|dkrKd|d}ndSddl}d|jjkrw|d7}|d S) Nrmsvcrtrzmsvcr%d rz_d.pyddz.dll)rZimportlib.machinery machineryEXTENSION_SUFFIXES)r Zclibname importlibrrr find_msvcrt"s       rcCs|dkrtSxtjdjtjD]i}tjj||}tjj|r^|S|jj drvq-|d}tjj|r-|Sq-WdS)NcmPATHz.dll)rr ) rosenvironrpathseppathjoinisfilelowerendswith)nameZ directoryZfnamerrr find_library7s   r+ZcecCs|S)Nr)r*rrrr+Msposixdarwin) dyld_findc Cs\d|d|d||fg}x4|D],}yt|SWq(tk rSw(Yq(Xq(WdS)Nz lib%s.dylibz%s.dylibz%s.framework/%s) _dyld_find ValueError)r*possiblerrrr+Rs   c !CsStjdtj|}tjd}|s@tjd}|sJdStj}z|dd|jd|g}t tj }d|d \S*/(lib%s\.\S+)/sbin/ldconfig-rr6r7keyr)r`rar )r:r;r"r9rArBrCrQrEr6rFfindallrTrPsortr_rJ)r*ZenamerLrNrSrOrrrr+s     c Cs;tjjdsdSttj}d|d<|r>d }nd }d}y+tj|dtjdtjd|}Wnt k rdSYnX|MxE|j D]:}|j }|j drtj |jd }qWWdQRX|sdSxF|jd D]5}tjj|d |}tjj|r|SqWdS)N /usr/bin/crler3r4-64r6r7r8sDefault Library Path (ELF)::zlib%s.so)rfrg)rf)r"r%existsr@r#rArBrCrQrEr6strip startswithrJrr&) r*is64r8rMpathsrNlinedirZlibfilerrr _findLib_crles6         $rqFcCstt||pt|S)N)rTrqrP)r*rmrrrr+scCsBddl}|jddkr7tjjd}ntjjd}dddd d d d d d d i}|j|d}tjdtj||f}yt j ddgdt j dt j dt j dddddi>}tj ||jj}|r!tj|jdSWdQRXWntk r=YnXdS)Nrlrhz-32z-64z x86_64-64z libc6,x86-64zppc64-64z libc6,64bitz sparc64-64zs390x-64zia64-64z libc6,IA-64Zlibc6z\s+(lib%s\.[^\s]+)\s+\(%sz/sbin/ldconfigz-pstdinr7r6r8r4r3r5r)structcalcsizer"unamemachinegetr9r:r;rArBrQrCrIr6rFrJrKrE)r*rtrwZmach_mapZabi_typeZregexprOrrr_findSoname_ldconfigs.     ! rzcCst|ptt|S)N)rzrTrP)r*rrrr+ scCs&ddlm}tjdkrOt|jt|jdttdtjdkr"ttdttdttdtj d krt|j d t|j d t|j d t|j d n6t|j dt|j dttddS)Nr)cdllrrr,r rbz2r-z libm.dylibzlibcrypto.dylibzlibSystem.dylibzSystem.framework/Systemzlibm.soz libcrypt.soZcrypt) Zctypesr{r"r*printrloadr+r platformZ LoadLibrary)r{rrrtest&s" r__main__)rWrXrY)r"r<rAr r*rrr+rZctypes.macholib.dyldr.r/r:r>rPrTrlr_rqrzr__name__rrrrs:          +   $    PK!5Zcc)__pycache__/wintypes.cpython-35.opt-2.pycnu[ ]@sddlZejZejZejZejZej Z ej Z ej ZejZejZeZejZGdddejZejZejZejZejZejZZej Z!Z"ej#Z$Z%Z&ej#Z'Z(ej)Z*Z+ej,Z-Z.ej/ejej/ej,kr4ejZ0ejZ1n6ej/ejej/ej,krjej Z0ejZ1eZ2eZ3eZ4eZ5eZ6eZ7ej,Z8e8Z9e8Z:e8Z;e8Z<e8Z=e8Z>e8Z?e8Z@e8ZAe8ZBe8ZCe8ZDe8ZEe8ZFe8ZGe8ZHe8ZIe8ZJe8ZKe8ZLe8ZMe8ZNe8ZOe8ZPe8ZQe8ZRe8ZSe8ZTe8ZUe8ZVe8ZWGdddejXZYeYZZZ[Z\GdddejXZ]e]Z^Gdd d ejXZ_Gd d d ejXZ`e`ZaZbZcGd d d ejXZdedZeZfddZgGdddejXZhehZiGdddejXZjejZkdZlGdddejXZmGdddejXZnejoeZpZqejoeZrejoeZsZtejoeZuejoe4ZvejoeZwZxejoehZyZzejoeZ{ejoe8Z|Z}ejoeGZ~ejoeHZejoeZZejoeZejoe7ZejoeZZejoejZZejoe`ZZejoecZejoeYZZejoe\ZZejoeVZejoeZejoedZZejoefZZejoe^Zejoe ZZejoe"ZejoeZejoeZejoe ZejoemZZejoenZZejoeZZdS)Nc@s"eZdZdZddZdS) VARIANT_BOOLvcCsd|jj|jfS)Nz%s(%r)) __class____name__value)selfr-/opt/alt/python35/lib64/python3.5/wintypes.py__repr__szVARIANT_BOOL.__repr__N)r __module__ __qualname__Z_type_r rrrr rs rc@s:eZdZdefdefdefdefgZdS)RECTlefttoprightZbottomN)rr r LONG_fields_rrrr r as    r c@s:eZdZdefdefdefdefgZdS) _SMALL_RECTZLeftZTopZRightZBottomN)rr r SHORTrrrrr rhs    rc@s(eZdZdefdefgZdS)_COORDXYN)rr r rrrrrr ros  rc@s(eZdZdefdefgZdS)POINTxyN)rr r rrrrrr rss  rc@s(eZdZdefdefgZdS)SIZEZcxcyN)rr r rrrrrr rxs  rcCs||d>|d>S)Nr)ZredZgreenZbluerrr RGB}src@s(eZdZdefdefgZdS)FILETIMEZ dwLowDateTimeZdwHighDateTimeN)rr r DWORDrrrrr r s  r c@sLeZdZdefdefdefdefdefdefgZ dS)MSGZhWndmessageZwParamZlParamtimeptN) rr r HWNDUINTWPARAMLPARAMr!rrrrrr r"s      r"ic @sxeZdZdefdefdefdefdefdefdefdefd eefd ed fg Zd S) WIN32_FIND_DATAAdwFileAttributesftCreationTimeftLastAccessTimeftLastWriteTime nFileSizeHigh nFileSizeLow dwReserved0 dwReserved1 cFileNamecAlternateFileNameN)rr r r!r CHARMAX_PATHrrrrr r*s          r*c @sxeZdZdefdefdefdefdefdefdefdefd eefd ed fg Zd S) WIN32_FIND_DATAWr+r,r-r.r/r0r1r2r3r4r5N)rr r r!r WCHARr7rrrrr r8s          r8)ZctypesZc_byteZBYTEZc_ushortZWORDZc_ulongr!Zc_charr6Zc_wcharr9Zc_uintr'Zc_intINTZc_doubleZDOUBLEZc_floatFLOATZBOOLEANZc_longZBOOLZ _SimpleCDatarZULONGrZUSHORTZc_shortrZ c_longlongZ_LARGE_INTEGERZ LARGE_INTEGERZ c_ulonglongZ_ULARGE_INTEGERZULARGE_INTEGERZ c_wchar_pZ LPCOLESTRZLPOLESTRZOLESTRZLPCWSTRZLPWSTRZc_char_pZLPCSTRZLPSTRZc_void_pZLPCVOIDZLPVOIDZsizeofr(r)ZATOMZLANGIDZCOLORREFZLGRPIDZLCTYPEZLCIDZHANDLEZHACCELZHBITMAPZHBRUSHZ HCOLORSPACEZHDCZHDESKZHDWPZ HENHMETAFILEZHFONTZHGDIOBJZHGLOBALZHHOOKZHICONZ HINSTANCEZHKEYZHKLZHLOCALZHMENUZ HMETAFILEZHMODULEZHMONITORZHPALETTEZHPENZHRGNZHRSRCZHSTRZHTASKZHWINSTAr&Z SC_HANDLEZSERVICE_STATUS_HANDLEZ Structurer ZtagRECTZ_RECTLZRECTLrZ SMALL_RECTrrZtagPOINTZ_POINTLZPOINTLrZtagSIZEZSIZELrr Z _FILETIMEr"ZtagMSGr7r*r8ZPOINTERZLPBOOLZPBOOLZPBOOLEANZLPBYTEZPBYTEZPCHARZ LPCOLORREFZLPDWORDZPDWORDZ LPFILETIMEZ PFILETIMEZPFLOATZLPHANDLEZPHANDLEZPHKEYZLPHKLZLPINTZPINTZPLARGE_INTEGERZPLCIDZLPLONGZPLONGZLPMSGZPMSGZLPPOINTZPPOINTZPPOINTLZLPRECTZPRECTZLPRECTLZPRECTLZ LPSC_HANDLEZPSHORTZLPSIZEZPSIZEZLPSIZELZPSIZELZ PSMALL_RECTZLPUINTZPUINTZPULARGE_INTEGERZPULONGZPUSHORTZPWCHARZLPWIN32_FIND_DATAAZPWIN32_FIND_DATAAZLPWIN32_FIND_DATAWZPWIN32_FIND_DATAWZLPWORDZPWORDrrrr s                    $  $      PK!(__pycache__/_endian.cpython-35.opt-2.pycnu[ ]@sddlZddlTeeZddZGdddeeZejdkrdZ eZ Gd d d ed eZ nFejd krd Z eZ Gddded eZ n e ddS)N)*cCsft|trt|tSt|tr?t|j|jSt|t rR|St d|dS)Nz+This type does not support other endian: %s) hasattr _OTHER_ENDIANgetattr isinstance _array_type _other_endianZ_type_Z_length_ issubclass Structure TypeError)typr ,/opt/alt/python35/lib64/python3.5/_endian.pyrs rcs"eZdZfddZS) _swapped_metacs|dkrjg}xO|D]G}|d}|d}|dd}|j|t|f|qW|}tj||dS)NZ_fields_r)appendrsuper __setattr__)selfZattrnamevalueZfieldsZdescnamer rest) __class__r rrs    !z_swapped_meta.__setattr__)__name__ __module__ __qualname__rr r )rrrs rlittleZ __ctype_be__c@seZdZfZdZdS)BigEndianStructureN)rrr __slots___swappedbytes_r r r rr.s r metaclassbigZ __ctype_le__c@seZdZfZdZdS)LittleEndianStructureN)rrrrr r r r rr#7s r#zInvalid byteorder) sysZctypestypeArrayrrr r byteorderrr#r RuntimeErrorr r r rs    PK!ȵFEE%__pycache__/util.cpython-35.opt-1.pycnu[ Yf>+@sddlZddlZddlZddlZejdkrcddZddZddZejd kr~d dZejd krejd krdd l m Z ddZnejd krddl Z ddl Z ddZejdkr ddZn ddZejjd%rEddZddZnEejdkrrddZdddZndd Zd!dZd"d#Zed$kredS)&NntcCsd}tjj|}|d kr(dS|t|}tj|djdd\}}t|dd d}|dkr|d7}t|ddd }|dkrd }|dkr||SdS) zReturn the version of MSVC that was used to build Python. For Python 2.3 and up, the version number is included in sys.version. For earlier versions, assume the compiler is MSVC 6. zMSC v.N  g$@r)sysversionfindlensplitint)prefixisrestZ majorVersionZ minorVersionr0/opt/alt/python35/lib64/python3.5/ctypes/util.py_get_build_version s %    rcCst}|dkrdS|dkr.d}n!|dkrKd|d}ndSddl}d|jjkrw|d 7}|d S) z%Return the name of the VC runtime dllNrmsvcrtrzmsvcr%d rz_d.pyddz.dll)rimportlib.machinery machineryEXTENSION_SUFFIXES)r Zclibname importlibrrr find_msvcrt"s       rcCs|dkrtSxtjdjtjD]i}tjj||}tjj|r^|S|jj drvq-|d}tjj|r-|Sq-WdS)NcmPATHz.dll)r r!) rosenvironrpathseppathjoinisfilelowerendswith)nameZ directoryZfnamerrr find_library7s   r,ZcecCs|S)Nr)r+rrrr,Msposixdarwin) dyld_findc Cs\d|d|d||fg}x4|D],}yt|SWq(tk rSw(Yq(Xq(WdS)Nz lib%s.dylibz%s.dylibz%s.framework/%s) _dyld_find ValueError)r+Zpossiblerrrr,Rs   c !CsStjdtj|}tjd}|s@tjd}|sJdStj}z|dd|jd|g}t tj }d|d \S*/(lib%s\.\S+)/sbin/ldconfig-rr6r7keyr)r^r_r )r:r;r#r9r@rArBrOrCr6rDfindallrRrNsortr]rH)r+ZenamerJrLrQrMrrrr,s     c Cs;tjjdsdSttj}d|d<|r>d }nd }d}y+tj|dtjdtjd|}Wnt k rdSYnX|MxE|j D]:}|j }|j drtj |jd }qWWdQRX|sdSxF|jd D]5}tjj|d |}tjj|r|SqWdS)N /usr/bin/crler3r4-64r6r7r8sDefault Library Path (ELF)::zlib%s.so)rdre)rd)r#r&existsr?r$r@rArBrOrCr6strip startswithrHrr') r+is64r8rKpathsrLlinedirZlibfilerrr _findLib_crles6         $roFcCstt||pt|S)N)rRrorN)r+rkrrrr,scCsBddl}|jddkr7tjjd}ntjjd}dddd d d d d d d i}|j|d}tjdtj||f}yt j ddgdt j dt j dt j dddddi>}tj ||jj}|r!tj|jdSWdQRXWntk r=YnXdS)Nrlrfz-32z-64z x86_64-64z libc6,x86-64zppc64-64z libc6,64bitz sparc64-64zs390x-64zia64-64z libc6,IA-64Zlibc6z\s+(lib%s\.[^\s]+)\s+\(%sz/sbin/ldconfigz-pstdinr7r6r8r4r3r5r)structZcalcsizer#unamemachinegetr9r:r;r@rArOrBrGr6rDrHrIrC)r+rrrtZmach_mapZabi_typeZregexprMrrr_findSoname_ldconfigs.     ! rwcCst|ptt|S)N)rwrRrN)r+rrrr, scCs&ddlm}tjdkrOt|jt|jdttdtjdkr"ttdttdttdtj d krt|j d t|j d t|j d t|j d n6t|j dt|j dttddS)Nr)cdllrrr-r!r bz2r.z libm.dylibzlibcrypto.dylibzlibSystem.dylibzSystem.framework/Systemzlibm.soz libcrypt.soZcrypt) Zctypesrxr#r+printrloadr,r platformZ LoadLibrary)rxrrrtest&s" r}__main__)rUrVrW)r#r<r@r r+rrr,r|Zctypes.macholib.dyldr/r0r:r>rNrRrjr]rorwr}__name__rrrrs:          +   $    PK!C!D!D#__pycache__/__init__.cpython-35.pycnu[ Yf@ @s dZddlZddlZdZddlmZmZm Z ddlm Z ddlm Z ddlmZ ddlmZmZdd lmZdd lmZee kred ee ejd~krddlmZeZejdkr5ejdkr5eejjjdddkr5eZddlmZmZ m!Z"m#Z$dddZ%dddZ&iZ'ddZ(ejdkrddlm)Z*ddlm+Z,ejd kreZ,iZ-ddZ.e.jr e(jj/dde._nejdkr ddlm0Z*ddlm1Z1m2Z2m3Z3m4Z4m5Z5dd lm6Z6m7Z7dd!lm8Z8dd"d#Z9Gd$d%d%e8Z:e9e:d&Gd'd(d(e8Z;e9e;Gd)d*d*e8Z<e9e<Gd+d,d,e8Z=e9e=Gd-d.d.e8Z>e9e>ed/ed0krGe=Z?e>Z@n@Gd1d2d2e8Z?e9e?Gd3d4d4e8Z@e9e@Gd5d6d6e8ZAe9eAGd7d8d8e8ZBe9eBGd9d:d:e8ZCe1eCe1eBkreBZCed0ed;kr"e=ZDe>ZEn@Gd<d=d=e8ZDe9eDGd>d?d?e8ZEe9eEGd@dAdAe8ZFeFeF_GeF_He9eFGdBdCdCe8ZIeIeI_GeI_He9eIGdDdEdEe8ZJeJeJ_GeJ_He9eJGdFdGdGe8ZKe9eKd&GdHdIdIe8ZLeLZMe9eLGdJdKdKe8ZNddLlmOZOmPZPmQZQGdMdNdNe8ZRGdOdPdPe8ZSdQdRZTddSdTZUdUdVZVdWdXZWGdYdZdZeXZYGd[d\d\eYZZejdkr_Gd]d^d^eYZ[dd_lm\Z\m8Z8Gd`dadae8Z]GdbdcdceYZ^GdddedeeXZ_e_eYZ`e_eZZaejdkreZdfdejbZcn;ejdgkreZdhejdddiZcn eZdZcejdkrhe_e[Zee_e^Zfejd kr4eejgjhZhn eejijhZhddjlmjZjmkZkdddkdlZle1e@e1eLkre@Zme?ZnnKe1e>e1eLkre>Zme=Znn$e1eEe1eLkreEZmeDZnddmlmoZompZpmqZqmrZre(eLeLeLemeoZse(eLeLe?emepZtdndoZueue:eLe:e:erZvdpdqZweue:eLe?eqZxddsdtZyyddulmzZzWne{k rYn(Xeue:eLe?ezZ|ddvdwZ}ejdkr dxdyZ~dzd{Zdd|lmZmZeIZeFZxhe;e?e=eDgD]TZe1edikrY eZq8 e1ed}krt eZq8 e1edkr8 eZq8 Wxhe<e@e>eEgD]TZe1edikr eZq e1ed}kr eZq e1edkr eZq W[eTdS)z,create and manipulate C data types in PythonNz1.1.0)Union StructureArray)_Pointer)CFuncPtr) __version__) RTLD_LOCAL RTLD_GLOBAL) ArgumentError)calcsizezVersion number mismatchntce) FormatErrorposixdarwin.)FUNCFLAG_CDECLFUNCFLAG_PYTHONAPIFUNCFLAG_USE_ERRNOFUNCFLAG_USE_LASTERRORcCst|trK|dkr+t|d}t|}|}||_|St|trqt|}|}|St|dS)zcreate_string_buffer(aBytes) -> character array create_string_buffer(anInteger) -> character array create_string_buffer(aBytes, anInteger) -> character array N) isinstancebyteslenc_charvalueint TypeError)initsizebuftypebufr#4/opt/alt/python35/lib64/python3.5/ctypes/__init__.pycreate_string_buffer/s      r%cCs t||S)N)r%)rr r#r#r$c_bufferAsr&c st|jddr"tO|jddr>tO|rZtd|jytfSWnKtk rGfdddt}|tf<|SYnXdS)aCFUNCTYPE(restype, *argtypes, use_errno=False, use_last_error=False) -> function prototype. restype: the result type argtypes: a sequence specifying the argument types The function prototype can be called in different ways to create a callable object: prototype(integer address) -> foreign function prototype(callable) -> create and return a C callable function from callable prototype(integer index, method name[, paramflags]) -> foreign function calling a COM method prototype((ordinal number, dll object)[, paramflags]) -> foreign function exported by ordinal prototype((function name, dll object)[, paramflags]) -> foreign function exported by name use_errnoFuse_last_errorz!unexpected keyword argument(s) %scs"eZdZZZZdS)z CFUNCTYPE..CFunctionTypeN)__name__ __module__ __qualname__ _argtypes_ _restype__flags_r#)argtypesflagsrestyper#r$ CFunctionTypecs r2N) _FUNCFLAG_CDECLpop_FUNCFLAG_USE_ERRNO_FUNCFLAG_USE_LASTERROR ValueErrorkeys_c_functype_cacheKeyError _CFuncPtr)r1r/kwr2r#)r/r0r1r$ CFUNCTYPEIs   "r=) LoadLibrary)FUNCFLAG_STDCALLc st|jddr"tO|jddr>tO|rZtd|jytfSWnKtk rGfdddt}|tf<|SYnXdS)Nr'Fr(z!unexpected keyword argument(s) %scs"eZdZZZZdS)z$WINFUNCTYPE..WinFunctionTypeN)r)r*r+r,r-r.r#)r/r0r1r#r$WinFunctionType~s r@) _FUNCFLAG_STDCALLr4r5r6r7r8_win_functype_cacher:r;)r1r/r<r@r#)r/r0r1r$ WINFUNCTYPErs   "rC)dlopen)sizeofbyref addressof alignmentresize) get_errno set_errno) _SimpleCDatacCsgddlm}|dkr%|j}t|||}}||krctd|||fdS)Nr)r z"sizeof(%s) wrong: %d instead of %d)structr _type_rE SystemError)typtypecoder ZactualZrequiredr#r#r$ _check_sizes   rRcs(eZdZdZfddZS) py_objectOc s;ytjSWn#tk r6dt|jSYnXdS)Nz %s())super__repr__r7typer))self) __class__r#r$rVs zpy_object.__repr__)r)r*r+rNrVr#r#)rYr$rSs rSPc@seZdZdZdS)c_shorthN)r)r*r+rNr#r#r#r$r[s r[c@seZdZdZdS)c_ushortHN)r)r*r+rNr#r#r#r$r]s r]c@seZdZdZdS)c_longlN)r)r*r+rNr#r#r#r$r_s r_c@seZdZdZdS)c_ulongLN)r)r*r+rNr#r#r#r$ras rair`c@seZdZdZdS)c_intrcN)r)r*r+rNr#r#r#r$rds rdc@seZdZdZdS)c_uintIN)r)r*r+rNr#r#r#r$res rec@seZdZdZdS)c_floatfN)r)r*r+rNr#r#r#r$rgs rgc@seZdZdZdS)c_doubledN)r)r*r+rNr#r#r#r$ris ric@seZdZdZdS) c_longdoublegN)r)r*r+rNr#r#r#r$rks rkqc@seZdZdZdS) c_longlongrmN)r)r*r+rNr#r#r#r$rns rnc@seZdZdZdS) c_ulonglongQN)r)r*r+rNr#r#r#r$ros roc@seZdZdZdS)c_ubyteBN)r)r*r+rNr#r#r#r$rqs rqc@seZdZdZdS)c_bytebN)r)r*r+rNr#r#r#r$rss rsc@seZdZdZdS)rcN)r)r*r+rNr#r#r#r$rs rc@s"eZdZdZddZdS)c_char_pzcCs d|jjtj|jfS)Nz%s(%s))rYr)c_void_p from_bufferr)rXr#r#r$rVszc_char_p.__repr__N)r)r*r+rNrVr#r#r#r$rvs rvc@seZdZdZdS)rxrZN)r)r*r+rNr#r#r#r$rxs rxc@seZdZdZdS)c_bool?N)r)r*r+rNr#r#r#r$rzs rz)POINTERpointer_pointer_type_cachec@s"eZdZdZddZdS) c_wchar_pZcCs d|jjtj|jfS)Nz%s(%s))rYr)rxryr)rXr#r#r$rVszc_wchar_p.__repr__N)r)r*r+rNrVr#r#r#r$rs rc@seZdZdZdS)c_wcharuN)r)r*r+rNr#r#r#r$rs rcCs_tjtjtjdkr-tjtjtt _t jtt _t td character array create_unicode_buffer(anInteger) -> character array create_unicode_buffer(aString, anInteger) -> character array Nr)rstrrrrrr)rr r!r"r#r#r$create_unicode_buffers      rcCsjtj|ddk r$tdt|tkrBtd|j||t|.qsort -> callable object ['qsort'] -> callable object Calling the functions releases the Python GIL during the call and reacquires it afterwards. zrNFcs|_j|r"tO|r2tOGfdddt}|_|dkr~tj|_n |_dS)NcseZdZZjZdS)zCDLL.__init__.._FuncPtrN)r)r*r+r._func_restype_r-r#)r0rXr#r$_FuncPtrTs r)_name _func_flags_r5r6r;r_dlopen_handle)rXrmodeZhandler'r(rr#)r0rXr$__init__Js      z CDLL.__init__cCsDd|jj|j|jtjdd@t|tjdd@fS)Nz<%s '%s', handle %x at %#x>r)rYr)rr_sysmaxsizer)rXr#r#r$rV^sz CDLL.__repr__cCsM|jdr*|jdr*t||j|}t||||S)N__) startswithendswithAttributeError __getitem__setattr)rXrfuncr#r#r$ __getattr__ds  zCDLL.__getattr__cCs1|j||f}t|ts-||_|S)N)rrrr))rXZname_or_ordinalrr#r#r$rks zCDLL.__getitem__)r)r*r+__doc__r3rrdrrrr DEFAULT_MODErrVrrr#r#r#r$r5s   rc@s eZdZdZeeBZdS)PyDLLzThis class represents the Python library itself. It allows accessing Python API functions. The GIL is not released, and Python exceptions are handled correctly. N)r)r*r+rr3_FUNCFLAG_PYTHONAPIrr#r#r#r$rqs rc@seZdZdZeZdS)WinDLLznThis class represents a dll exporting functions using the Windows stdcall calling convention. N)r)r*r+rrArr#r#r#r$rzs r)_check_HRESULTrLc@seZdZdZeZdS)HRESULTr`N)r)r*r+rNrZ_check_retval_r#r#r#r$rs  rc@s"eZdZdZeZeZdS)OleDLLzThis class represents a dll exporting functions using the Windows stdcall calling convention, and returning HRESULT. HRESULT error values are automatically raised as OSError exceptions. N)r)r*r+rrArrrr#r#r#r$rs rc@s@eZdZddZddZddZddZd S) LibraryLoadercCs ||_dS)N)_dlltype)rXZdlltyper#r#r$rszLibraryLoader.__init__cCs?|ddkrt||j|}t||||S)Nr_)rrr)rXrZdllr#r#r$rs  zLibraryLoader.__getattr__cCs t||S)N)getattr)rXrr#r#r$rszLibraryLoader.__getitem__cCs |j|S)N)r)rXrr#r#r$r>szLibraryLoader.LoadLibraryN)r)r*r+rrrr>r#r#r#r$rs    rz python dllcygwinzlibpython%d.%d.dllr)get_last_errorset_last_errorcCsF|dkrt}|dkr3t|j}td|d|S)N) GetLastErrorrstripOSError)codeZdescrr#r#r$WinErrors    r) _memmove_addr _memset_addr_string_at_addr _cast_addrcs#Gfdddt}|S)Ncs&eZdZZZeeBZdS)z!PYFUNCTYPE..CFunctionTypeN)r)r*r+r,r-r3rr.r#)r/r1r#r$r2s r2)r;)r1r/r2r#)r/r1r$ PYFUNCTYPEsrcCst|||S)N)_cast)objrPr#r#r$castsrrcCs t||S)zAstring_at(addr[, size]) -> string Return the string at addr.) _string_at)ptrr r#r#r$ string_atsr)_wstring_at_addrcCs t||S)zFwstring_at(addr[, size]) -> string Return the string at addr.) _wstring_at)rr r#r#r$ wstring_atsrc CsRy"tdttdg}Wntk r:dSYnX|j|||SdS)Nzcomtypes.server.inprocserver*ii) __import__globalslocals ImportErrorDllGetClassObject)ZrclsidZriidZppvccomr#r#r$rs "  rc CsEy"tdttdg}Wntk r:dSYnX|jS)Nzcomtypes.server.inprocserverrr)rrrrDllCanUnloadNow)rr#r#r$rs "  r)BigEndianStructureLittleEndianStructure)r r )r r )r r )r r )r r r)r r )rosrsysrrZ_ctypesrrrrrr;Z_ctypes_versionrr r rMr Z _calcsize Exceptionrrrplatformrunamereleasesplitrr3rrrr5rr6r%r&r9r=r>rr?rArBrCreplacerDrErFrGrHrIrJrKrLrRrSr[r]r_rardrergrirkrnrorqZ __ctype_le__Z __ctype_be__rsrrvrxZc_voidprzr|r}r~rrrrrrobjectrrrrrrrZcdllZpydllZ dllhandleZ pythonapi version_infoZwindllZoledllZkernel32rZcoredllrrrZc_size_tZ c_ssize_trrrrZmemmoveZmemsetrrrrrrrrrrrZctypes._endianrrZc_int8Zc_uint8ZkindZc_int16Zc_int32Zc_int64Zc_uint16Zc_uint32Zc_uint64r#r#r#r$s< (" !  (                     <           "           PK!^C4;4;)__pycache__/__init__.cpython-35.opt-2.pycnu[ Yf@ @s ddlZddlZdZddlmZmZmZddlm Z ddlm Z ddlmZ ddlm Z mZddlmZdd lmZee kred ee ejd}krdd lmZe Zejdkr/ejdkr/eejjjdddkr/eZddlmZmZm Z!m"Z#dddZ$dddZ%iZ&ddZ'ejd~krddlm(Z)ddlm*Z+ejd kreZ+iZ,ddZ-e-j.re'j.j/dde-_.nejdkrddlm0Z)ddlm1Z1m2Z2m3Z3m4Z4m5Z5ddlm6Z6m7Z7dd lm8Z8dd!d"Z9Gd#d$d$e8Z:e9e:d%Gd&d'd'e8Z;e9e;Gd(d)d)e8Z<e9e<Gd*d+d+e8Z=e9e=Gd,d-d-e8Z>e9e>ed.ed/krAe=Z?e>Z@n@Gd0d1d1e8Z?e9e?Gd2d3d3e8Z@e9e@Gd4d5d5e8ZAe9eAGd6d7d7e8ZBe9eBGd8d9d9e8ZCe1eCe1eBkreBZCed/ed:kre=ZDe>ZEn@Gd;d<d<e8ZDe9eDGd=d>d>e8ZEe9eEGd?d@d@e8ZFeFeF_GeF_He9eFGdAdBdBe8ZIeIeI_GeI_He9eIGdCdDdDe8ZJeJeJ_GeJ_He9eJGdEdFdFe8ZKe9eKd%GdGdHdHe8ZLeLZMe9eLGdIdJdJe8ZNddKlmOZOmPZPmQZQGdLdMdMe8ZRGdNdOdOe8ZSdPdQZTddRdSZUdTdUZVdVdWZWGdXdYdYeXZYGdZd[d[eYZZejdkrYGd\d]d]eYZ[dd^lm\Z\m8Z8Gd_d`d`e8Z]GdadbdbeYZ^GdcddddeXZ_e_eYZ`e_eZZaejdkreZdedejbZcn;ejdfkreZdgejdddhZcn eZdZcejdkrbe_e[Zee_e^Zfejd kr.eejgjhZhn eejijhZhddilmjZjmkZkdddjdkZle1e@e1eLkre@Zme?ZnnKe1e>e1eLkre>Zme=Znn$e1eEe1eLkreEZmeDZnddllmoZompZpmqZqmrZre'eLeLeLemeoZse'eLeLe?emepZtdmdnZueue:eLe:e:erZvdodpZweue:eLe?eqZxddrdsZyyddtlmzZzWne{k rYn(Xeue:eLe?ezZ|ddudvZ}ejdkrdwdxZ~dydzZdd{lmZmZeIZeFZxhe;e?e=eDgD]TZe1edhkrS eZq2 e1ed|krn eZq2 e1edkr2 eZq2 Wxhe<e@e>eEgD]TZe1edhkr eZq e1ed|kr eZq e1edkr eZq W[eTdS)Nz1.1.0)Union StructureArray)_Pointer)CFuncPtr) __version__) RTLD_LOCAL RTLD_GLOBAL) ArgumentError)calcsizezVersion number mismatchntce) FormatErrorposixdarwin.)FUNCFLAG_CDECLFUNCFLAG_PYTHONAPIFUNCFLAG_USE_ERRNOFUNCFLAG_USE_LASTERRORcCst|trK|dkr+t|d}t|}|}||_|St|trqt|}|}|St|dS)N) isinstancebyteslenc_charvalueint TypeError)initsizebuftypebufr#-/opt/alt/python35/lib64/python3.5/__init__.pycreate_string_buffer/s      r%cCs t||S)N)r%)rr r#r#r$c_bufferAsr&c st|jddr"tO|jddr>tO|rZtd|jytfSWnKtk rGfdddt}|tf<|SYnXdS)N use_errnoFuse_last_errorz!unexpected keyword argument(s) %scs"eZdZZZZdS)z CFUNCTYPE..CFunctionTypeN)__name__ __module__ __qualname__ _argtypes_ _restype__flags_r#)argtypesflagsrestyper#r$ CFunctionTypecs r2) _FUNCFLAG_CDECLpop_FUNCFLAG_USE_ERRNO_FUNCFLAG_USE_LASTERROR ValueErrorkeys_c_functype_cacheKeyError _CFuncPtr)r1r/kwr2r#)r/r0r1r$ CFUNCTYPEIs   "r=) LoadLibrary)FUNCFLAG_STDCALLc st|jddr"tO|jddr>tO|rZtd|jytfSWnKtk rGfdddt}|tf<|SYnXdS)Nr'Fr(z!unexpected keyword argument(s) %scs"eZdZZZZdS)z$WINFUNCTYPE..WinFunctionTypeN)r)r*r+r,r-r.r#)r/r0r1r#r$WinFunctionType~s r@) _FUNCFLAG_STDCALLr4r5r6r7r8_win_functype_cacher:r;)r1r/r<r@r#)r/r0r1r$ WINFUNCTYPErs   "rC)dlopen)sizeofbyref addressof alignmentresize) get_errno set_errno) _SimpleCDatacCsgddlm}|dkr%|j}t|||}}||krctd|||fdS)Nr)r z"sizeof(%s) wrong: %d instead of %d)structr _type_rE SystemError)typtypecoder actualrequiredr#r#r$ _check_sizes   rTcs(eZdZdZfddZS) py_objectOc s;ytjSWn#tk r6dt|jSYnXdS)Nz %s())super__repr__r7typer))self) __class__r#r$rXs zpy_object.__repr__)r)r*r+rNrXr#r#)r[r$rUs rUPc@seZdZdZdS)c_shorthN)r)r*r+rNr#r#r#r$r]s r]c@seZdZdZdS)c_ushortHN)r)r*r+rNr#r#r#r$r_s r_c@seZdZdZdS)c_longlN)r)r*r+rNr#r#r#r$ras rac@seZdZdZdS)c_ulongLN)r)r*r+rNr#r#r#r$rcs rcirbc@seZdZdZdS)c_intreN)r)r*r+rNr#r#r#r$rfs rfc@seZdZdZdS)c_uintIN)r)r*r+rNr#r#r#r$rgs rgc@seZdZdZdS)c_floatfN)r)r*r+rNr#r#r#r$ris ric@seZdZdZdS)c_doubledN)r)r*r+rNr#r#r#r$rks rkc@seZdZdZdS) c_longdoublegN)r)r*r+rNr#r#r#r$rms rmqc@seZdZdZdS) c_longlongroN)r)r*r+rNr#r#r#r$rps rpc@seZdZdZdS) c_ulonglongQN)r)r*r+rNr#r#r#r$rqs rqc@seZdZdZdS)c_ubyteBN)r)r*r+rNr#r#r#r$rss rsc@seZdZdZdS)c_bytebN)r)r*r+rNr#r#r#r$rus ruc@seZdZdZdS)rcN)r)r*r+rNr#r#r#r$rs rc@s"eZdZdZddZdS)c_char_pzcCs d|jjtj|jfS)Nz%s(%s))r[r)c_void_p from_bufferr)rZr#r#r$rXszc_char_p.__repr__N)r)r*r+rNrXr#r#r#r$rxs rxc@seZdZdZdS)rzr\N)r)r*r+rNr#r#r#r$rzs rzc@seZdZdZdS)c_bool?N)r)r*r+rNr#r#r#r$r|s r|)POINTERpointer_pointer_type_cachec@s"eZdZdZddZdS) c_wchar_pZcCs d|jjtj|jfS)Nz%s(%s))r[r)rzr{r)rZr#r#r$rXszc_wchar_p.__repr__N)r)r*r+rNrXr#r#r#r$rs rc@seZdZdZdS)c_wcharuN)r)r*r+rNr#r#r#r$rs rcCs_tjtjtjdkr-tjtjtt _t jtt _t tdrNFcs|_j|r"tO|r2tOGfdddt}|_|dkr~tj|_n |_dS)NcseZdZZjZdS)zCDLL.__init__.._FuncPtrN)r)r*r+r._func_restype_r-r#)r0rZr#r$_FuncPtrTs r)_name _func_flags_r5r6r;r_dlopen_handle)rZrmodehandler'r(rr#)r0rZr$__init__Js      z CDLL.__init__cCsDd|jj|j|jtjdd@t|tjdd@fS)Nz<%s '%s', handle %x at %#x>r)r[r)rr_sysmaxsizer)rZr#r#r$rX^sz CDLL.__repr__cCsM|jdr*|jdr*t||j|}t||||S)N__) startswithendswithAttributeError __getitem__setattr)rZrfuncr#r#r$ __getattr__ds  zCDLL.__getattr__cCs1|j||f}t|ts-||_|S)N)rrrr))rZZname_or_ordinalrr#r#r$rks zCDLL.__getitem__)r)r*r+r3rrfrrrr DEFAULT_MODErrXrrr#r#r#r$r5s   rc@seZdZeeBZdS)PyDLLN)r)r*r+r3_FUNCFLAG_PYTHONAPIrr#r#r#r$rqs rc@seZdZeZdS)WinDLLN)r)r*r+rArr#r#r#r$rzs r)_check_HRESULTrLc@seZdZdZeZdS)HRESULTrbN)r)r*r+rNrZ_check_retval_r#r#r#r$rs  rc@seZdZeZeZdS)OleDLLN)r)r*r+rArrrr#r#r#r$rs rc@s@eZdZddZddZddZddZd S) LibraryLoadercCs ||_dS)N)_dlltype)rZZdlltyper#r#r$rszLibraryLoader.__init__cCs?|ddkrt||j|}t||||S)Nr_)rrr)rZrZdllr#r#r$rs  zLibraryLoader.__getattr__cCs t||S)N)getattr)rZrr#r#r$rszLibraryLoader.__getitem__cCs |j|S)N)r)rZrr#r#r$r>szLibraryLoader.LoadLibraryN)r)r*r+rrrr>r#r#r#r$rs    rz python dllcygwinzlibpython%d.%d.dllr)get_last_errorset_last_errorcCsF|dkrt}|dkr3t|j}td|d|S)N) GetLastErrorrstripOSError)codeZdescrr#r#r$WinErrors    r) _memmove_addr _memset_addr_string_at_addr _cast_addrcs#Gfdddt}|S)Ncs&eZdZZZeeBZdS)z!PYFUNCTYPE..CFunctionTypeN)r)r*r+r,r-r3rr.r#)r/r1r#r$r2s r2)r;)r1r/r2r#)r/r1r$ PYFUNCTYPEsrcCst|||S)N)_cast)objrPr#r#r$castsrrcCs t||S)N) _string_at)ptrr r#r#r$ string_atsr)_wstring_at_addrcCs t||S)N) _wstring_at)rr r#r#r$ wstring_atsrc CsRy"tdttdg}Wntk r:dSYnX|j|||SdS)Nzcomtypes.server.inprocserver*ii) __import__globalslocals ImportErrorDllGetClassObject)ZrclsidZriidZppvccomr#r#r$rs "  rc CsEy"tdttdg}Wntk r:dSYnX|jS)Nzcomtypes.server.inprocserverrr)rrrrDllCanUnloadNow)rr#r#r$rs "  r)BigEndianStructureLittleEndianStructure)r r )r r )r r )r r )r r r)r r )osrsysrrZ_ctypesrrrrrr;Z_ctypes_versionrr r rMr Z _calcsize Exceptionrrrplatformrunamereleasesplitrr3rrrr5rr6r%r&r9r=r>rr?rArBrC__doc__replacerDrErFrGrHrIrJrKrLrTrUr]r_rarcrfrgrirkrmrprqrsZ __ctype_le__Z __ctype_be__rurrxrzZc_voidpr|r~rrrrrrrrobjectrrrrrrrZcdllZpydllZ dllhandleZ pythonapi version_infoZwindllZoledllZkernel32rZcoredllrrrZc_size_tZ c_ssize_trrrrZmemmoveZmemsetrrrrrrrrrrrZctypes._endianrrZc_int8Zc_uint8kindZc_int16Zc_int32Zc_int64Zc_uint16Zc_uint32Zc_uint64r#r#r#r$s: (" !  (                     <           "           PK!ȵFEE__pycache__/util.cpython-35.pycnu[ Yf>+@sddlZddlZddlZddlZejdkrcddZddZddZejd kr~d dZejd krejd krdd l m Z ddZnejd krddl Z ddl Z ddZejdkr ddZn ddZejjd%rEddZddZnEejdkrrddZdddZndd Zd!dZd"d#Zed$kredS)&NntcCsd}tjj|}|d kr(dS|t|}tj|djdd\}}t|dd d}|dkr|d7}t|ddd }|dkrd }|dkr||SdS) zReturn the version of MSVC that was used to build Python. For Python 2.3 and up, the version number is included in sys.version. For earlier versions, assume the compiler is MSVC 6. zMSC v.N  g$@r)sysversionfindlensplitint)prefixisrestZ majorVersionZ minorVersionr0/opt/alt/python35/lib64/python3.5/ctypes/util.py_get_build_version s %    rcCst}|dkrdS|dkr.d}n!|dkrKd|d}ndSddl}d|jjkrw|d 7}|d S) z%Return the name of the VC runtime dllNrmsvcrtrzmsvcr%d rz_d.pyddz.dll)rimportlib.machinery machineryEXTENSION_SUFFIXES)r Zclibname importlibrrr find_msvcrt"s       rcCs|dkrtSxtjdjtjD]i}tjj||}tjj|r^|S|jj drvq-|d}tjj|r-|Sq-WdS)NcmPATHz.dll)r r!) rosenvironrpathseppathjoinisfilelowerendswith)nameZ directoryZfnamerrr find_library7s   r,ZcecCs|S)Nr)r+rrrr,Msposixdarwin) dyld_findc Cs\d|d|d||fg}x4|D],}yt|SWq(tk rSw(Yq(Xq(WdS)Nz lib%s.dylibz%s.dylibz%s.framework/%s) _dyld_find ValueError)r+Zpossiblerrrr,Rs   c !CsStjdtj|}tjd}|s@tjd}|sJdStj}z|dd|jd|g}t tj }d|d \S*/(lib%s\.\S+)/sbin/ldconfig-rr6r7keyr)r^r_r )r:r;r#r9r@rArBrOrCr6rDfindallrRrNsortr]rH)r+ZenamerJrLrQrMrrrr,s     c Cs;tjjdsdSttj}d|d<|r>d }nd }d}y+tj|dtjdtjd|}Wnt k rdSYnX|MxE|j D]:}|j }|j drtj |jd }qWWdQRX|sdSxF|jd D]5}tjj|d |}tjj|r|SqWdS)N /usr/bin/crler3r4-64r6r7r8sDefault Library Path (ELF)::zlib%s.so)rdre)rd)r#r&existsr?r$r@rArBrOrCr6strip startswithrHrr') r+is64r8rKpathsrLlinedirZlibfilerrr _findLib_crles6         $roFcCstt||pt|S)N)rRrorN)r+rkrrrr,scCsBddl}|jddkr7tjjd}ntjjd}dddd d d d d d d i}|j|d}tjdtj||f}yt j ddgdt j dt j dt j dddddi>}tj ||jj}|r!tj|jdSWdQRXWntk r=YnXdS)Nrlrfz-32z-64z x86_64-64z libc6,x86-64zppc64-64z libc6,64bitz sparc64-64zs390x-64zia64-64z libc6,IA-64Zlibc6z\s+(lib%s\.[^\s]+)\s+\(%sz/sbin/ldconfigz-pstdinr7r6r8r4r3r5r)structZcalcsizer#unamemachinegetr9r:r;r@rArOrBrGr6rDrHrIrC)r+rrrtZmach_mapZabi_typeZregexprMrrr_findSoname_ldconfigs.     ! rwcCst|ptt|S)N)rwrRrN)r+rrrr, scCs&ddlm}tjdkrOt|jt|jdttdtjdkr"ttdttdttdtj d krt|j d t|j d t|j d t|j d n6t|j dt|j dttddS)Nr)cdllrrr-r!r bz2r.z libm.dylibzlibcrypto.dylibzlibSystem.dylibzSystem.framework/Systemzlibm.soz libcrypt.soZcrypt) Zctypesrxr#r+printrloadr,r platformZ LoadLibrary)rxrrrtest&s" r}__main__)rUrVrW)r#r<r@r r+rrr,r|Zctypes.macholib.dyldr/r0r:r>rNrRrjr]rorwr}__name__rrrrs:          +   $    PK!'k(__pycache__/_endian.cpython-35.opt-1.pycnu[ Yf@sddlZddlTeeZddZGdddeeZejdkrdZ eZ Gd d d ed eZ nFejd krd Z eZ Gddded eZ n e ddS)N)*cCsft|trt|tSt|tr?t|j|jSt|t rR|St d|dS)zReturn the type with the 'other' byte order. Simple types like c_int and so on already have __ctype_be__ and __ctype_le__ attributes which contain the types, for more complicated types arrays and structures are supported. z+This type does not support other endian: %sN) hasattr _OTHER_ENDIANgetattr isinstance _array_type _other_endianZ_type_Z_length_ issubclass Structure TypeError)typr 3/opt/alt/python35/lib64/python3.5/ctypes/_endian.pyrs rcs"eZdZfddZS) _swapped_metacs|dkrjg}xO|D]G}|d}|d}|dd}|j|t|f|qW|}tj||dS)NZ_fields_r)appendrsuper __setattr__)selfZattrnamevalueZfieldsZdescnamer rest) __class__r rrs    !z_swapped_meta.__setattr__)__name__ __module__ __qualname__rr r )rrrs rlittleZ __ctype_be__c@s"eZdZdZfZdZdS)BigEndianStructurez$Structure with big endian byte orderN)rrr__doc__ __slots___swappedbytes_r r r rr.s r metaclassZbigZ __ctype_le__c@s"eZdZdZfZdZdS)LittleEndianStructurez'Structure with little endian byte orderN)rrrrr r!r r r rr#7s r#zInvalid byteorder) sysZctypestypeZArrayrrr r byteorderrr#r RuntimeErrorr r r rs    PK!Ifcjj)__pycache__/wintypes.cpython-35.opt-1.pycnu[ Yf@sddlZejZejZejZejZej Z ej Z ej ZejZejZeZejZGdddejZejZejZejZejZejZZej Z!Z"ej#Z$Z%Z&ej#Z'Z(ej)Z*Z+ej,Z-Z.ej/ejej/ej,kr4ejZ0ejZ1n6ej/ejej/ej,krjej Z0ejZ1eZ2eZ3eZ4eZ5eZ6eZ7ej,Z8e8Z9e8Z:e8Z;e8Z<e8Z=e8Z>e8Z?e8Z@e8ZAe8ZBe8ZCe8ZDe8ZEe8ZFe8ZGe8ZHe8ZIe8ZJe8ZKe8ZLe8ZMe8ZNe8ZOe8ZPe8ZQe8ZRe8ZSe8ZTe8ZUe8ZVe8ZWGdddejXZYeYZZZ[Z\GdddejXZ]e]Z^Gdd d ejXZ_Gd d d ejXZ`e`ZaZbZcGd d d ejXZdedZeZfddZgGdddejXZhehZiGdddejXZjejZkdZlGdddejXZmGdddejXZnejoeZpZqejoeZrejoeZsZtejoeZuejoe4ZvejoeZwZxejoehZyZzejoeZ{ejoe8Z|Z}ejoeGZ~ejoeHZejoeZZejoeZejoe7ZejoeZZejoejZZejoe`ZZejoecZejoeYZZejoe\ZZejoeVZejoeZejoedZZejoefZZejoe^Zejoe ZZejoe"ZejoeZejoeZejoe ZejoemZZejoenZZejoeZZdS)Nc@s"eZdZdZddZdS) VARIANT_BOOLvcCsd|jj|jfS)Nz%s(%r)) __class____name__value)selfr4/opt/alt/python35/lib64/python3.5/ctypes/wintypes.py__repr__szVARIANT_BOOL.__repr__N)r __module__ __qualname__Z_type_r rrrr rs rc@s:eZdZdefdefdefdefgZdS)RECTlefttoprightZbottomN)rr r LONG_fields_rrrr r as    r c@s:eZdZdefdefdefdefgZdS) _SMALL_RECTZLeftZTopZRightZBottomN)rr r SHORTrrrrr rhs    rc@s(eZdZdefdefgZdS)_COORDXYN)rr r rrrrrr ros  rc@s(eZdZdefdefgZdS)POINTxyN)rr r rrrrrr rss  rc@s(eZdZdefdefgZdS)SIZEZcxZcyN)rr r rrrrrr rxs  rcCs||d>|d>S)Nr)ZredZgreenZbluerrr RGB}src@s(eZdZdefdefgZdS)FILETIMEZ dwLowDateTimeZdwHighDateTimeN)rr r DWORDrrrrr rs  rc@sLeZdZdefdefdefdefdefdefgZ dS)MSGZhWndmessageZwParamZlParamZtimeZptN) rr r HWNDUINTWPARAMLPARAMr rrrrrr r!s      r!ic @sxeZdZdefdefdefdefdefdefdefdefd eefd ed fg Zd S) WIN32_FIND_DATAAdwFileAttributesftCreationTimeftLastAccessTimeftLastWriteTime nFileSizeHigh nFileSizeLow dwReserved0 dwReserved1 cFileNamecAlternateFileNameN)rr r r rCHARMAX_PATHrrrrr r's          r'c @sxeZdZdefdefdefdefdefdefdefdefd eefd ed fg Zd S) WIN32_FIND_DATAWr(r)r*r+r,r-r.r/r0r1r2N)rr r r rWCHARr4rrrrr r5s          r5)ZctypesZc_byteZBYTEZc_ushortZWORDZc_ulongr Zc_charr3Zc_wcharr6Zc_uintr$Zc_intZINTZc_doubleZDOUBLEZc_floatZFLOATZBOOLEANZc_longZBOOLZ _SimpleCDatarZULONGrZUSHORTZc_shortrZ c_longlongZ_LARGE_INTEGERZ LARGE_INTEGERZ c_ulonglongZ_ULARGE_INTEGERZULARGE_INTEGERZ c_wchar_pZ LPCOLESTRZLPOLESTRZOLESTRZLPCWSTRZLPWSTRZc_char_pZLPCSTRZLPSTRZc_void_pZLPCVOIDZLPVOIDZsizeofr%r&ZATOMZLANGIDZCOLORREFZLGRPIDZLCTYPEZLCIDZHANDLEZHACCELZHBITMAPZHBRUSHZ HCOLORSPACEZHDCZHDESKZHDWPZ HENHMETAFILEZHFONTZHGDIOBJZHGLOBALZHHOOKZHICONZ HINSTANCEZHKEYZHKLZHLOCALZHMENUZ HMETAFILEZHMODULEZHMONITORZHPALETTEZHPENZHRGNZHRSRCZHSTRZHTASKZHWINSTAr#Z SC_HANDLEZSERVICE_STATUS_HANDLEZ Structurer ZtagRECTZ_RECTLZRECTLrZ SMALL_RECTrrZtagPOINTZ_POINTLZPOINTLrZtagSIZEZSIZELrrZ _FILETIMEr!ZtagMSGr4r'r5ZPOINTERZLPBOOLZPBOOLZPBOOLEANZLPBYTEZPBYTEZPCHARZ LPCOLORREFZLPDWORDZPDWORDZ LPFILETIMEZ PFILETIMEZPFLOATZLPHANDLEZPHANDLEZPHKEYZLPHKLZLPINTZPINTZPLARGE_INTEGERZPLCIDZLPLONGZPLONGZLPMSGZPMSGZLPPOINTZPPOINTZPPOINTLZLPRECTZPRECTZLPRECTLZPRECTLZ LPSC_HANDLEZPSHORTZLPSIZEZPSIZEZLPSIZELZPSIZELZ PSMALL_RECTZLPUINTZPUINTZPULARGE_INTEGERZPULONGZPUSHORTZPWCHARZLPWIN32_FIND_DATAAZPWIN32_FIND_DATAAZLPWIN32_FIND_DATAWZPWIN32_FIND_DATAWZLPWORDZPWORDrrrr s                    $  $      PK!C!D!D)__pycache__/__init__.cpython-35.opt-1.pycnu[ Yf@ @s dZddlZddlZdZddlmZmZm Z ddlm Z ddlm Z ddlmZ ddlmZmZdd lmZdd lmZee kred ee ejd~krddlmZeZejdkr5ejdkr5eejjjdddkr5eZddlmZmZ m!Z"m#Z$dddZ%dddZ&iZ'ddZ(ejdkrddlm)Z*ddlm+Z,ejd kreZ,iZ-ddZ.e.jr e(jj/dde._nejdkr ddlm0Z*ddlm1Z1m2Z2m3Z3m4Z4m5Z5dd lm6Z6m7Z7dd!lm8Z8dd"d#Z9Gd$d%d%e8Z:e9e:d&Gd'd(d(e8Z;e9e;Gd)d*d*e8Z<e9e<Gd+d,d,e8Z=e9e=Gd-d.d.e8Z>e9e>ed/ed0krGe=Z?e>Z@n@Gd1d2d2e8Z?e9e?Gd3d4d4e8Z@e9e@Gd5d6d6e8ZAe9eAGd7d8d8e8ZBe9eBGd9d:d:e8ZCe1eCe1eBkreBZCed0ed;kr"e=ZDe>ZEn@Gd<d=d=e8ZDe9eDGd>d?d?e8ZEe9eEGd@dAdAe8ZFeFeF_GeF_He9eFGdBdCdCe8ZIeIeI_GeI_He9eIGdDdEdEe8ZJeJeJ_GeJ_He9eJGdFdGdGe8ZKe9eKd&GdHdIdIe8ZLeLZMe9eLGdJdKdKe8ZNddLlmOZOmPZPmQZQGdMdNdNe8ZRGdOdPdPe8ZSdQdRZTddSdTZUdUdVZVdWdXZWGdYdZdZeXZYGd[d\d\eYZZejdkr_Gd]d^d^eYZ[dd_lm\Z\m8Z8Gd`dadae8Z]GdbdcdceYZ^GdddedeeXZ_e_eYZ`e_eZZaejdkreZdfdejbZcn;ejdgkreZdhejdddiZcn eZdZcejdkrhe_e[Zee_e^Zfejd kr4eejgjhZhn eejijhZhddjlmjZjmkZkdddkdlZle1e@e1eLkre@Zme?ZnnKe1e>e1eLkre>Zme=Znn$e1eEe1eLkreEZmeDZnddmlmoZompZpmqZqmrZre(eLeLeLemeoZse(eLeLe?emepZtdndoZueue:eLe:e:erZvdpdqZweue:eLe?eqZxddsdtZyyddulmzZzWne{k rYn(Xeue:eLe?ezZ|ddvdwZ}ejdkr dxdyZ~dzd{Zdd|lmZmZeIZeFZxhe;e?e=eDgD]TZe1edikrY eZq8 e1ed}krt eZq8 e1edkr8 eZq8 Wxhe<e@e>eEgD]TZe1edikr eZq e1ed}kr eZq e1edkr eZq W[eTdS)z,create and manipulate C data types in PythonNz1.1.0)Union StructureArray)_Pointer)CFuncPtr) __version__) RTLD_LOCAL RTLD_GLOBAL) ArgumentError)calcsizezVersion number mismatchntce) FormatErrorposixdarwin.)FUNCFLAG_CDECLFUNCFLAG_PYTHONAPIFUNCFLAG_USE_ERRNOFUNCFLAG_USE_LASTERRORcCst|trK|dkr+t|d}t|}|}||_|St|trqt|}|}|St|dS)zcreate_string_buffer(aBytes) -> character array create_string_buffer(anInteger) -> character array create_string_buffer(aBytes, anInteger) -> character array N) isinstancebyteslenc_charvalueint TypeError)initsizebuftypebufr#4/opt/alt/python35/lib64/python3.5/ctypes/__init__.pycreate_string_buffer/s      r%cCs t||S)N)r%)rr r#r#r$c_bufferAsr&c st|jddr"tO|jddr>tO|rZtd|jytfSWnKtk rGfdddt}|tf<|SYnXdS)aCFUNCTYPE(restype, *argtypes, use_errno=False, use_last_error=False) -> function prototype. restype: the result type argtypes: a sequence specifying the argument types The function prototype can be called in different ways to create a callable object: prototype(integer address) -> foreign function prototype(callable) -> create and return a C callable function from callable prototype(integer index, method name[, paramflags]) -> foreign function calling a COM method prototype((ordinal number, dll object)[, paramflags]) -> foreign function exported by ordinal prototype((function name, dll object)[, paramflags]) -> foreign function exported by name use_errnoFuse_last_errorz!unexpected keyword argument(s) %scs"eZdZZZZdS)z CFUNCTYPE..CFunctionTypeN)__name__ __module__ __qualname__ _argtypes_ _restype__flags_r#)argtypesflagsrestyper#r$ CFunctionTypecs r2N) _FUNCFLAG_CDECLpop_FUNCFLAG_USE_ERRNO_FUNCFLAG_USE_LASTERROR ValueErrorkeys_c_functype_cacheKeyError _CFuncPtr)r1r/kwr2r#)r/r0r1r$ CFUNCTYPEIs   "r=) LoadLibrary)FUNCFLAG_STDCALLc st|jddr"tO|jddr>tO|rZtd|jytfSWnKtk rGfdddt}|tf<|SYnXdS)Nr'Fr(z!unexpected keyword argument(s) %scs"eZdZZZZdS)z$WINFUNCTYPE..WinFunctionTypeN)r)r*r+r,r-r.r#)r/r0r1r#r$WinFunctionType~s r@) _FUNCFLAG_STDCALLr4r5r6r7r8_win_functype_cacher:r;)r1r/r<r@r#)r/r0r1r$ WINFUNCTYPErs   "rC)dlopen)sizeofbyref addressof alignmentresize) get_errno set_errno) _SimpleCDatacCsgddlm}|dkr%|j}t|||}}||krctd|||fdS)Nr)r z"sizeof(%s) wrong: %d instead of %d)structr _type_rE SystemError)typtypecoder ZactualZrequiredr#r#r$ _check_sizes   rRcs(eZdZdZfddZS) py_objectOc s;ytjSWn#tk r6dt|jSYnXdS)Nz %s())super__repr__r7typer))self) __class__r#r$rVs zpy_object.__repr__)r)r*r+rNrVr#r#)rYr$rSs rSPc@seZdZdZdS)c_shorthN)r)r*r+rNr#r#r#r$r[s r[c@seZdZdZdS)c_ushortHN)r)r*r+rNr#r#r#r$r]s r]c@seZdZdZdS)c_longlN)r)r*r+rNr#r#r#r$r_s r_c@seZdZdZdS)c_ulongLN)r)r*r+rNr#r#r#r$ras rair`c@seZdZdZdS)c_intrcN)r)r*r+rNr#r#r#r$rds rdc@seZdZdZdS)c_uintIN)r)r*r+rNr#r#r#r$res rec@seZdZdZdS)c_floatfN)r)r*r+rNr#r#r#r$rgs rgc@seZdZdZdS)c_doubledN)r)r*r+rNr#r#r#r$ris ric@seZdZdZdS) c_longdoublegN)r)r*r+rNr#r#r#r$rks rkqc@seZdZdZdS) c_longlongrmN)r)r*r+rNr#r#r#r$rns rnc@seZdZdZdS) c_ulonglongQN)r)r*r+rNr#r#r#r$ros roc@seZdZdZdS)c_ubyteBN)r)r*r+rNr#r#r#r$rqs rqc@seZdZdZdS)c_bytebN)r)r*r+rNr#r#r#r$rss rsc@seZdZdZdS)rcN)r)r*r+rNr#r#r#r$rs rc@s"eZdZdZddZdS)c_char_pzcCs d|jjtj|jfS)Nz%s(%s))rYr)c_void_p from_bufferr)rXr#r#r$rVszc_char_p.__repr__N)r)r*r+rNrVr#r#r#r$rvs rvc@seZdZdZdS)rxrZN)r)r*r+rNr#r#r#r$rxs rxc@seZdZdZdS)c_bool?N)r)r*r+rNr#r#r#r$rzs rz)POINTERpointer_pointer_type_cachec@s"eZdZdZddZdS) c_wchar_pZcCs d|jjtj|jfS)Nz%s(%s))rYr)rxryr)rXr#r#r$rVszc_wchar_p.__repr__N)r)r*r+rNrVr#r#r#r$rs rc@seZdZdZdS)c_wcharuN)r)r*r+rNr#r#r#r$rs rcCs_tjtjtjdkr-tjtjtt _t jtt _t td character array create_unicode_buffer(anInteger) -> character array create_unicode_buffer(aString, anInteger) -> character array Nr)rstrrrrrr)rr r!r"r#r#r$create_unicode_buffers      rcCsjtj|ddk r$tdt|tkrBtd|j||t|.qsort -> callable object ['qsort'] -> callable object Calling the functions releases the Python GIL during the call and reacquires it afterwards. zrNFcs|_j|r"tO|r2tOGfdddt}|_|dkr~tj|_n |_dS)NcseZdZZjZdS)zCDLL.__init__.._FuncPtrN)r)r*r+r._func_restype_r-r#)r0rXr#r$_FuncPtrTs r)_name _func_flags_r5r6r;r_dlopen_handle)rXrmodeZhandler'r(rr#)r0rXr$__init__Js      z CDLL.__init__cCsDd|jj|j|jtjdd@t|tjdd@fS)Nz<%s '%s', handle %x at %#x>r)rYr)rr_sysmaxsizer)rXr#r#r$rV^sz CDLL.__repr__cCsM|jdr*|jdr*t||j|}t||||S)N__) startswithendswithAttributeError __getitem__setattr)rXrfuncr#r#r$ __getattr__ds  zCDLL.__getattr__cCs1|j||f}t|ts-||_|S)N)rrrr))rXZname_or_ordinalrr#r#r$rks zCDLL.__getitem__)r)r*r+__doc__r3rrdrrrr DEFAULT_MODErrVrrr#r#r#r$r5s   rc@s eZdZdZeeBZdS)PyDLLzThis class represents the Python library itself. It allows accessing Python API functions. The GIL is not released, and Python exceptions are handled correctly. N)r)r*r+rr3_FUNCFLAG_PYTHONAPIrr#r#r#r$rqs rc@seZdZdZeZdS)WinDLLznThis class represents a dll exporting functions using the Windows stdcall calling convention. N)r)r*r+rrArr#r#r#r$rzs r)_check_HRESULTrLc@seZdZdZeZdS)HRESULTr`N)r)r*r+rNrZ_check_retval_r#r#r#r$rs  rc@s"eZdZdZeZeZdS)OleDLLzThis class represents a dll exporting functions using the Windows stdcall calling convention, and returning HRESULT. HRESULT error values are automatically raised as OSError exceptions. N)r)r*r+rrArrrr#r#r#r$rs rc@s@eZdZddZddZddZddZd S) LibraryLoadercCs ||_dS)N)_dlltype)rXZdlltyper#r#r$rszLibraryLoader.__init__cCs?|ddkrt||j|}t||||S)Nr_)rrr)rXrZdllr#r#r$rs  zLibraryLoader.__getattr__cCs t||S)N)getattr)rXrr#r#r$rszLibraryLoader.__getitem__cCs |j|S)N)r)rXrr#r#r$r>szLibraryLoader.LoadLibraryN)r)r*r+rrrr>r#r#r#r$rs    rz python dllcygwinzlibpython%d.%d.dllr)get_last_errorset_last_errorcCsF|dkrt}|dkr3t|j}td|d|S)N) GetLastErrorrstripOSError)codeZdescrr#r#r$WinErrors    r) _memmove_addr _memset_addr_string_at_addr _cast_addrcs#Gfdddt}|S)Ncs&eZdZZZeeBZdS)z!PYFUNCTYPE..CFunctionTypeN)r)r*r+r,r-r3rr.r#)r/r1r#r$r2s r2)r;)r1r/r2r#)r/r1r$ PYFUNCTYPEsrcCst|||S)N)_cast)objrPr#r#r$castsrrcCs t||S)zAstring_at(addr[, size]) -> string Return the string at addr.) _string_at)ptrr r#r#r$ string_atsr)_wstring_at_addrcCs t||S)zFwstring_at(addr[, size]) -> string Return the string at addr.) _wstring_at)rr r#r#r$ wstring_atsrc CsRy"tdttdg}Wntk r:dSYnX|j|||SdS)Nzcomtypes.server.inprocserver*ii) __import__globalslocals ImportErrorDllGetClassObject)ZrclsidZriidZppvccomr#r#r$rs "  rc CsEy"tdttdg}Wntk r:dSYnX|jS)Nzcomtypes.server.inprocserverrr)rrrrDllCanUnloadNow)rr#r#r$rs "  r)BigEndianStructureLittleEndianStructure)r r )r r )r r )r r )r r r)r r )rosrsysrrZ_ctypesrrrrrr;Z_ctypes_versionrr r rMr Z _calcsize Exceptionrrrplatformrunamereleasesplitrr3rrrr5rr6r%r&r9r=r>rr?rArBrCreplacerDrErFrGrHrIrJrKrLrRrSr[r]r_rardrergrirkrnrorqZ __ctype_le__Z __ctype_be__rsrrvrxZc_voidprzr|r}r~rrrrrrobjectrrrrrrrZcdllZpydllZ dllhandleZ pythonapi version_infoZwindllZoledllZkernel32rZcoredllrrrZc_size_tZ c_ssize_trrrrZmemmoveZmemsetrrrrrrrrrrrZctypes._endianrrZc_int8Zc_uint8ZkindZc_int16Zc_int32Zc_int64Zc_uint16Zc_uint32Zc_uint64r#r#r#r$s< (" !  (                     <           "           PK!3macholib/__pycache__/framework.cpython-35.opt-1.pycnu[ Yf@sYdZddlZdgZejdZddZddZedkrUedS) z% Generic framework path manipulation Nframework_infoz(?x) (?P^.*)(?:^|/) (?P (?P\w+).framework/ (?:Versions/(?P[^/]+)/)? (?P=shortname) (?:_(?P[^_]+))? )$ cCs#tj|}|sdS|jS)a} A framework name can take one of the following four forms: Location/Name.framework/Versions/SomeVersion/Name_Suffix Location/Name.framework/Versions/SomeVersion/Name Location/Name.framework/Name_Suffix Location/Name.framework/Name returns None if not found, or a mapping equivalent to: dict( location='Location', name='Name.framework/Versions/SomeVersion/Name_Suffix', shortname='Name', version='SomeVersion', suffix='Suffix', ) Note that SomeVersion and Suffix are optional and may be None if not present N)STRICT_FRAMEWORK_REmatch groupdict)filenameZ is_frameworkr>/opt/alt/python35/lib64/python3.5/ctypes/macholib/framework.pyrscCsddddddd}dS)Nc Ss%td|d|d|d|d|S)Nlocationname shortnameversionsuffix)dict)r r r r r rrrd-s ztest_framework_info..dr)rrrrtest_framework_info,sr__main__)__doc__re__all__compilerrr__name__rrrrs      PK!,4.macholib/__pycache__/dyld.cpython-35.opt-1.pycnu[ YfE@sddZddlZddlmZddlmZddlTdddd gZejj d d d d gZ ejj ddddgZ ddZ dddZ dddZdddZdddZdddZdddZdd d!Zdd"d#Zdd$d%Zddd&dZddd'dZd(d)Zed*kr`edS)+z dyld emulation N)framework_info) dylib_info)* dyld_findframework_findrrz~/Library/Frameworksz/Library/Frameworksz/Network/Library/Frameworksz/System/Library/Frameworksz~/libz/usr/local/libz/libz/usr/libcCsA|dkrtj}|j|}|dkr4gS|jdS)N:)osenvirongetsplit)envvarZrvalr9/opt/alt/python35/lib64/python3.5/ctypes/macholib/dyld.pydyld_envs    rcCs"|dkrtj}|jdS)NZDYLD_IMAGE_SUFFIX)rr r )r rrrdyld_image_suffix's  rcCs t|dS)NZDYLD_FRAMEWORK_PATH)r)r rrrdyld_framework_path,srcCs t|dS)NZDYLD_LIBRARY_PATH)r)r rrrdyld_library_path/srcCs t|dS)NZDYLD_FALLBACK_FRAMEWORK_PATH)r)r rrrdyld_fallback_framework_path2srcCs t|dS)NZDYLD_FALLBACK_LIBRARY_PATH)r)r rrrdyld_fallback_library_path5srcCs5t|}|dkr|S||dd}|S)z>For a potential path iterator, add DYLD_IMAGE_SUFFIX semanticsNcssSxL|D]D}|jdr=|dtd |dVn ||V|VqWdS)Nz.dylib)endswithlen)iteratorsuffixpathrrr_inject=s  ! z)dyld_image_suffix_search.._inject)r)rr rrrrrdyld_image_suffix_search8s   rccst|}|dk rGx,t|D]}tjj||dVq%Wx4t|D]&}tjj|tjj|VqTWdS)Nname)rrrrjoinrbasename)rr frameworkrrrrdyld_override_searchFs   r!ccsC|jdr?|dk r?tjj||tddVdS)Nz@executable_path/) startswithrrrr)rexecutable_pathrrrdyld_executable_path_searchWsr$ccs|Vt|}|dk rRt|}x&|D]}tjj||dVq0Wt|}x.|D]&}tjj|tjj|VqeW|dk r| rx&tD]}tjj||dVqW|sx.tD]&}tjj|tjj|VqWdS)Nr) rrrrrrrDEFAULT_FRAMEWORK_FALLBACKDEFAULT_LIBRARY_FALLBACK)rr r Zfallback_framework_pathrZfallback_library_pathrrrdyld_default_search^s      $  r'cCsnxTttt||t||t|||D]}tjj|r7|Sq7Wtd|fdS)z: Find a library or framework using dyld semantics zdylib %s could not be foundN) rchainr!r$r'rrisfile ValueError)rr#r rrrrrts    cCsd}yt|d|d|SWn+tk rM}z |}WYdd}~XnX|jd}|dkrt|}|d7}tjj|tjj|d|}yt|d|d|SWntk r|YnXdS)z Find a framework using dyld semantics in a very loose manner. Will take input such as: Python Python.framework Python.framework/Versions/Current Nr#r z .framework)rr*rfindrrrrr)fnr#r erroreZ fmwk_indexrrrrs    + cCs i}dS)Nr)r rrrtest_dyld_findsr1__main__)__doc__rZctypes.macholib.frameworkrZctypes.macholib.dylibr itertools__all__r expanduserr%r&rrrrrrrr!r$r'rrr1__name__rrrrs:         PK!ҕ/macholib/__pycache__/dylib.cpython-35.opt-2.pycnu[ ]$@sSddlZdgZejdZddZddZedkrOedS)N dylib_infoz(?x) (?P^.*)(?:^|/) (?P (?P\w+?) (?:\.(?P[^._]+))? (?:_(?P[^._]+))? \.dylib$ ) cCs#tj|}|sdS|jS)N)DYLIB_REmatch groupdict)filenameZis_dylibr*/opt/alt/python35/lib64/python3.5/dylib.pyrscCsddddddd}dS)Nc Ss%td|d|d|d|d|S)Nlocationname shortnameversionsuffix)dict)r r r r r rrrd.s ztest_dylib_info..dr)rrrrtest_dylib_info-sr__main__)re__all__compilerrr__name__rrrrs      PK!7ؾ/macholib/__pycache__/dylib.cpython-35.opt-1.pycnu[ Yf$@sYdZddlZdgZejdZddZddZedkrUedS) z! Generic dylib path manipulation N dylib_infoz(?x) (?P^.*)(?:^|/) (?P (?P\w+?) (?:\.(?P[^._]+))? (?:_(?P[^._]+))? \.dylib$ ) cCs#tj|}|sdS|jS)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_REmatch groupdict)filenameZis_dylibr:/opt/alt/python35/lib64/python3.5/ctypes/macholib/dylib.pyrscCsddddddd}dS)Nc Ss%td|d|d|d|d|S)Nlocationname shortnameversionsuffix)dict)r r r r r rrrd.s ztest_dylib_info..dr)rrrrtest_dylib_info-sr__main__)__doc__re__all__compilerrr__name__rrrrs      PK!GM\\(macholib/__pycache__/dyld.cpython-35.pycnu[ YfE@sddZddlZddlmZddlmZddlTdddd gZejj d d d d gZ ejj ddddgZ ddZ dddZ dddZdddZdddZdddZdddZdd d!Zdd"d#Zdd$d%Zddd&dZddd'dZd(d)Zed*kr`edS)+z dyld emulation N)framework_info) dylib_info)* dyld_findframework_findrrz~/Library/Frameworksz/Library/Frameworksz/Network/Library/Frameworksz/System/Library/Frameworksz~/libz/usr/local/libz/libz/usr/libcCsA|dkrtj}|j|}|dkr4gS|jdS)N:)osenvirongetsplit)envvarZrvalr9/opt/alt/python35/lib64/python3.5/ctypes/macholib/dyld.pydyld_envs    rcCs"|dkrtj}|jdS)NZDYLD_IMAGE_SUFFIX)rr r )r rrrdyld_image_suffix's  rcCs t|dS)NZDYLD_FRAMEWORK_PATH)r)r rrrdyld_framework_path,srcCs t|dS)NZDYLD_LIBRARY_PATH)r)r rrrdyld_library_path/srcCs t|dS)NZDYLD_FALLBACK_FRAMEWORK_PATH)r)r rrrdyld_fallback_framework_path2srcCs t|dS)NZDYLD_FALLBACK_LIBRARY_PATH)r)r rrrdyld_fallback_library_path5srcCs5t|}|dkr|S||dd}|S)z>For a potential path iterator, add DYLD_IMAGE_SUFFIX semanticsNcssSxL|D]D}|jdr=|dtd |dVn ||V|VqWdS)Nz.dylib)endswithlen)iteratorsuffixpathrrr_inject=s  ! z)dyld_image_suffix_search.._inject)r)rr rrrrrdyld_image_suffix_search8s   rccst|}|dk rGx,t|D]}tjj||dVq%Wx4t|D]&}tjj|tjj|VqTWdS)Nname)rrrrjoinrbasename)rr frameworkrrrrdyld_override_searchFs   r!ccsC|jdr?|dk r?tjj||tddVdS)Nz@executable_path/) startswithrrrr)rexecutable_pathrrrdyld_executable_path_searchWsr$ccs|Vt|}|dk rRt|}x&|D]}tjj||dVq0Wt|}x.|D]&}tjj|tjj|VqeW|dk r| rx&tD]}tjj||dVqW|sx.tD]&}tjj|tjj|VqWdS)Nr) rrrrrrrDEFAULT_FRAMEWORK_FALLBACKDEFAULT_LIBRARY_FALLBACK)rr r Zfallback_framework_pathrZfallback_library_pathrrrdyld_default_search^s      $  r'cCsnxTttt||t||t|||D]}tjj|r7|Sq7Wtd|fdS)z: Find a library or framework using dyld semantics zdylib %s could not be foundN) rchainr!r$r'rrisfile ValueError)rr#r rrrrrts    cCsd}yt|d|d|SWn+tk rM}z |}WYdd}~XnX|jd}|dkrt|}|d7}tjj|tjj|d|}yt|d|d|SWntk r|YnXdS)z Find a framework using dyld semantics in a very loose manner. Will take input such as: Python Python.framework Python.framework/Versions/Current Nr#r z .framework)rr*rfindrrrrr)fnr#r erroreZ fmwk_indexrrrrs    + cCs:i}tddksttddks6tdS)NzlibSystem.dylibz/usr/lib/libSystem.dylibzSystem.framework/Systemz2/System/Library/Frameworks/System.framework/System)rAssertionError)r rrrtest_dyld_findsr2__main__)__doc__rZctypes.macholib.frameworkrZctypes.macholib.dylibr itertools__all__r expanduserr%r&rrrrrrrr!r$r'rrr2__name__rrrrs:         PK!L3macholib/__pycache__/framework.cpython-35.opt-2.pycnu[ ]@sSddlZdgZejdZddZddZedkrOedS)Nframework_infoz(?x) (?P^.*)(?:^|/) (?P (?P\w+).framework/ (?:Versions/(?P[^/]+)/)? (?P=shortname) (?:_(?P[^_]+))? )$ cCs#tj|}|sdS|jS)N)STRICT_FRAMEWORK_REmatch groupdict)filenameZ is_frameworkr./opt/alt/python35/lib64/python3.5/framework.pyrscCsddddddd}dS)Nc Ss%td|d|d|d|d|S)Nlocationname shortnameversionsuffix)dict)r r r r r rrrd-s ztest_framework_info..dr)rrrrtest_framework_info,sr__main__)re__all__compilerrr__name__rrrrs      PK!WG G -macholib/__pycache__/framework.cpython-35.pycnu[ Yf@sYdZddlZdgZejdZddZddZedkrUedS) z% Generic framework path manipulation Nframework_infoz(?x) (?P^.*)(?:^|/) (?P (?P\w+).framework/ (?:Versions/(?P[^/]+)/)? (?P=shortname) (?:_(?P[^_]+))? )$ cCs#tj|}|sdS|jS)a} A framework name can take one of the following four forms: Location/Name.framework/Versions/SomeVersion/Name_Suffix Location/Name.framework/Versions/SomeVersion/Name Location/Name.framework/Name_Suffix Location/Name.framework/Name returns None if not found, or a mapping equivalent to: dict( location='Location', name='Name.framework/Versions/SomeVersion/Name_Suffix', shortname='Name', version='SomeVersion', suffix='Suffix', ) Note that SomeVersion and Suffix are optional and may be None if not present N)STRICT_FRAMEWORK_REmatch groupdict)filenameZ is_frameworkr>/opt/alt/python35/lib64/python3.5/ctypes/macholib/framework.pyrscCsNddddddd}tddks3ttddksKttddkscttddks{ttd|dd d ksttd |dd d d dksttddksttddksttd|ddd dks ttd|ddd ddksJtdS)Nc Ss%td|d|d|d|d|S)Nlocationname shortnameversionsuffix)dict)r r r r r rrrd-s ztest_framework_info..dzcompletely/invalidzcompletely/invalid/_debugz P/F.frameworkzP/F.framework/_debugzP/F.framework/FPz F.framework/FFzP/F.framework/F_debugzF.framework/F_debugr debugzP/F.framework/VersionszP/F.framework/Versions/AzP/F.framework/Versions/A/FzF.framework/Versions/A/FAz P/F.framework/Versions/A/F_debugzF.framework/Versions/A/F_debug)rAssertionError)rrrrtest_framework_info,s$*'r__main__)__doc__re__all__compilerrr__name__rrrrs      PK!)HN66,macholib/__pycache__/__init__.cpython-35.pycnu[ Yf@sdZdZdS)z~ Enough Mach-O to make your head spin. See the relevant header files in /usr/include/mach-o And also Apple's documentation. z1.0N)__doc__ __version__rr=/opt/alt/python35/lib64/python3.5/ctypes/macholib/__init__.pysPK!2macholib/__pycache__/__init__.cpython-35.opt-2.pycnu[ ]@s dZdS)z1.0N) __version__rr-/opt/alt/python35/lib64/python3.5/__init__.py sPK!!)macholib/__pycache__/dylib.cpython-35.pycnu[ Yf$@sYdZddlZdgZejdZddZddZedkrUedS) z! Generic dylib path manipulation N dylib_infoz(?x) (?P^.*)(?:^|/) (?P (?P\w+?) (?:\.(?P[^._]+))? (?:_(?P[^._]+))? \.dylib$ ) cCs#tj|}|sdS|jS)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_REmatch groupdict)filenameZis_dylibr:/opt/alt/python35/lib64/python3.5/ctypes/macholib/dylib.pyrscCsddddddd}tddks3ttddksKttd|dddksottd |dd dd d ksttd |ddddksttd|ddddksttd|ddddd kstdS)Nc Ss%td|d|d|d|d|S)Nlocationname shortnameversionsuffix)dict)r r r r r rrrd.s ztest_dylib_info..dzcompletely/invalidzcompletely/invalide_debugz P/Foo.dylibPz Foo.dylibZFoozP/Foo_debug.dylibzFoo_debug.dylibr debugz P/Foo.A.dylibz Foo.A.dylibAzP/Foo_debug.A.dylibzFoo_debug.A.dylibZ Foo_debugzP/Foo.A_debug.dylibzFoo.A_debug.dylib)rAssertionError)rrrrtest_dylib_info-s$*''r__main__)__doc__re__all__compilerrr__name__rrrrs      PK!)HN662macholib/__pycache__/__init__.cpython-35.opt-1.pycnu[ Yf@sdZdZdS)z~ Enough Mach-O to make your head spin. See the relevant header files in /usr/include/mach-o And also Apple's documentation. z1.0N)__doc__ __version__rr=/opt/alt/python35/lib64/python3.5/ctypes/macholib/__init__.pysPK!;88.macholib/__pycache__/dyld.cpython-35.opt-2.pycnu[ ]E@s^ddlZddlmZddlmZddlTddddgZejjd d d d gZ ejjd dddgZ ddZ dddZ dddZ dddZdddZdddZdddZddd Zdd!d"Zdd#d$Zddd%dZddd&dZd'd(Zed)krZedS)*N)framework_info) dylib_info)* dyld_findframework_findrrz~/Library/Frameworksz/Library/Frameworksz/Network/Library/Frameworksz/System/Library/Frameworksz~/libz/usr/local/libz/libz/usr/libcCsA|dkrtj}|j|}|dkr4gS|jdS)N:)osenvirongetsplit)envvarZrvalr)/opt/alt/python35/lib64/python3.5/dyld.pydyld_envs    rcCs"|dkrtj}|jdS)NZDYLD_IMAGE_SUFFIX)rr r )r rrrdyld_image_suffix's  rcCs t|dS)NZDYLD_FRAMEWORK_PATH)r)r rrrdyld_framework_path,srcCs t|dS)NZDYLD_LIBRARY_PATH)r)r rrrdyld_library_path/srcCs t|dS)NZDYLD_FALLBACK_FRAMEWORK_PATH)r)r rrrdyld_fallback_framework_path2srcCs t|dS)NZDYLD_FALLBACK_LIBRARY_PATH)r)r rrrdyld_fallback_library_path5srcCs5t|}|dkr|S||dd}|S)NcssSxL|D]D}|jdr=|dtd |dVn ||V|VqWdS)Nz.dylib)endswithlen)iteratorsuffixpathrrr_inject=s  ! z)dyld_image_suffix_search.._inject)r)rr rrrrrdyld_image_suffix_search8s   rccst|}|dk rGx,t|D]}tjj||dVq%Wx4t|D]&}tjj|tjj|VqTWdS)Nname)rrrrjoinrbasename)rr frameworkrrrrdyld_override_searchFs   r!ccsC|jdr?|dk r?tjj||tddVdS)Nz@executable_path/) startswithrrrr)rexecutable_pathrrrdyld_executable_path_searchWsr$ccs|Vt|}|dk rRt|}x&|D]}tjj||dVq0Wt|}x.|D]&}tjj|tjj|VqeW|dk r| rx&tD]}tjj||dVqW|sx.tD]&}tjj|tjj|VqWdS)Nr) rrrrrrrDEFAULT_FRAMEWORK_FALLBACKDEFAULT_LIBRARY_FALLBACK)rr r Zfallback_framework_pathrZfallback_library_pathrrrdyld_default_search^s      $  r'cCsnxTttt||t||t|||D]}tjj|r7|Sq7Wtd|fdS)Nzdylib %s could not be found) rchainr!r$r'rrisfile ValueError)rr#r rrrrrts    cCsd}yt|d|d|SWn+tk rM}z |}WYdd}~XnX|jd}|dkrt|}|d7}tjj|tjj|d|}yt|d|d|SWntk r|YnXdS)Nr#r z .framework)rr*rfindrrrrr)fnr#r erroreZ fmwk_indexrrrrs    + cCs i}dS)Nr)r rrrtest_dyld_findsr1__main__)rZctypes.macholib.frameworkrZctypes.macholib.dylibr itertools__all__r expanduserr%r&rrrrrrrr!r$r'rrr1__name__rrrrs8         PK!d qff%__pycache__/util.cpython-38.opt-2.pycnu[U ,a76@sBddlZddlZddlZddlZejdkrDddZddZddZnejd krnejd krndd l m Z d dZnej d rddl mZnejd kr&ddlZddlZddZddZejdkrddZnddZej drddZddZn8ejdkrddZd'ddZndd Zd!d"Zd#dZd$d%Zed&kr>edS)(NntcCsd}tj|}|dkrdS|t|}tj|ddd\}}t|ddd}|dkrf|d7}t|dd d }|dkrd }|dkr||SdS) NzMSC v.  g$@r)sysversionfindlensplitint)prefixisrestZ majorVersionZ minorVersionr0/opt/alt/python38/lib64/python3.8/ctypes/util.py_get_build_version s  rcCs^t}|dkrdS|dkr d}n|dkr6d|d}ndSddl}d|jjkrV|d7}|d S) Nrmsvcrtrzmsvcr%d rz_d.pydd.dll)rimportlib.machinery machineryEXTENSION_SUFFIXES)r Zclibname importlibrrr find_msvcrt"s r cCsx|dkrtStjdtjD]R}tj||}tj|rF|S| drVq |d}tj|r |Sq dS)N)cmPATHr) r osenvironrpathseppathjoinisfilelowerendswith)nameZ directoryZfnamerrr find_library7s   r-posixdarwin) dyld_findc CsPd|d|d||fg}|D],}zt|WStk rHYqYqXqdS)Nz lib%s.dylibz%s.dylibz%s.framework/%s) _dyld_find ValueError)r,possiblerrrr-Hs  aix)r-c Cs4d}t|d}|d|kW5QRSQRXdS)NsELFbr)openread)filenameZ elf_headerZthefilerrr_is_elf`s r:c Cs tdt|}td}|s,td}|s4dSt}z|dd|j d|g}t tj }d|d<d|d <zt j|t jt j|d }Wntk rYW$dSX||j}W5QRXW5z |Wnt k rYnXXt||}|sdS|D]} t| sqt| SdS) N[^\(\)\s]*lib%s\.[^\(\)\s]*ZgccZccz-Wl,-t-oz-lCLC_ALLLANGstdoutstderrenv)r$fsencodereescapeshutilwhichtempfileZNamedTemporaryFilecloseFileNotFoundErrorr,dictr% subprocessPopenPIPEZSTDOUTOSErrorrAr8findallr:fsdecode) r,exprZ c_compilerZtempargsrCprocZtraceresfilerrr _findLib_gccfsB        rXZsunos5c Cs||sdSztjdd|ftjtjd}Wntk r<YdSX||j}W5QRXtd|}|sldSt | dS)Nz/usr/ccs/bin/dumpz-LpvrArBs\[.*\]\sSONAME\s+([^\s]+)r) rMrNrODEVNULLrPrAr8rEsearchr$rRgroup)frUdatarVrrr _get_sonames   r_c Cs|sdStd}|sdSz"tj|ddd|ftjtjd}Wntk rRYdSX||j}W5QRXt d|}|sdSt | dS)Nobjdump-pz-jz.dynamicrYs\sSONAME\s+([^\s]+)r)rGrHrMrNrOrZrPrAr8rEr[r$rRr\)r]r`rUdumprVrrrr_s$   )ZfreebsdZopenbsdZ dragonflycCsN|d}g}z|r*|dt|qWntk r@YnX|pLtjgS)N.r)rinsertrpopr2r maxsize)ZlibnamepartsZnumsrrr _num_versions rhc Cst|}d||f}t|}ztjdtjtjd}Wntk rPd}YnX||j }W5QRXt ||}|st t |S|jtdt|dS)Nz:-l%s\.\S+ => \S*/(lib%s\.\S+))/sbin/ldconfigz-rrY)keyr)rErFr$rDrMrNrOrZrPrAr8rQr_rXsortrhrR)r,ZenamerSrUr^rVrrrr-s"        c CstjdsdSttj}d|d<|r,d}nd}d}ztj|tjtj|d}Wnt k rdYdSX|6|j D](}| }| drrt |d}qrW5QRX|sdS|d D]*}tj|d |}tj|r|SqdS) N /usr/bin/crler=r>)rm-64)rmr@sDefault Library Path (ELF):r6:zlib%s.so)r$r'existsrLr%rMrNrOrZrPrAstrip startswithrRrr() r,is64rCrTpathsrUlinedirZlibfilerrr _findLib_crles8       rwFcCstt||pt|SN)r_rwrX)r,rsrrrr- sc Csddl}|ddkr&tjd}ntjd}dddddd }||d }d }t|t||f}zht j d d gt j t j t j dddd:}t ||j}|rt|dW5QRWSW5QRXWntk rYnXdS)Nrlr6z-32rnz libc6,x86-64z libc6,64bitz libc6,IA-64)z x86_64-64zppc64-64z sparc64-64zs390x-64zia64-64Zlibc6z\s+(lib%s\.[^\s]+)\s+\(%srirar=)r>r?)stdinrBrArCr)structZcalcsizer$unamemachinegetrDrErFrMrNrZrOr[rAr8rRr\rP)r,r{r}Zmach_mapZabi_typeZregexprVrrr_findSoname_ldconfigs4  ,rc Csdt|}ddg}tjd}|rD|dD]}|d|gq0|dtjd|gd}zZtj |tj tj d d }| \}}t |t |} | D]} t| sqt | WSWntk rYnX|S) Nr;Zldz-tZLD_LIBRARY_PATHroz-Lr<z-l%sT)rArBZuniversal_newlines)rErFr$r%r~rextenddevnullrMrNrOZ communicaterQrRr: Exception) r,rScmdZlibpathrresultrout_rVrWrrr _findLib_ld,s,   rcCs t|ptt|ptt|Srx)rr_rXr)r,rrrr-Gs   cCsddlm}tjdkr:t|jt|dttdtjdkrttdttdttdtj d krt| d t| d t| d t| d ntj drddlm }tj dkrtd|dtjtd| dttdt| dn*td|dtjtd| dtdtdtd| tdtdtdtd| tdn(t| dt| dttddS)Nr)cdllrrr.r"r!bz2r/z libm.dylibzlibcrypto.dylibzlibSystem.dylibzSystem.framework/Systemr4)CDLLlz"Using CDLL(name, os.RTLD_MEMBER): z libc.a(shr.o)zUsing cdll.LoadLibrary(): Zrpmz librpm.sozlibc.a(shr_64.o)z crypt :: Zcryptz crypto :: Zcryptozlibm.soz libcrypt.so)Zctypesrr$r,printrloadr-r platformZ LoadLibraryrrrrfZ RTLD_MEMBER)rrrrrtestOs<            r__main__)F)r$rGrMr r,rr r-rZctypes.macholib.dyldr0r1rrZ ctypes._aixrErIr:rXr_rhrwrrr__name__rrrrs>     2     $ ( PK!Z"__pycache__/_endian.cpython-38.pycnu[U ,a@sddlZddlTeeZddZGdddeeZejdkr\dZ eZ Gd d d eed Z n0ejd krd Z eZ Gdddeed Z ne ddS)N)*cCsLt|trt|tSt|tr.t|j|jSt|t r<|St d|dS)zReturn the type with the 'other' byte order. Simple types like c_int and so on already have __ctype_be__ and __ctype_le__ attributes which contain the types, for more complicated types arrays and structures are supported. z+This type does not support other endian: %sN) hasattr _OTHER_ENDIANgetattr isinstance _array_type _other_endianZ_type_Z_length_ issubclass Structure TypeError)typr 3/opt/alt/python38/lib64/python3.8/ctypes/_endian.pyrs    rcseZdZfddZZS) _swapped_metacs^|dkrLg}|D]6}|d}|d}|dd}||t|f|q|}t||dS)NZ_fields_r)appendrsuper __setattr__)selfattrnamevalueZfieldsZdescnamer rest __class__r rrs z_swapped_meta.__setattr__)__name__ __module__ __qualname__r __classcell__r r rrrsrlittleZ __ctype_be__c@seZdZdZdZdZdS)BigEndianStructurez$Structure with big endian byte orderr Nrrr__doc__ __slots__Z_swappedbytes_r r r rr!.sr!) metaclassZbigZ __ctype_le__c@seZdZdZdZdZdS)LittleEndianStructurez'Structure with little endian byte orderr Nr"r r r rr&7sr&zInvalid byteorder) sysZctypestypeZArrayrrr r byteorderrr&r! RuntimeErrorr r r rs  PK!}#__pycache__/wintypes.cpython-38.pycnu[U ,a@sddlZejZejZejZejZej Z ej Z ej ZejZejZeZejZGdddejZejZejZejZejZejZZej Z!Z"ej#Z$Z%Z&ej#Z'Z(ej)Z*Z+ej,Z-Z.e/eje/ej,krejZ0ejZ1n$e/eje/ej,krej Z0ejZ1eZ2eZ3eZ4eZ5eZ6eZ7ej,Z8e8Z9e8Z:e8Z;e8Ze8Z?e8Z@e8ZAe8ZBe8ZCe8ZDe8ZEe8ZFe8ZGe8ZHe8ZIe8ZJe8ZKe8ZLe8ZMe8ZNe8ZOe8ZPe8ZQe8ZRe8ZSe8ZTe8ZUe8ZVe8ZWGdddejXZYeYZZZ[Z\GdddejXZ]e]Z^Gdd d ejXZ_Gd d d ejXZ`e`ZaZbZcGd d d ejXZdedZeZfddZgGdddejXZhehZiGdddejXZjejZkdZlGdddejXZmGdddejXZneoeZpZqeoeZreoeZsZteoeZueoe4ZveoeZwZxeoehZyZzeoeZ{eoe8Z|Z}eoeGZ~eoeHZeoeZZeoeZeoe7ZeoeZZeoejZZeoe`ZZeoecZeoeYZZeoe\ZZeoeVZeoeZeoedZZeoefZZeoe^Zeoe ZZeoe"ZeoeZeoeZeoe ZeoemZZeoenZZeoeZZdS)Nc@seZdZdZddZdS) VARIANT_BOOLvcCsd|jj|jfS)Nz%s(%r)) __class____name__value)selfr4/opt/alt/python38/lib64/python3.8/ctypes/wintypes.py__repr__szVARIANT_BOOL.__repr__N)r __module__ __qualname__Z_type_r rrrr rsrc@s(eZdZdefdefdefdefgZdS)RECTlefttoprightZbottomNrr r LONG_fields_rrrr r as r c@s(eZdZdefdefdefdefgZdS) _SMALL_RECTZLeftZTopZRightZBottomNrr r SHORTrrrrr rhs rc@seZdZdefdefgZdS)_COORDXYNrrrrr rosrc@seZdZdefdefgZdS)POINTxyNrrrrr rssrc@seZdZdefdefgZdS)SIZEZcxZcyNrrrrr rxsrcCs||d>|d>S)Nr)ZredZgreenZbluerrr RGB}sr c@seZdZdefdefgZdS)FILETIMEZ dwLowDateTimeZdwHighDateTimeN)rr r DWORDrrrrr r!sr!c@s4eZdZdefdefdefdefdefdefgZ dS)MSGZhWndmessageZwParamZlParamtimeZptN) rr r HWNDUINTWPARAMLPARAMr"rrrrrr r#sr#ic @sTeZdZdefdefdefdefdefdefdefdefd eefd ed fg Zd S) WIN32_FIND_DATAAdwFileAttributesftCreationTimeftLastAccessTimeftLastWriteTime nFileSizeHigh nFileSizeLow dwReserved0 dwReserved1 cFileNamecAlternateFileNameN)rr r r"r!CHARMAX_PATHrrrrr r*s  r*c @sTeZdZdefdefdefdefdefdefdefdefd eefd ed fg Zd S) WIN32_FIND_DATAWr+r,r-r.r/r0r1r2r3r4r5N)rr r r"r!WCHARr7rrrrr r8s  r8)ZctypesZc_byteZBYTEZc_ushortZWORDZc_ulongr"Zc_charr6Zc_wcharr9Zc_uintr'Zc_intZINTZc_doubleZDOUBLEZc_floatZFLOATZBOOLEANZc_longZBOOLZ _SimpleCDatarZULONGrZUSHORTZc_shortrZ c_longlongZ_LARGE_INTEGERZ LARGE_INTEGERZ c_ulonglongZ_ULARGE_INTEGERZULARGE_INTEGERZ c_wchar_pZ LPCOLESTRZLPOLESTRZOLESTRZLPCWSTRZLPWSTRZc_char_pZLPCSTRZLPSTRZc_void_pZLPCVOIDZLPVOIDZsizeofr(r)ZATOMZLANGIDZCOLORREFZLGRPIDZLCTYPEZLCIDZHANDLEZHACCELZHBITMAPZHBRUSHZ HCOLORSPACEZHDCZHDESKZHDWPZ HENHMETAFILEZHFONTZHGDIOBJZHGLOBALZHHOOKZHICONZ HINSTANCEZHKEYZHKLZHLOCALZHMENUZ HMETAFILEZHMODULEZHMONITORZHPALETTEZHPENZHRGNZHRSRCZHSTRZHTASKZHWINSTAr&Z SC_HANDLEZSERVICE_STATUS_HANDLEZ Structurer ZtagRECTZ_RECTLZRECTLrZ SMALL_RECTrrZtagPOINTZ_POINTLZPOINTLrZtagSIZEZSIZELr r!Z _FILETIMEr#ZtagMSGr7r*r8ZPOINTERZLPBOOLZPBOOLZPBOOLEANZLPBYTEZPBYTEZPCHARZ LPCOLORREFZLPDWORDZPDWORDZ LPFILETIMEZ PFILETIMEZPFLOATZLPHANDLEZPHANDLEZPHKEYZLPHKLZLPINTZPINTZPLARGE_INTEGERZPLCIDZLPLONGZPLONGZLPMSGZPMSGZLPPOINTZPPOINTZPPOINTLZLPRECTZPRECTZLPRECTLZPRECTLZ LPSC_HANDLEZPSHORTZLPSIZEZPSIZEZLPSIZELZPSIZELZ PSMALL_RECTZLPUINTZPUINTZPULARGE_INTEGERZPULONGZPUSHORTZPWCHARZLPWIN32_FIND_DATAAZPWIN32_FIND_DATAAZLPWIN32_FIND_DATAWZPWIN32_FIND_DATAWZLPWORDZPWORDrrrr s                        PK!l+7+7)__pycache__/__init__.cpython-38.opt-2.pycnu[U ,aE@sddlZddlZdZddlmZmZmZddlm Z ddlm Z ddlmZ ddlm Z mZddlmZdd lmZee kred ee ejd krdd lmZe Zejd krejdkreejdddkreZddlmZmZm Z!m"Z#d|ddZ$d}ddZ%iZ&ddZ'ejd krXddlm(Z)ddlm*Z+iZ,ddZ-e-j.rpe'j./dde-_.nejd krpddlm0Z)ddlm1Z1m2Z2m3Z3m4Z4m5Z5ddlm6Z6m7Z7ddlm8Z8d~d d!Z9Gd"d#d#e8Z:e9e:d$Gd%d&d&e8Z;e9e;Gd'd(d(e8Ze9e>ed-ed.krHe=Z?e>Z@n0Gd/d0d0e8Z?e9e?Gd1d2d2e8Z@e9e@Gd3d4d4e8ZAe9eAGd5d6d6e8ZBe9eBGd7d8d8e8ZCe1eCe1eBkreBZCed.ed9kre=ZDe>ZEn0Gd:d;d;e8ZDe9eDGdd?d?e8ZFeFeF_GeF_He9eFGd@dAdAe8ZIeIeI_GeI_He9eIGdBdCdCe8ZJeJeJ_GeJ_He9eJGdDdEdEe8ZKe9eKd$GdFdGdGe8ZLeLZMe9eLGdHdIdIe8ZNddJlmOZOmPZPmQZQGdKdLdLe8ZRGdMdNdNe8ZSdOdPZTddQdRZUdSdTZVdUdVZWGdWdXdXeXZYGdYdZdZeYZZejd krGd[d\d\eYZ[dd]lm\Z\m8Z8Gd^d_d_e8Z]Gd`dadaeYZ^GdbdcdceXZ_e_eYZ`e_eZZaejd kreZdddejbZcn,ejdekreZdfejdddgZcneZdZcejd kr4e_e[Zee_e^ZfeejgjhZhddhlmiZimjZjddidjZke1e@e1eLkrPe@Zle?Zmn6e1e>e1eLkrle>Zle=Zmne1eEe1eLkreEZleDZmddklmnZnmoZompZpmqZqe'eLeLeLelenZre'eLeLe?eleoZsdldmZtete:eLe:e:eqZudndoZvete:eLe?epZwddqdrZxzddslmyZyWnezk r$YnXete:eLe?eyZ{ddtduZ|ejd kr\dvdwZ}dxdyZ~ddzlmZmZeIZeFZe;e?e=eDfD]@Ze1edgkreZn&e1ed{kreZne1edkreZqeeEfD]@Ze1edgkreZn&e1ed{kreZne1edkreZq[eTdS)Nz1.1.0)Union StructureArray)_Pointer)CFuncPtr) __version__) RTLD_LOCAL RTLD_GLOBAL) ArgumentErrorcalcsizezVersion number mismatchnt) FormatErrorposixdarwin.)FUNCFLAG_CDECLFUNCFLAG_PYTHONAPIFUNCFLAG_USE_ERRNOFUNCFLAG_USE_LASTERRORcCszt|trD|dkrt|d}td||t|}|}||_|St|trntdd|t|}|}|St|dS)Nzctypes.create_string_buffer) isinstancebyteslen_sysauditc_charvalueint TypeErrorinitsizeZbuftypeZbufr$4/opt/alt/python38/lib64/python3.8/ctypes/__init__.pycreate_string_buffer/s   r&cCs t||SN)r&)r"r#r$r$r%c_bufferCsr(cst|ddrtO|ddr,tO|r@td|ztfWStk rGfdddt}|tf<|YSXdS)N use_errnoFuse_last_error!unexpected keyword argument(s) %scseZdZZZZdS)z CFUNCTYPE..CFunctionTypeN__name__ __module__ __qualname__ _argtypes_ _restype__flags_r$argtypesflagsrestyper$r% CFunctionTypeesr7) _FUNCFLAG_CDECLpop_FUNCFLAG_USE_ERRNO_FUNCFLAG_USE_LASTERROR ValueErrorkeys_c_functype_cacheKeyError _CFuncPtr)r6r4kwr7r$r3r% CFUNCTYPEKs  rB) LoadLibrary)FUNCFLAG_STDCALLcst|ddrtO|ddr,tO|r@td|ztfWStk rGfdddt}|tf<|YSXdS)Nr)Fr*r+cseZdZZZZdS)z$WINFUNCTYPE..WinFunctionTypeNr,r$r3r$r%WinFunctionType}srE) _FUNCFLAG_STDCALLr9r:r;r<r=_win_functype_cacher?r@)r6r4rArEr$r3r% WINFUNCTYPEqs  rH)dlopen)sizeofbyref addressof alignmentresize) get_errno set_errno) _SimpleCDatacCsJddlm}|dkr|j}t|||}}||krFtd|||fdS)Nrr z"sizeof(%s) wrong: %d instead of %d)structr _type_rJ SystemError)typtypecoder ZactualZrequiredr$r$r% _check_sizes rWcs eZdZdZfddZZS) py_objectOcs4z tWStk r.dt|jYSXdS)Nz %s())super__repr__r<typer-self __class__r$r%r[s zpy_object.__repr__)r-r.r/rSr[ __classcell__r$r$r_r%rXsrXPc@seZdZdZdS)c_shorthNr-r.r/rSr$r$r$r%rcsrcc@seZdZdZdS)c_ushortHNrer$r$r$r%rfsrfc@seZdZdZdS)c_longlNrer$r$r$r%rhsrhc@seZdZdZdS)c_ulongLNrer$r$r$r%rjsrjiric@seZdZdZdS)c_intrlNrer$r$r$r%rmsrmc@seZdZdZdS)c_uintINrer$r$r$r%rnsrnc@seZdZdZdS)c_floatfNrer$r$r$r%rpsrpc@seZdZdZdS)c_doubledNrer$r$r$r%rrsrrc@seZdZdZdS) c_longdoublegNrer$r$r$r%rtsrtqc@seZdZdZdS) c_longlongrvNrer$r$r$r%rwsrwc@seZdZdZdS) c_ulonglongQNrer$r$r$r%rxsrxc@seZdZdZdS)c_ubyteBNrer$r$r$r%rzsrzc@seZdZdZdS)c_bytebNrer$r$r$r%r|sr|c@seZdZdZdS)rcNrer$r$r$r%rsrc@seZdZdZddZdS)c_char_pzcCsd|jjt|jfSNz%s(%s)r`r-c_void_pZ from_bufferrr]r$r$r%r[szc_char_p.__repr__Nr-r.r/rSr[r$r$r$r%rsrc@seZdZdZdS)rrbNrer$r$r$r%rsrc@seZdZdZdS)c_bool?Nrer$r$r$r%rsr)POINTERpointer_pointer_type_cachec@seZdZdZddZdS) c_wchar_pZcCsd|jjt|jfSrrr]r$r$r%r[szc_wchar_p.__repr__Nrr$r$r$r%rsrc@seZdZdZdS)c_wcharuNrer$r$r$r%rsrcCsFtttjdkr"ttjtt _t jtt _t td<dS)Nr ) rclearr>_osnamerGrZ from_paramrrrrrr$r$r$r% _reset_caches   rcCst|trh|dkrBttdkr6tdd|Dd}n t|d}td||t|}|}||_|St|t rtdd|t|}|}|St |dS)Ncss"|]}t|dkrdndVqdS)irrN)ord).0r~r$r$r% sz(create_unicode_buffer..rzctypes.create_unicode_buffer) rstrrJrsumrrrrrr r!r$r$r%create_unicode_buffers     rcCsLt|ddk rtdt|tkr,td|||t|<tt|=dS)Nz%This type already exists in the cachezWhat's this???)rget RuntimeErroridZset_type)rclsr$r$r%SetPointerType.s  rcCs||Sr'r$)rUrr$r$r%ARRAY8src@sLeZdZeZeZdZdZdZ e ddddfddZ ddZ d d Z d d ZdS) CDLLzrNFc s|_j|rtO|r$tOtjdrV|rV|drVd|krV|tj tj BO}tj dkr|dk rn|}n6ddl }|j }d|ksd|kr|j_||jO}Gfdd d t}|_|dkrtj|_n|_dS) NZaix)z.a(r r/\cseZdZZjZdS)zCDLL.__init__.._FuncPtrN)r-r.r/r2_func_restype_r1r$r5r^r$r%_FuncPtrosr)_name _func_flags_r:r;rplatform startswithendswithrZ RTLD_MEMBERRTLD_NOWrr Z!_LOAD_LIBRARY_SEARCH_DEFAULT_DIRSZ_getfullpathnameZ!_LOAD_LIBRARY_SEARCH_DLL_LOAD_DIRr@r_dlopen_handle) r^rmodeZhandler)r*Zwinmoder rr$rr%__init__Ss,   z CDLL.__init__cCs8d|jj|j|jtjdd@t|tjdd@fS)Nz<%s '%s', handle %x at %#x>rr)r`r-rrrmaxsizerr]r$r$r%r[ys  z CDLL.__repr__cCs6|dr|drt|||}t||||S)N__)rrAttributeError __getitem__setattr)r^rfuncr$r$r% __getattr__s   zCDLL.__getattr__cCs"|||f}t|ts||_|Sr')rrrr-)r^Zname_or_ordinalrr$r$r%rs zCDLL.__getitem__)r-r.r/r8rrmrrrr DEFAULT_MODErr[rrr$r$r$r%r>s &rc@seZdZeeBZdS)PyDLLN)r-r.r/r8_FUNCFLAG_PYTHONAPIrr$r$r$r%rsrc@seZdZeZdS)WinDLLN)r-r.r/rFrr$r$r$r%rsr)_check_HRESULTrQc@seZdZdZeZdS)HRESULTriN)r-r.r/rSrZ_check_retval_r$r$r$r%rs rc@seZdZeZeZdS)OleDLLN)r-r.r/rFrrrr$r$r$r%rsrc@s,eZdZddZddZddZddZd S) LibraryLoadercCs ||_dSr'_dlltype)r^Zdlltyper$r$r%rszLibraryLoader.__init__cCs.|ddkrt|||}t||||S)Nr_)rrr)r^rZdllr$r$r%rs    zLibraryLoader.__getattr__cCs t||Sr')getattrr^rr$r$r%rszLibraryLoader.__getitem__cCs ||Sr'rrr$r$r%rCszLibraryLoader.LoadLibraryN)r-r.r/rrrrCr$r$r$r%rsrz python dllcygwinzlibpython%d.%d.dllr)get_last_errorset_last_errorcCs0|dkrt}|dkr"t|}td|d|Sr') GetLastErrorrstripOSError)codeZdescrr$r$r%WinErrors  r) _memmove_addr _memset_addr_string_at_addr _cast_addrcsGfdddt}|S)NcseZdZZZeeBZdS)z!PYFUNCTYPE..CFunctionTypeN)r-r.r/r0r1r8rr2r$r4r6r$r%r7sr7)r@)r6r4r7r$rr% PYFUNCTYPEsrcCs t|||Sr')_cast)objrUr$r$r%castsrcCs t||Sr') _string_atZptrr#r$r$r% string_atsr)_wstring_at_addrcCs t||Sr') _wstring_atrr$r$r% wstring_at srcCsBztdttdg}Wntk r.YdSX||||SdS)Ncomtypes.server.inprocserver*i) __import__globalslocals ImportErrorDllGetClassObject)ZrclsidZriidZppvccomr$r$r%rs rcCs8ztdttdg}Wntk r.YdSX|S)Nrrr)rrrrDllCanUnloadNow)rr$r$r%rs r)BigEndianStructureLittleEndianStructure)N)N)N)N)NN)r)r)osrsysrrZ_ctypesrrrrrr@Z_ctypes_versionrr r rRr Z _calcsize Exceptionrrrrrunamereleasesplitrr8rrrr:rr;r&r(r>rBrCrrDrFrGrH__doc__replacerIrJrKrLrMrNrOrPrQrWrXrcrfrhrjrmrnrprrrtrwrxrzZ __ctype_le__Z __ctype_be__r|rrrZc_voidprrrrrrrrrrobjectrrrrrrrZcdllZpydllZ dllhandleZ pythonapi version_infoZwindllZoledllZkernel32rrrrZc_size_tZ c_ssize_trrrrZmemmoveZmemsetrrrrrrrrrrrZctypes._endianrrZc_int8Zc_uint8ZkindZc_int16Zc_int32Zc_int64Zc_uint16Zc_uint32Zc_uint64r$r$r$r%s2          !              N          PK!jCC(__pycache__/_endian.cpython-38.opt-2.pycnu[U ,a@sddlZddlTeeZddZGdddeeZejdkr\dZ eZ Gd d d eed Z n0ejd krd Z eZ Gdddeed Z ne ddS)N)*cCsLt|trt|tSt|tr.t|j|jSt|t r<|St d|dS)Nz+This type does not support other endian: %s) hasattr _OTHER_ENDIANgetattr isinstance _array_type _other_endianZ_type_Z_length_ issubclass Structure TypeError)typr 3/opt/alt/python38/lib64/python3.8/ctypes/_endian.pyrs    rcseZdZfddZZS) _swapped_metacs^|dkrLg}|D]6}|d}|d}|dd}||t|f|q|}t||dS)NZ_fields_r)appendrsuper __setattr__)selfattrnamevalueZfieldsZdescnamer rest __class__r rrs z_swapped_meta.__setattr__)__name__ __module__ __qualname__r __classcell__r r rrrsrlittleZ __ctype_be__c@seZdZdZdZdS)BigEndianStructurer Nrrr __slots__Z_swappedbytes_r r r rr!.sr!) metaclassZbigZ __ctype_le__c@seZdZdZdZdS)LittleEndianStructurer Nr"r r r rr%7sr%zInvalid byteorder) sysZctypestypeZArrayrrr r byteorderrr%r! RuntimeErrorr r r rs  PK!rrL%__pycache__/util.cpython-38.opt-1.pycnu[U ,a76@sBddlZddlZddlZddlZejdkrDddZddZddZnejd krnejd krndd l m Z d dZnej d rddl mZnejd kr&ddlZddlZddZddZejdkrddZnddZej drddZddZn8ejdkrddZd'ddZndd Zd!d"Zd#dZd$d%Zed&kr>edS)(NntcCsd}tj|}|dkrdS|t|}tj|ddd\}}t|ddd}|dkrf|d7}t|d d d }|dkrd }|dkr||SdS) zReturn the version of MSVC that was used to build Python. For Python 2.3 and up, the version number is included in sys.version. For earlier versions, assume the compiler is MSVC 6. zMSC v.N  g$@r)sysversionfindlensplitint)prefixisrestZ majorVersionZ minorVersionr0/opt/alt/python38/lib64/python3.8/ctypes/util.py_get_build_version s  rcCs^t}|dkrdS|dkr d}n|dkr6d|d}ndSddl}d|jjkrV|d 7}|d S) z%Return the name of the VC runtime dllNrmsvcrtrzmsvcr%d rz_d.pydd.dll)rimportlib.machinery machineryEXTENSION_SUFFIXES)r Zclibname importlibrrr find_msvcrt"s r cCsx|dkrtStjdtjD]R}tj||}tj|rF|S| drVq |d}tj|r |Sq dS)N)cmPATHr) r osenvironrpathseppathjoinisfilelowerendswith)nameZ directoryZfnamerrr find_library7s   r-posixdarwin) dyld_findc CsPd|d|d||fg}|D],}zt|WStk rHYqYqXqdS)Nz lib%s.dylibz%s.dylibz%s.framework/%s) _dyld_find ValueError)r,possiblerrrr-Hs  aix)r-c Cs4d}t|d}|d|kW5QRSQRXdS)z,Return True if the given file is an ELF filesELFbrN)openread)filenameZ elf_headerZthefilerrr_is_elf`s r:c Cs tdt|}td}|s,td}|s4dSt}z|dd|j d|g}t tj }d|d<d|d <zt j|t jt j|d }Wntk rYW$dSX||j}W5QRXW5z |Wnt k rYnXXt||}|sdS|D]} t| sqt| SdS) N[^\(\)\s]*lib%s\.[^\(\)\s]*ZgccZccz-Wl,-t-oz-lCLC_ALLLANGstdoutstderrenv)r$fsencodereescapeshutilwhichtempfileZNamedTemporaryFilecloseFileNotFoundErrorr,dictr% subprocessPopenPIPEZSTDOUTOSErrorrAr8findallr:fsdecode) r,exprZ c_compilerZtempargsrCprocZtraceresfilerrr _findLib_gccfsB        rXZsunos5c Cs||sdSztjdd|ftjtjd}Wntk r<YdSX||j}W5QRXtd|}|sldSt | dS)Nz/usr/ccs/bin/dumpz-LpvrArBs\[.*\]\sSONAME\s+([^\s]+)r) rMrNrODEVNULLrPrAr8rEsearchr$rRgroup)frUdatarVrrr _get_sonames   r_c Cs|sdStd}|sdSz"tj|ddd|ftjtjd}Wntk rRYdSX||j}W5QRXt d|}|sdSt | dS)Nobjdump-pz-jz.dynamicrYs\sSONAME\s+([^\s]+)r)rGrHrMrNrOrZrPrAr8rEr[r$rRr\)r]r`rUdumprVrrrr_s$   )ZfreebsdZopenbsdZ dragonflycCsN|d}g}z|r*|dt|qWntk r@YnX|pLtjgS)N.r)rinsertrpopr2r maxsize)ZlibnamepartsZnumsrrr _num_versions rhc Cst|}d||f}t|}ztjdtjtjd}Wntk rPd}YnX||j }W5QRXt ||}|st t |S|jtdt|dS)Nz:-l%s\.\S+ => \S*/(lib%s\.\S+))/sbin/ldconfigz-rrY)keyr)rErFr$rDrMrNrOrZrPrAr8rQr_rXsortrhrR)r,ZenamerSrUr^rVrrrr-s"        c CstjdsdSttj}d|d<|r,d}nd}d}ztj|tjtj|d}Wnt k rdYdSX|6|j D](}| }| drrt |d}qrW5QRX|sdS|d D]*}tj|d |}tj|r|SqdS) N /usr/bin/crler=r>)rm-64)rmr@sDefault Library Path (ELF):r6:zlib%s.so)r$r'existsrLr%rMrNrOrZrPrAstrip startswithrRrr() r,is64rCrTpathsrUlinedirZlibfilerrr _findLib_crles8       rwFcCstt||pt|SN)r_rwrX)r,rsrrrr- sc Csddl}|ddkr&tjd}ntjd}dddddd }||d }d }t|t||f}zht j d d gt j t j t j dddd:}t ||j}|rt|dW5QRWSW5QRXWntk rYnXdS)Nrlr6z-32rnz libc6,x86-64z libc6,64bitz libc6,IA-64)z x86_64-64zppc64-64z sparc64-64zs390x-64zia64-64Zlibc6z\s+(lib%s\.[^\s]+)\s+\(%srirar=)r>r?)stdinrBrArCr)structZcalcsizer$unamemachinegetrDrErFrMrNrZrOr[rAr8rRr\rP)r,r{r}Zmach_mapZabi_typeZregexprVrrr_findSoname_ldconfigs4  ,rc Csdt|}ddg}tjd}|rD|dD]}|d|gq0|dtjd|gd}zZtj |tj tj d d }| \}}t |t |} | D]} t| sqt | WSWntk rYnX|S) Nr;Zldz-tZLD_LIBRARY_PATHroz-Lr<z-l%sT)rArBZuniversal_newlines)rErFr$r%r~rextenddevnullrMrNrOZ communicaterQrRr: Exception) r,rScmdZlibpathrresultrout_rVrWrrr _findLib_ld,s,   rcCs t|ptt|ptt|Srx)rr_rXr)r,rrrr-Gs   cCsddlm}tjdkr:t|jt|dttdtjdkrttdttdttdtj d krt| d t| d t| d t| d ntj drddlm }tj dkrtd|dtjtd| dttdt| dn*td|dtjtd| dtdtdtd| tdtdtdtd| tdn(t| dt| dttddS)Nr)cdllrrr.r"r!bz2r/z libm.dylibzlibcrypto.dylibzlibSystem.dylibzSystem.framework/Systemr4)CDLLlz"Using CDLL(name, os.RTLD_MEMBER): z libc.a(shr.o)zUsing cdll.LoadLibrary(): Zrpmz librpm.sozlibc.a(shr_64.o)z crypt :: Zcryptz crypto :: Zcryptozlibm.soz libcrypt.so)Zctypesrr$r,printrloadr-r platformZ LoadLibraryrrrrfZ RTLD_MEMBER)rrrrrtestOs<            r__main__)F)r$rGrMr r,rr r-rZctypes.macholib.dyldr0r1rrZ ctypes._aixrErIr:rXr_rhrwrrr__name__rrrrs>     2     $ ( PK!})__pycache__/wintypes.cpython-38.opt-1.pycnu[U ,a@sddlZejZejZejZejZej Z ej Z ej ZejZejZeZejZGdddejZejZejZejZejZejZZej Z!Z"ej#Z$Z%Z&ej#Z'Z(ej)Z*Z+ej,Z-Z.e/eje/ej,krejZ0ejZ1n$e/eje/ej,krej Z0ejZ1eZ2eZ3eZ4eZ5eZ6eZ7ej,Z8e8Z9e8Z:e8Z;e8Ze8Z?e8Z@e8ZAe8ZBe8ZCe8ZDe8ZEe8ZFe8ZGe8ZHe8ZIe8ZJe8ZKe8ZLe8ZMe8ZNe8ZOe8ZPe8ZQe8ZRe8ZSe8ZTe8ZUe8ZVe8ZWGdddejXZYeYZZZ[Z\GdddejXZ]e]Z^Gdd d ejXZ_Gd d d ejXZ`e`ZaZbZcGd d d ejXZdedZeZfddZgGdddejXZhehZiGdddejXZjejZkdZlGdddejXZmGdddejXZneoeZpZqeoeZreoeZsZteoeZueoe4ZveoeZwZxeoehZyZzeoeZ{eoe8Z|Z}eoeGZ~eoeHZeoeZZeoeZeoe7ZeoeZZeoejZZeoe`ZZeoecZeoeYZZeoe\ZZeoeVZeoeZeoedZZeoefZZeoe^Zeoe ZZeoe"ZeoeZeoeZeoe ZeoemZZeoenZZeoeZZdS)Nc@seZdZdZddZdS) VARIANT_BOOLvcCsd|jj|jfS)Nz%s(%r)) __class____name__value)selfr4/opt/alt/python38/lib64/python3.8/ctypes/wintypes.py__repr__szVARIANT_BOOL.__repr__N)r __module__ __qualname__Z_type_r rrrr rsrc@s(eZdZdefdefdefdefgZdS)RECTlefttoprightZbottomNrr r LONG_fields_rrrr r as r c@s(eZdZdefdefdefdefgZdS) _SMALL_RECTZLeftZTopZRightZBottomNrr r SHORTrrrrr rhs rc@seZdZdefdefgZdS)_COORDXYNrrrrr rosrc@seZdZdefdefgZdS)POINTxyNrrrrr rssrc@seZdZdefdefgZdS)SIZEZcxZcyNrrrrr rxsrcCs||d>|d>S)Nr)ZredZgreenZbluerrr RGB}sr c@seZdZdefdefgZdS)FILETIMEZ dwLowDateTimeZdwHighDateTimeN)rr r DWORDrrrrr r!sr!c@s4eZdZdefdefdefdefdefdefgZ dS)MSGZhWndmessageZwParamZlParamtimeZptN) rr r HWNDUINTWPARAMLPARAMr"rrrrrr r#sr#ic @sTeZdZdefdefdefdefdefdefdefdefd eefd ed fg Zd S) WIN32_FIND_DATAAdwFileAttributesftCreationTimeftLastAccessTimeftLastWriteTime nFileSizeHigh nFileSizeLow dwReserved0 dwReserved1 cFileNamecAlternateFileNameN)rr r r"r!CHARMAX_PATHrrrrr r*s  r*c @sTeZdZdefdefdefdefdefdefdefdefd eefd ed fg Zd S) WIN32_FIND_DATAWr+r,r-r.r/r0r1r2r3r4r5N)rr r r"r!WCHARr7rrrrr r8s  r8)ZctypesZc_byteZBYTEZc_ushortZWORDZc_ulongr"Zc_charr6Zc_wcharr9Zc_uintr'Zc_intZINTZc_doubleZDOUBLEZc_floatZFLOATZBOOLEANZc_longZBOOLZ _SimpleCDatarZULONGrZUSHORTZc_shortrZ c_longlongZ_LARGE_INTEGERZ LARGE_INTEGERZ c_ulonglongZ_ULARGE_INTEGERZULARGE_INTEGERZ c_wchar_pZ LPCOLESTRZLPOLESTRZOLESTRZLPCWSTRZLPWSTRZc_char_pZLPCSTRZLPSTRZc_void_pZLPCVOIDZLPVOIDZsizeofr(r)ZATOMZLANGIDZCOLORREFZLGRPIDZLCTYPEZLCIDZHANDLEZHACCELZHBITMAPZHBRUSHZ HCOLORSPACEZHDCZHDESKZHDWPZ HENHMETAFILEZHFONTZHGDIOBJZHGLOBALZHHOOKZHICONZ HINSTANCEZHKEYZHKLZHLOCALZHMENUZ HMETAFILEZHMODULEZHMONITORZHPALETTEZHPENZHRGNZHRSRCZHSTRZHTASKZHWINSTAr&Z SC_HANDLEZSERVICE_STATUS_HANDLEZ Structurer ZtagRECTZ_RECTLZRECTLrZ SMALL_RECTrrZtagPOINTZ_POINTLZPOINTLrZtagSIZEZSIZELr r!Z _FILETIMEr#ZtagMSGr7r*r8ZPOINTERZLPBOOLZPBOOLZPBOOLEANZLPBYTEZPBYTEZPCHARZ LPCOLORREFZLPDWORDZPDWORDZ LPFILETIMEZ PFILETIMEZPFLOATZLPHANDLEZPHANDLEZPHKEYZLPHKLZLPINTZPINTZPLARGE_INTEGERZPLCIDZLPLONGZPLONGZLPMSGZPMSGZLPPOINTZPPOINTZPPOINTLZLPRECTZPRECTZLPRECTLZPRECTLZ LPSC_HANDLEZPSHORTZLPSIZEZPSIZEZLPSIZELZPSIZELZ PSMALL_RECTZLPUINTZPUINTZPULARGE_INTEGERZPULONGZPUSHORTZPWCHARZLPWIN32_FIND_DATAAZPWIN32_FIND_DATAAZLPWIN32_FIND_DATAWZPWIN32_FIND_DATAWZLPWORDZPWORDrrrr s                        PK!$)ۃ&&%__pycache__/_aix.cpython-38.opt-1.pycnu[U ,a1@sdZdZddlZddlmZmZddlmZddlm Z m Z ddl m Z m Z mZe e dZdd lmZd d Zd d ZddZddZddZddZddZddZddZddZddZd d!ZdS)"a Lib/ctypes.util.find_library() support for AIX Similar approach as done for Darwin support by using separate files but unlike Darwin - no extension such as ctypes.macholib.* dlopen() is an interface to AIX initAndLoad() - primary documentation at: https://www.ibm.com/support/knowledgecenter/en/ssw_aix_61/com.ibm.aix.basetrf1/dlopen.htm https://www.ibm.com/support/knowledgecenter/en/ssw_aix_61/com.ibm.aix.basetrf1/load.htm AIX supports two styles for dlopen(): svr4 (System V Release 4) which is common on posix platforms, but also a BSD style - aka SVR3. From AIX 5.3 Difference Addendum (December 2004) 2.9 SVR4 linking affinity Nowadays, there are two major object file formats used by the operating systems: XCOFF: The COFF enhanced by IBM and others. The original COFF (Common Object File Format) was the base of SVR3 and BSD 4.2 systems. ELF: Executable and Linking Format that was developed by AT&T and is a base for SVR4 UNIX. While the shared library content is identical on AIX - one is located as a filepath name (svr4 style) and the other is located as a member of an archive (and the archive is located as a filepath name). The key difference arises when supporting multiple abi formats (i.e., 32 and 64 bit). For svr4 either only one ABI is supported, or there are two directories, or there are different file names. The most common solution for multiple ABI is multiple directories. For the XCOFF (aka AIX) style - one directory (one archive file) is sufficient as multiple shared libraries can be in the archive - even sharing the same name. In documentation the archive is also referred to as the "base" and the shared library object is referred to as the "member". For dlopen() on AIX (read initAndLoad()) the calls are similar. Default activity occurs when no path information is provided. When path information is provided dlopen() does not search any other directories. For SVR4 - the shared library name is the name of the file expected: libFOO.so For AIX - the shared library is expressed as base(member). The search is for the base (e.g., libFOO.a) and once the base is found the shared library - identified by member (e.g., libFOO.so, or shr.o) is located and loaded. The mode bit RTLD_MEMBER tells initAndLoad() that it needs to use the AIX (SVR3) naming style. z%Michael Felt N)environpath) executable)c_void_psizeof)PopenPIPEDEVNULL)maxsizecsfdd}tt||dS)NcsL|}g}z|r*|dt|qWntk r@YnX|pJtgS)Nr)splitinsertintpop ValueErrorr )ZlibnamepartsZnumssep0/opt/alt/python38/lib64/python3.8/ctypes/_aix.py _num_version>s z#_last_version.._num_version)key)maxreversed)Zlibnamesrrrrr _last_version=s rcCs:d}|jD]*}|dr|}q d|kr |dSq dS)N)/z./z../ZINDEX )stdout startswithrstrip)p ld_headerlinerrr get_ld_headerJs  r#cCs0g}|jD] }td|r&||q q,q |S)Nz[0-9])rrematchappend)r infor"rrrget_ld_header_infoTs    r(cCs\g}tddtd|gdttd}t|}|rF||t|fq"qFq"|j| |S)z Parse the header of the loader section of executable and archives This function calls /usr/bin/dump -H as a subprocess and returns a list of (ld_header, ld_header_info) tuples. z /usr/bin/dumpz-Xz-HT)Zuniversal_newlinesrstderr) rAIX_ABIrr r#r&r(rclosewait)fileZ ldr_headersr r!rrrget_ld_headersas  r.cCs6g}|D](\}}d|kr|||ddq|S)z extract the shareable objects from ld_headers character "[" is used to strip off the path information. Note: the "[" and "]" characters that are part of dump -H output are not removed here. [)r&index)Z ld_headersZsharedr"_rrr get_sharedys  r3csJddttdfdd|D}t|dkrB|ddSdSdS)zy Must be only one match, otherwise result is None. When there is a match, strip leading "[" and trailing "]" z\[(z)\]Nc3s|]}t|VqdS)N)r$search).0r"exprrr sz get_one_match..r)listfilterlengroup)r7linesZmatchesrr6r get_one_matchs   r?cCsJtdkr d}t||}|rF|Sn&dD] }tt||}|r$|Sq$dS)z This routine provides historical aka legacy naming schemes started in AIX4 shared library support for library members names. e.g., in /usr/lib/libc.a the member name shr.o for 32-bit binary and shr_64.o for 64-bit binary. @z shr4?_?64\.o)zshr.ozshr4.oN)r*r?r$escape)membersr7membernamerrr get_legacys  rEcCsfd|dd|dg}|D]D}g}|D]$}t||}|r(||dq(|rt|dSqdS)a Sort list of members and return highest numbered version - if it exists. This function is called when an unversioned libFOO.a(libFOO.so) has not been found. Versioning for the member name is expected to follow GNU LIBTOOL conventions: the highest version (x, then X.y, then X.Y.z) * find [libFoo.so.X] * find [libFoo.so.X.Y] * find [libFoo.so.X.Y.Z] Before the GNU convention became the standard scheme regardless of binary size AIX packagers used GNU convention "as-is" for 32-bit archive members but used an "distinguishing" name for 64-bit members. This scheme inserted either 64 or _64 between libFOO and .so - generally libFOO_64.so, but occasionally libFOO64.so libz\.so\.[0-9]+[0-9.]*z_?64\.so\.[0-9]+[0-9.]*r.N)r$r4r&r=r)rDrBZexprsr7Zversionsr"mrrr get_versions   rIcCsbd|d}t||}|r|Stdkrr"rrrr get_libpathss     rOcCsp|D]f}|dkrqd|d}t||}t|rtt|}tt||}|dkrd||fSdSqdS)a paths is a list of directories to search for an archive. name is the abbreviated name given to find_library(). Process: search "paths" for archive, and if an archive is found return the result of get_member(). If an archive is not found then return None /librFz.aN)NN)rjoinexistsr3r.rJr$rA)pathsrDdirbasearchiverBrCrrr find_shared s     rWcCsnt}t||\}}|dkr,|d|dSd|d}|D],}|dkrJqs(.      &PK!mO̜%__pycache__/_aix.cpython-38.opt-2.pycnu[U ,a1@sdZddlZddlmZmZddlmZddlmZm Z ddl m Z m Z m Z e edZddlmZd d Zd d Zd dZddZddZddZddZddZddZddZddZdd ZdS)!z%Michael Felt N)environpath) executable)c_void_psizeof)PopenPIPEDEVNULL)maxsizecsfdd}tt||dS)NcsL|}g}z|r*|dt|qWntk r@YnX|pJtgS)Nr)splitinsertintpop ValueErrorr )ZlibnamepartsZnumssep0/opt/alt/python38/lib64/python3.8/ctypes/_aix.py _num_version>s z#_last_version.._num_version)key)maxreversed)Zlibnamesrrrrr _last_version=s rcCs:d}|jD]*}|dr|}q d|kr |dSq dS)N)/z./z../ZINDEX )stdout startswithrstrip)p ld_headerlinerrr get_ld_headerJs  r#cCs0g}|jD] }td|r&||q q,q |S)Nz[0-9])rrematchappend)r infor"rrrget_ld_header_infoTs    r(cCs\g}tddtd|gdttd}t|}|rF||t|fq"qFq"|j| |S)Nz /usr/bin/dumpz-Xz-HT)Zuniversal_newlinesrstderr) rAIX_ABIrr r#r&r(rclosewait)fileZ ldr_headersr r!rrrget_ld_headersas  r.cCs6g}|D](\}}d|kr|||ddq|S)N[)r&index)Z ld_headersZsharedr"_rrr get_sharedys  r3csJddttdfdd|D}t|dkrB|ddSdSdS)Nz\[(z)\]c3s|]}t|VqdS)N)r$search).0r"exprrr sz get_one_match..r)listfilterlengroup)r7linesZmatchesrr6r get_one_matchs   r?cCsJtdkr d}t||}|rF|Sn&dD] }tt||}|r$|Sq$dS)N@z shr4?_?64\.o)zshr.ozshr4.o)r*r?r$escape)membersr7membernamerrr get_legacys  rEcCsfd|dd|dg}|D]D}g}|D]$}t||}|r(||dq(|rt|dSqdS)Nlibz\.so\.[0-9]+[0-9.]*z_?64\.so\.[0-9]+[0-9.]*r.)r$r4r&r=r)rDrBZexprsr7Zversionsr"mrrr get_versions   rIcCsbd|d}t||}|r|Stdkrr"rrrr get_libpathss     rOcCsp|D]f}|dkrqd|d}t||}t|rtt|}tt||}|dkrd||fSdSqdS)N/librFz.a)NN)rjoinexistsr3r.rJr$rA)pathsrDdirbasearchiverBrCrrr find_shared s     rWcCsnt}t||\}}|dkr,|d|dSd|d}|D],}|dkrJq/s&      &PK!$)ۃ&&__pycache__/_aix.cpython-38.pycnu[U ,a1@sdZdZddlZddlmZmZddlmZddlm Z m Z ddl m Z m Z mZe e dZdd lmZd d Zd d ZddZddZddZddZddZddZddZddZddZd d!ZdS)"a Lib/ctypes.util.find_library() support for AIX Similar approach as done for Darwin support by using separate files but unlike Darwin - no extension such as ctypes.macholib.* dlopen() is an interface to AIX initAndLoad() - primary documentation at: https://www.ibm.com/support/knowledgecenter/en/ssw_aix_61/com.ibm.aix.basetrf1/dlopen.htm https://www.ibm.com/support/knowledgecenter/en/ssw_aix_61/com.ibm.aix.basetrf1/load.htm AIX supports two styles for dlopen(): svr4 (System V Release 4) which is common on posix platforms, but also a BSD style - aka SVR3. From AIX 5.3 Difference Addendum (December 2004) 2.9 SVR4 linking affinity Nowadays, there are two major object file formats used by the operating systems: XCOFF: The COFF enhanced by IBM and others. The original COFF (Common Object File Format) was the base of SVR3 and BSD 4.2 systems. ELF: Executable and Linking Format that was developed by AT&T and is a base for SVR4 UNIX. While the shared library content is identical on AIX - one is located as a filepath name (svr4 style) and the other is located as a member of an archive (and the archive is located as a filepath name). The key difference arises when supporting multiple abi formats (i.e., 32 and 64 bit). For svr4 either only one ABI is supported, or there are two directories, or there are different file names. The most common solution for multiple ABI is multiple directories. For the XCOFF (aka AIX) style - one directory (one archive file) is sufficient as multiple shared libraries can be in the archive - even sharing the same name. In documentation the archive is also referred to as the "base" and the shared library object is referred to as the "member". For dlopen() on AIX (read initAndLoad()) the calls are similar. Default activity occurs when no path information is provided. When path information is provided dlopen() does not search any other directories. For SVR4 - the shared library name is the name of the file expected: libFOO.so For AIX - the shared library is expressed as base(member). The search is for the base (e.g., libFOO.a) and once the base is found the shared library - identified by member (e.g., libFOO.so, or shr.o) is located and loaded. The mode bit RTLD_MEMBER tells initAndLoad() that it needs to use the AIX (SVR3) naming style. z%Michael Felt N)environpath) executable)c_void_psizeof)PopenPIPEDEVNULL)maxsizecsfdd}tt||dS)NcsL|}g}z|r*|dt|qWntk r@YnX|pJtgS)Nr)splitinsertintpop ValueErrorr )ZlibnamepartsZnumssep0/opt/alt/python38/lib64/python3.8/ctypes/_aix.py _num_version>s z#_last_version.._num_version)key)maxreversed)Zlibnamesrrrrr _last_version=s rcCs:d}|jD]*}|dr|}q d|kr |dSq dS)N)/z./z../ZINDEX )stdout startswithrstrip)p ld_headerlinerrr get_ld_headerJs  r#cCs0g}|jD] }td|r&||q q,q |S)Nz[0-9])rrematchappend)r infor"rrrget_ld_header_infoTs    r(cCs\g}tddtd|gdttd}t|}|rF||t|fq"qFq"|j| |S)z Parse the header of the loader section of executable and archives This function calls /usr/bin/dump -H as a subprocess and returns a list of (ld_header, ld_header_info) tuples. z /usr/bin/dumpz-Xz-HT)Zuniversal_newlinesrstderr) rAIX_ABIrr r#r&r(rclosewait)fileZ ldr_headersr r!rrrget_ld_headersas  r.cCs6g}|D](\}}d|kr|||ddq|S)z extract the shareable objects from ld_headers character "[" is used to strip off the path information. Note: the "[" and "]" characters that are part of dump -H output are not removed here. [)r&index)Z ld_headersZsharedr"_rrr get_sharedys  r3csJddttdfdd|D}t|dkrB|ddSdSdS)zy Must be only one match, otherwise result is None. When there is a match, strip leading "[" and trailing "]" z\[(z)\]Nc3s|]}t|VqdS)N)r$search).0r"exprrr sz get_one_match..r)listfilterlengroup)r7linesZmatchesrr6r get_one_matchs   r?cCsJtdkr d}t||}|rF|Sn&dD] }tt||}|r$|Sq$dS)z This routine provides historical aka legacy naming schemes started in AIX4 shared library support for library members names. e.g., in /usr/lib/libc.a the member name shr.o for 32-bit binary and shr_64.o for 64-bit binary. @z shr4?_?64\.o)zshr.ozshr4.oN)r*r?r$escape)membersr7membernamerrr get_legacys  rEcCsfd|dd|dg}|D]D}g}|D]$}t||}|r(||dq(|rt|dSqdS)a Sort list of members and return highest numbered version - if it exists. This function is called when an unversioned libFOO.a(libFOO.so) has not been found. Versioning for the member name is expected to follow GNU LIBTOOL conventions: the highest version (x, then X.y, then X.Y.z) * find [libFoo.so.X] * find [libFoo.so.X.Y] * find [libFoo.so.X.Y.Z] Before the GNU convention became the standard scheme regardless of binary size AIX packagers used GNU convention "as-is" for 32-bit archive members but used an "distinguishing" name for 64-bit members. This scheme inserted either 64 or _64 between libFOO and .so - generally libFOO_64.so, but occasionally libFOO64.so libz\.so\.[0-9]+[0-9.]*z_?64\.so\.[0-9]+[0-9.]*r.N)r$r4r&r=r)rDrBZexprsr7Zversionsr"mrrr get_versions   rIcCsbd|d}t||}|r|Stdkrr"rrrr get_libpathss     rOcCsp|D]f}|dkrqd|d}t||}t|rtt|}tt||}|dkrd||fSdSqdS)a paths is a list of directories to search for an archive. name is the abbreviated name given to find_library(). Process: search "paths" for archive, and if an archive is found return the result of get_member(). If an archive is not found then return None /librFz.aN)NN)rjoinexistsr3r.rJr$rA)pathsrDdirbasearchiverBrCrrr find_shared s     rWcCsnt}t||\}}|dkr,|d|dSd|d}|D],}|dkrJqs(.      &PK!"p@@)__pycache__/__init__.cpython-38.opt-1.pycnu[U ,aE@s dZddlZddlZdZddlmZmZm Z ddlm Z ddlm Z ddlmZ ddlmZmZdd lmZdd lmZee kred ee ejd krdd lmZeZejdkrejdkreejdddkreZddlmZmZ m!Z"m#Z$d}ddZ%d~ddZ&iZ'ddZ(ejd kr\ddlm)Z*ddlm+Z,iZ-ddZ.e.jrte(j/dde._nejdkrtddlm0Z*ddlm1Z1m2Z2m3Z3m4Z4m5Z5ddlm6Z6m7Z7dd lm8Z8dd!d"Z9Gd#d$d$e8Z:e9e:d%Gd&d'd'e8Z;e9e;Gd(d)d)e8Ze9e>ed.ed/krLe=Z?e>Z@n0Gd0d1d1e8Z?e9e?Gd2d3d3e8Z@e9e@Gd4d5d5e8ZAe9eAGd6d7d7e8ZBe9eBGd8d9d9e8ZCe1eCe1eBkreBZCed/ed:kre=ZDe>ZEn0Gd;d<dd>e8ZEe9eEGd?d@d@e8ZFeFeF_GeF_He9eFGdAdBdBe8ZIeIeI_GeI_He9eIGdCdDdDe8ZJeJeJ_GeJ_He9eJGdEdFdFe8ZKe9eKd%GdGdHdHe8ZLeLZMe9eLGdIdJdJe8ZNddKlmOZOmPZPmQZQGdLdMdMe8ZRGdNdOdOe8ZSdPdQZTddRdSZUdTdUZVdVdWZWGdXdYdYeXZYGdZd[d[eYZZejd krGd\d]d]eYZ[dd^lm\Z\m8Z8Gd_d`d`e8Z]GdadbdbeYZ^GdcddddeXZ_e_eYZ`e_eZZaejd kreZdedejbZcn,ejdfkreZdgejdddhZcneZdZcejd kr8e_e[Zee_e^ZfeejgjhZhddilmiZimjZjddjdkZke1e@e1eLkrTe@Zle?Zmn6e1e>e1eLkrpe>Zle=Zmne1eEe1eLkreEZleDZmddllmnZnmoZompZpmqZqe(eLeLeLelenZre(eLeLe?eleoZsdmdnZtete:eLe:e:eqZudodpZvete:eLe?epZwddrdsZxzddtlmyZyWnezk r(YnXete:eLe?eyZ{ddudvZ|ejd kr`dwdxZ}dydzZ~dd{lmZmZeIZeFZe;e?e=eDfD]@Ze1edhkreZn&e1ed|kreZne1edkreZqeeEfD]@Ze1edhkreZn&e1ed|kreZne1edkreZq[eTdS)z,create and manipulate C data types in PythonNz1.1.0)Union StructureArray)_Pointer)CFuncPtr) __version__) RTLD_LOCAL RTLD_GLOBAL) ArgumentErrorcalcsizezVersion number mismatchnt) FormatErrorposixdarwin.)FUNCFLAG_CDECLFUNCFLAG_PYTHONAPIFUNCFLAG_USE_ERRNOFUNCFLAG_USE_LASTERRORcCszt|trD|dkrt|d}td||t|}|}||_|St|trntdd|t|}|}|St|dS)zcreate_string_buffer(aBytes) -> character array create_string_buffer(anInteger) -> character array create_string_buffer(aBytes, anInteger) -> character array Nzctypes.create_string_buffer) isinstancebyteslen_sysauditc_charvalueint TypeErrorinitsizeZbuftypeZbufr$4/opt/alt/python38/lib64/python3.8/ctypes/__init__.pycreate_string_buffer/s   r&cCs t||SN)r&)r"r#r$r$r%c_bufferCsr(cst|ddrtO|ddr,tO|r@td|ztfWStk rGfdddt}|tf<|YSXdS)aCFUNCTYPE(restype, *argtypes, use_errno=False, use_last_error=False) -> function prototype. restype: the result type argtypes: a sequence specifying the argument types The function prototype can be called in different ways to create a callable object: prototype(integer address) -> foreign function prototype(callable) -> create and return a C callable function from callable prototype(integer index, method name[, paramflags]) -> foreign function calling a COM method prototype((ordinal number, dll object)[, paramflags]) -> foreign function exported by ordinal prototype((function name, dll object)[, paramflags]) -> foreign function exported by name use_errnoFuse_last_error!unexpected keyword argument(s) %scseZdZZZZdS)z CFUNCTYPE..CFunctionTypeN__name__ __module__ __qualname__ _argtypes_ _restype__flags_r$argtypesflagsrestyper$r% CFunctionTypeesr7N) _FUNCFLAG_CDECLpop_FUNCFLAG_USE_ERRNO_FUNCFLAG_USE_LASTERROR ValueErrorkeys_c_functype_cacheKeyError _CFuncPtr)r6r4kwr7r$r3r% CFUNCTYPEKs  rB) LoadLibrary)FUNCFLAG_STDCALLcst|ddrtO|ddr,tO|r@td|ztfWStk rGfdddt}|tf<|YSXdS)Nr)Fr*r+cseZdZZZZdS)z$WINFUNCTYPE..WinFunctionTypeNr,r$r3r$r%WinFunctionType}srE) _FUNCFLAG_STDCALLr9r:r;r<r=_win_functype_cacher?r@)r6r4rArEr$r3r% WINFUNCTYPEqs  rH)dlopen)sizeofbyref addressof alignmentresize) get_errno set_errno) _SimpleCDatacCsJddlm}|dkr|j}t|||}}||krFtd|||fdS)Nrr z"sizeof(%s) wrong: %d instead of %d)structr _type_rJ SystemError)typtypecoder ZactualZrequiredr$r$r% _check_sizes rWcs eZdZdZfddZZS) py_objectOcs4z tWStk r.dt|jYSXdS)Nz %s())super__repr__r<typer-self __class__r$r%r[s zpy_object.__repr__)r-r.r/rSr[ __classcell__r$r$r_r%rXsrXPc@seZdZdZdS)c_shorthNr-r.r/rSr$r$r$r%rcsrcc@seZdZdZdS)c_ushortHNrer$r$r$r%rfsrfc@seZdZdZdS)c_longlNrer$r$r$r%rhsrhc@seZdZdZdS)c_ulongLNrer$r$r$r%rjsrjiric@seZdZdZdS)c_intrlNrer$r$r$r%rmsrmc@seZdZdZdS)c_uintINrer$r$r$r%rnsrnc@seZdZdZdS)c_floatfNrer$r$r$r%rpsrpc@seZdZdZdS)c_doubledNrer$r$r$r%rrsrrc@seZdZdZdS) c_longdoublegNrer$r$r$r%rtsrtqc@seZdZdZdS) c_longlongrvNrer$r$r$r%rwsrwc@seZdZdZdS) c_ulonglongQNrer$r$r$r%rxsrxc@seZdZdZdS)c_ubyteBNrer$r$r$r%rzsrzc@seZdZdZdS)c_bytebNrer$r$r$r%r|sr|c@seZdZdZdS)rcNrer$r$r$r%rsrc@seZdZdZddZdS)c_char_pzcCsd|jjt|jfSNz%s(%s)r`r-c_void_pZ from_bufferrr]r$r$r%r[szc_char_p.__repr__Nr-r.r/rSr[r$r$r$r%rsrc@seZdZdZdS)rrbNrer$r$r$r%rsrc@seZdZdZdS)c_bool?Nrer$r$r$r%rsr)POINTERpointer_pointer_type_cachec@seZdZdZddZdS) c_wchar_pZcCsd|jjt|jfSrrr]r$r$r%r[szc_wchar_p.__repr__Nrr$r$r$r%rsrc@seZdZdZdS)c_wcharuNrer$r$r$r%rsrcCsFtttjdkr"ttjtt _t jtt _t td<dS)Nr ) rclearr>_osnamerGrZ from_paramrrrrrr$r$r$r% _reset_caches   rcCst|trh|dkrBttdkr6tdd|Dd}n t|d}td||t|}|}||_|St|t rtdd|t|}|}|St |dS)zcreate_unicode_buffer(aString) -> character array create_unicode_buffer(anInteger) -> character array create_unicode_buffer(aString, anInteger) -> character array Ncss"|]}t|dkrdndVqdS)irrN)ord).0r~r$r$r% sz(create_unicode_buffer..rzctypes.create_unicode_buffer) rstrrJrsumrrrrrr r!r$r$r%create_unicode_buffers     rcCsLt|ddk rtdt|tkr,td|||t|<tt|=dS)Nz%This type already exists in the cachezWhat's this???)rget RuntimeErroridZset_type)rclsr$r$r%SetPointerType.s  rcCs||Sr'r$)rUrr$r$r%ARRAY8src@sPeZdZdZeZeZdZdZ dZ e ddddfddZ dd Z d d Zd d ZdS)CDLLaAn instance of this class represents a loaded dll/shared library, exporting functions using the standard C calling convention (named 'cdecl' on Windows). The exported functions can be accessed as attributes, or by indexing with the function name. Examples: .qsort -> callable object ['qsort'] -> callable object Calling the functions releases the Python GIL during the call and reacquires it afterwards. zrNFc s|_j|rtO|r$tOtjdrV|rV|drVd|krV|tj tj BO}tj dkr|dk rn|}n6ddl }|j }d|ksd|kr|j_||jO}Gfdd d t}|_|dkrtj|_n|_dS) NZaix)z.a(r r/\cseZdZZjZdS)zCDLL.__init__.._FuncPtrN)r-r.r/r2_func_restype_r1r$r5r^r$r%_FuncPtrosr)_name _func_flags_r:r;rplatform startswithendswithrZ RTLD_MEMBERRTLD_NOWrr Z!_LOAD_LIBRARY_SEARCH_DEFAULT_DIRSZ_getfullpathnameZ!_LOAD_LIBRARY_SEARCH_DLL_LOAD_DIRr@r_dlopen_handle) r^rmodeZhandler)r*Zwinmoder rr$rr%__init__Ss,   z CDLL.__init__cCs8d|jj|j|jtjdd@t|tjdd@fS)Nz<%s '%s', handle %x at %#x>rr)r`r-rrrmaxsizerr]r$r$r%r[ys  z CDLL.__repr__cCs6|dr|drt|||}t||||S)N__)rrAttributeError __getitem__setattr)r^rfuncr$r$r% __getattr__s   zCDLL.__getattr__cCs"|||f}t|ts||_|Sr')rrrr-)r^Zname_or_ordinalrr$r$r%rs zCDLL.__getitem__)r-r.r/__doc__r8rrmrrrr DEFAULT_MODErr[rrr$r$r$r%r>s  &rc@seZdZdZeeBZdS)PyDLLzThis class represents the Python library itself. It allows accessing Python API functions. The GIL is not released, and Python exceptions are handled correctly. N)r-r.r/rr8_FUNCFLAG_PYTHONAPIrr$r$r$r%rsrc@seZdZdZeZdS)WinDLLznThis class represents a dll exporting functions using the Windows stdcall calling convention. N)r-r.r/rrFrr$r$r$r%rsr)_check_HRESULTrQc@seZdZdZeZdS)HRESULTriN)r-r.r/rSrZ_check_retval_r$r$r$r%rs rc@seZdZdZeZeZdS)OleDLLzThis class represents a dll exporting functions using the Windows stdcall calling convention, and returning HRESULT. HRESULT error values are automatically raised as OSError exceptions. N)r-r.r/rrFrrrr$r$r$r%rsrc@s,eZdZddZddZddZddZd S) LibraryLoadercCs ||_dSr'_dlltype)r^Zdlltyper$r$r%rszLibraryLoader.__init__cCs.|ddkrt|||}t||||S)Nr_)rrr)r^rZdllr$r$r%rs    zLibraryLoader.__getattr__cCs t||Sr')getattrr^rr$r$r%rszLibraryLoader.__getitem__cCs ||Sr'rrr$r$r%rCszLibraryLoader.LoadLibraryN)r-r.r/rrrrCr$r$r$r%rsrz python dllcygwinzlibpython%d.%d.dllr)get_last_errorset_last_errorcCs0|dkrt}|dkr"t|}td|d|Sr') GetLastErrorrstripOSError)codeZdescrr$r$r%WinErrors  r) _memmove_addr _memset_addr_string_at_addr _cast_addrcsGfdddt}|S)NcseZdZZZeeBZdS)z!PYFUNCTYPE..CFunctionTypeN)r-r.r/r0r1r8rr2r$r4r6r$r%r7sr7)r@)r6r4r7r$rr% PYFUNCTYPEsrcCs t|||Sr')_cast)objrUr$r$r%castsrcCs t||S)zAstring_at(addr[, size]) -> string Return the string at addr.) _string_atZptrr#r$r$r% string_atsr)_wstring_at_addrcCs t||S)zFwstring_at(addr[, size]) -> string Return the string at addr.) _wstring_atrr$r$r% wstring_at srcCsBztdttdg}Wntk r.YdSX||||SdS)Ncomtypes.server.inprocserver*i) __import__globalslocals ImportErrorDllGetClassObject)ZrclsidZriidZppvccomr$r$r%rs rcCs8ztdttdg}Wntk r.YdSX|S)Nrrr)rrrrDllCanUnloadNow)rr$r$r%rs r)BigEndianStructureLittleEndianStructure)N)N)N)N)NN)r)r)rosrsysrrZ_ctypesrrrrrr@Z_ctypes_versionrr r rRr Z _calcsize Exceptionrrrrrunamereleasesplitrr8rrrr:rr;r&r(r>rBrCrrDrFrGrHreplacerIrJrKrLrMrNrOrPrQrWrXrcrfrhrjrmrnrprrrtrwrxrzZ __ctype_le__Z __ctype_be__r|rrrZc_voidprrrrrrrrrrobjectrrrrrrrZcdllZpydllZ dllhandleZ pythonapi version_infoZwindllZoledllZkernel32rrrrZc_size_tZ c_ssize_trrrrZmemmoveZmemsetrrrrrrrrrrrZctypes._endianrrZc_int8Zc_uint8ZkindZc_int16Zc_int32Zc_int64Zc_uint16Zc_uint32Zc_uint64r$r$r$r%s4          !              N          PK!})__pycache__/wintypes.cpython-38.opt-2.pycnu[U ,a@sddlZejZejZejZejZej Z ej Z ej ZejZejZeZejZGdddejZejZejZejZejZejZZej Z!Z"ej#Z$Z%Z&ej#Z'Z(ej)Z*Z+ej,Z-Z.e/eje/ej,krejZ0ejZ1n$e/eje/ej,krej Z0ejZ1eZ2eZ3eZ4eZ5eZ6eZ7ej,Z8e8Z9e8Z:e8Z;e8Ze8Z?e8Z@e8ZAe8ZBe8ZCe8ZDe8ZEe8ZFe8ZGe8ZHe8ZIe8ZJe8ZKe8ZLe8ZMe8ZNe8ZOe8ZPe8ZQe8ZRe8ZSe8ZTe8ZUe8ZVe8ZWGdddejXZYeYZZZ[Z\GdddejXZ]e]Z^Gdd d ejXZ_Gd d d ejXZ`e`ZaZbZcGd d d ejXZdedZeZfddZgGdddejXZhehZiGdddejXZjejZkdZlGdddejXZmGdddejXZneoeZpZqeoeZreoeZsZteoeZueoe4ZveoeZwZxeoehZyZzeoeZ{eoe8Z|Z}eoeGZ~eoeHZeoeZZeoeZeoe7ZeoeZZeoejZZeoe`ZZeoecZeoeYZZeoe\ZZeoeVZeoeZeoedZZeoefZZeoe^Zeoe ZZeoe"ZeoeZeoeZeoe ZeoemZZeoenZZeoeZZdS)Nc@seZdZdZddZdS) VARIANT_BOOLvcCsd|jj|jfS)Nz%s(%r)) __class____name__value)selfr4/opt/alt/python38/lib64/python3.8/ctypes/wintypes.py__repr__szVARIANT_BOOL.__repr__N)r __module__ __qualname__Z_type_r rrrr rsrc@s(eZdZdefdefdefdefgZdS)RECTlefttoprightZbottomNrr r LONG_fields_rrrr r as r c@s(eZdZdefdefdefdefgZdS) _SMALL_RECTZLeftZTopZRightZBottomNrr r SHORTrrrrr rhs rc@seZdZdefdefgZdS)_COORDXYNrrrrr rosrc@seZdZdefdefgZdS)POINTxyNrrrrr rssrc@seZdZdefdefgZdS)SIZEZcxZcyNrrrrr rxsrcCs||d>|d>S)Nr)ZredZgreenZbluerrr RGB}sr c@seZdZdefdefgZdS)FILETIMEZ dwLowDateTimeZdwHighDateTimeN)rr r DWORDrrrrr r!sr!c@s4eZdZdefdefdefdefdefdefgZ dS)MSGZhWndmessageZwParamZlParamtimeZptN) rr r HWNDUINTWPARAMLPARAMr"rrrrrr r#sr#ic @sTeZdZdefdefdefdefdefdefdefdefd eefd ed fg Zd S) WIN32_FIND_DATAAdwFileAttributesftCreationTimeftLastAccessTimeftLastWriteTime nFileSizeHigh nFileSizeLow dwReserved0 dwReserved1 cFileNamecAlternateFileNameN)rr r r"r!CHARMAX_PATHrrrrr r*s  r*c @sTeZdZdefdefdefdefdefdefdefdefd eefd ed fg Zd S) WIN32_FIND_DATAWr+r,r-r.r/r0r1r2r3r4r5N)rr r r"r!WCHARr7rrrrr r8s  r8)ZctypesZc_byteZBYTEZc_ushortZWORDZc_ulongr"Zc_charr6Zc_wcharr9Zc_uintr'Zc_intZINTZc_doubleZDOUBLEZc_floatZFLOATZBOOLEANZc_longZBOOLZ _SimpleCDatarZULONGrZUSHORTZc_shortrZ c_longlongZ_LARGE_INTEGERZ LARGE_INTEGERZ c_ulonglongZ_ULARGE_INTEGERZULARGE_INTEGERZ c_wchar_pZ LPCOLESTRZLPOLESTRZOLESTRZLPCWSTRZLPWSTRZc_char_pZLPCSTRZLPSTRZc_void_pZLPCVOIDZLPVOIDZsizeofr(r)ZATOMZLANGIDZCOLORREFZLGRPIDZLCTYPEZLCIDZHANDLEZHACCELZHBITMAPZHBRUSHZ HCOLORSPACEZHDCZHDESKZHDWPZ HENHMETAFILEZHFONTZHGDIOBJZHGLOBALZHHOOKZHICONZ HINSTANCEZHKEYZHKLZHLOCALZHMENUZ HMETAFILEZHMODULEZHMONITORZHPALETTEZHPENZHRGNZHRSRCZHSTRZHTASKZHWINSTAr&Z SC_HANDLEZSERVICE_STATUS_HANDLEZ Structurer ZtagRECTZ_RECTLZRECTLrZ SMALL_RECTrrZtagPOINTZ_POINTLZPOINTLrZtagSIZEZSIZELr r!Z _FILETIMEr#ZtagMSGr7r*r8ZPOINTERZLPBOOLZPBOOLZPBOOLEANZLPBYTEZPBYTEZPCHARZ LPCOLORREFZLPDWORDZPDWORDZ LPFILETIMEZ PFILETIMEZPFLOATZLPHANDLEZPHANDLEZPHKEYZLPHKLZLPINTZPINTZPLARGE_INTEGERZPLCIDZLPLONGZPLONGZLPMSGZPMSGZLPPOINTZPPOINTZPPOINTLZLPRECTZPRECTZLPRECTLZPRECTLZ LPSC_HANDLEZPSHORTZLPSIZEZPSIZEZLPSIZELZPSIZELZ PSMALL_RECTZLPUINTZPUINTZPULARGE_INTEGERZPULONGZPUSHORTZPWCHARZLPWIN32_FIND_DATAAZPWIN32_FIND_DATAAZLPWIN32_FIND_DATAWZPWIN32_FIND_DATAWZLPWORDZPWORDrrrr s                        PK!Z(__pycache__/_endian.cpython-38.opt-1.pycnu[U ,a@sddlZddlTeeZddZGdddeeZejdkr\dZ eZ Gd d d eed Z n0ejd krd Z eZ Gdddeed Z ne ddS)N)*cCsLt|trt|tSt|tr.t|j|jSt|t r<|St d|dS)zReturn the type with the 'other' byte order. Simple types like c_int and so on already have __ctype_be__ and __ctype_le__ attributes which contain the types, for more complicated types arrays and structures are supported. z+This type does not support other endian: %sN) hasattr _OTHER_ENDIANgetattr isinstance _array_type _other_endianZ_type_Z_length_ issubclass Structure TypeError)typr 3/opt/alt/python38/lib64/python3.8/ctypes/_endian.pyrs    rcseZdZfddZZS) _swapped_metacs^|dkrLg}|D]6}|d}|d}|dd}||t|f|q|}t||dS)NZ_fields_r)appendrsuper __setattr__)selfattrnamevalueZfieldsZdescnamer rest __class__r rrs z_swapped_meta.__setattr__)__name__ __module__ __qualname__r __classcell__r r rrrsrlittleZ __ctype_be__c@seZdZdZdZdZdS)BigEndianStructurez$Structure with big endian byte orderr Nrrr__doc__ __slots__Z_swappedbytes_r r r rr!.sr!) metaclassZbigZ __ctype_le__c@seZdZdZdZdZdS)LittleEndianStructurez'Structure with little endian byte orderr Nr"r r r rr&7sr&zInvalid byteorder) sysZctypestypeZArrayrrr r byteorderrr&r! RuntimeErrorr r r rs  PK!"p@@#__pycache__/__init__.cpython-38.pycnu[U ,aE@s dZddlZddlZdZddlmZmZm Z ddlm Z ddlm Z ddlmZ ddlmZmZdd lmZdd lmZee kred ee ejd krdd lmZeZejdkrejdkreejdddkreZddlmZmZ m!Z"m#Z$d}ddZ%d~ddZ&iZ'ddZ(ejd kr\ddlm)Z*ddlm+Z,iZ-ddZ.e.jrte(j/dde._nejdkrtddlm0Z*ddlm1Z1m2Z2m3Z3m4Z4m5Z5ddlm6Z6m7Z7dd lm8Z8dd!d"Z9Gd#d$d$e8Z:e9e:d%Gd&d'd'e8Z;e9e;Gd(d)d)e8Ze9e>ed.ed/krLe=Z?e>Z@n0Gd0d1d1e8Z?e9e?Gd2d3d3e8Z@e9e@Gd4d5d5e8ZAe9eAGd6d7d7e8ZBe9eBGd8d9d9e8ZCe1eCe1eBkreBZCed/ed:kre=ZDe>ZEn0Gd;d<dd>e8ZEe9eEGd?d@d@e8ZFeFeF_GeF_He9eFGdAdBdBe8ZIeIeI_GeI_He9eIGdCdDdDe8ZJeJeJ_GeJ_He9eJGdEdFdFe8ZKe9eKd%GdGdHdHe8ZLeLZMe9eLGdIdJdJe8ZNddKlmOZOmPZPmQZQGdLdMdMe8ZRGdNdOdOe8ZSdPdQZTddRdSZUdTdUZVdVdWZWGdXdYdYeXZYGdZd[d[eYZZejd krGd\d]d]eYZ[dd^lm\Z\m8Z8Gd_d`d`e8Z]GdadbdbeYZ^GdcddddeXZ_e_eYZ`e_eZZaejd kreZdedejbZcn,ejdfkreZdgejdddhZcneZdZcejd kr8e_e[Zee_e^ZfeejgjhZhddilmiZimjZjddjdkZke1e@e1eLkrTe@Zle?Zmn6e1e>e1eLkrpe>Zle=Zmne1eEe1eLkreEZleDZmddllmnZnmoZompZpmqZqe(eLeLeLelenZre(eLeLe?eleoZsdmdnZtete:eLe:e:eqZudodpZvete:eLe?epZwddrdsZxzddtlmyZyWnezk r(YnXete:eLe?eyZ{ddudvZ|ejd kr`dwdxZ}dydzZ~dd{lmZmZeIZeFZe;e?e=eDfD]@Ze1edhkreZn&e1ed|kreZne1edkreZqeeEfD]@Ze1edhkreZn&e1ed|kreZne1edkreZq[eTdS)z,create and manipulate C data types in PythonNz1.1.0)Union StructureArray)_Pointer)CFuncPtr) __version__) RTLD_LOCAL RTLD_GLOBAL) ArgumentErrorcalcsizezVersion number mismatchnt) FormatErrorposixdarwin.)FUNCFLAG_CDECLFUNCFLAG_PYTHONAPIFUNCFLAG_USE_ERRNOFUNCFLAG_USE_LASTERRORcCszt|trD|dkrt|d}td||t|}|}||_|St|trntdd|t|}|}|St|dS)zcreate_string_buffer(aBytes) -> character array create_string_buffer(anInteger) -> character array create_string_buffer(aBytes, anInteger) -> character array Nzctypes.create_string_buffer) isinstancebyteslen_sysauditc_charvalueint TypeErrorinitsizeZbuftypeZbufr$4/opt/alt/python38/lib64/python3.8/ctypes/__init__.pycreate_string_buffer/s   r&cCs t||SN)r&)r"r#r$r$r%c_bufferCsr(cst|ddrtO|ddr,tO|r@td|ztfWStk rGfdddt}|tf<|YSXdS)aCFUNCTYPE(restype, *argtypes, use_errno=False, use_last_error=False) -> function prototype. restype: the result type argtypes: a sequence specifying the argument types The function prototype can be called in different ways to create a callable object: prototype(integer address) -> foreign function prototype(callable) -> create and return a C callable function from callable prototype(integer index, method name[, paramflags]) -> foreign function calling a COM method prototype((ordinal number, dll object)[, paramflags]) -> foreign function exported by ordinal prototype((function name, dll object)[, paramflags]) -> foreign function exported by name use_errnoFuse_last_error!unexpected keyword argument(s) %scseZdZZZZdS)z CFUNCTYPE..CFunctionTypeN__name__ __module__ __qualname__ _argtypes_ _restype__flags_r$argtypesflagsrestyper$r% CFunctionTypeesr7N) _FUNCFLAG_CDECLpop_FUNCFLAG_USE_ERRNO_FUNCFLAG_USE_LASTERROR ValueErrorkeys_c_functype_cacheKeyError _CFuncPtr)r6r4kwr7r$r3r% CFUNCTYPEKs  rB) LoadLibrary)FUNCFLAG_STDCALLcst|ddrtO|ddr,tO|r@td|ztfWStk rGfdddt}|tf<|YSXdS)Nr)Fr*r+cseZdZZZZdS)z$WINFUNCTYPE..WinFunctionTypeNr,r$r3r$r%WinFunctionType}srE) _FUNCFLAG_STDCALLr9r:r;r<r=_win_functype_cacher?r@)r6r4rArEr$r3r% WINFUNCTYPEqs  rH)dlopen)sizeofbyref addressof alignmentresize) get_errno set_errno) _SimpleCDatacCsJddlm}|dkr|j}t|||}}||krFtd|||fdS)Nrr z"sizeof(%s) wrong: %d instead of %d)structr _type_rJ SystemError)typtypecoder ZactualZrequiredr$r$r% _check_sizes rWcs eZdZdZfddZZS) py_objectOcs4z tWStk r.dt|jYSXdS)Nz %s())super__repr__r<typer-self __class__r$r%r[s zpy_object.__repr__)r-r.r/rSr[ __classcell__r$r$r_r%rXsrXPc@seZdZdZdS)c_shorthNr-r.r/rSr$r$r$r%rcsrcc@seZdZdZdS)c_ushortHNrer$r$r$r%rfsrfc@seZdZdZdS)c_longlNrer$r$r$r%rhsrhc@seZdZdZdS)c_ulongLNrer$r$r$r%rjsrjiric@seZdZdZdS)c_intrlNrer$r$r$r%rmsrmc@seZdZdZdS)c_uintINrer$r$r$r%rnsrnc@seZdZdZdS)c_floatfNrer$r$r$r%rpsrpc@seZdZdZdS)c_doubledNrer$r$r$r%rrsrrc@seZdZdZdS) c_longdoublegNrer$r$r$r%rtsrtqc@seZdZdZdS) c_longlongrvNrer$r$r$r%rwsrwc@seZdZdZdS) c_ulonglongQNrer$r$r$r%rxsrxc@seZdZdZdS)c_ubyteBNrer$r$r$r%rzsrzc@seZdZdZdS)c_bytebNrer$r$r$r%r|sr|c@seZdZdZdS)rcNrer$r$r$r%rsrc@seZdZdZddZdS)c_char_pzcCsd|jjt|jfSNz%s(%s)r`r-c_void_pZ from_bufferrr]r$r$r%r[szc_char_p.__repr__Nr-r.r/rSr[r$r$r$r%rsrc@seZdZdZdS)rrbNrer$r$r$r%rsrc@seZdZdZdS)c_bool?Nrer$r$r$r%rsr)POINTERpointer_pointer_type_cachec@seZdZdZddZdS) c_wchar_pZcCsd|jjt|jfSrrr]r$r$r%r[szc_wchar_p.__repr__Nrr$r$r$r%rsrc@seZdZdZdS)c_wcharuNrer$r$r$r%rsrcCsFtttjdkr"ttjtt _t jtt _t td<dS)Nr ) rclearr>_osnamerGrZ from_paramrrrrrr$r$r$r% _reset_caches   rcCst|trh|dkrBttdkr6tdd|Dd}n t|d}td||t|}|}||_|St|t rtdd|t|}|}|St |dS)zcreate_unicode_buffer(aString) -> character array create_unicode_buffer(anInteger) -> character array create_unicode_buffer(aString, anInteger) -> character array Ncss"|]}t|dkrdndVqdS)irrN)ord).0r~r$r$r% sz(create_unicode_buffer..rzctypes.create_unicode_buffer) rstrrJrsumrrrrrr r!r$r$r%create_unicode_buffers     rcCsLt|ddk rtdt|tkr,td|||t|<tt|=dS)Nz%This type already exists in the cachezWhat's this???)rget RuntimeErroridZset_type)rclsr$r$r%SetPointerType.s  rcCs||Sr'r$)rUrr$r$r%ARRAY8src@sPeZdZdZeZeZdZdZ dZ e ddddfddZ dd Z d d Zd d ZdS)CDLLaAn instance of this class represents a loaded dll/shared library, exporting functions using the standard C calling convention (named 'cdecl' on Windows). The exported functions can be accessed as attributes, or by indexing with the function name. Examples: .qsort -> callable object ['qsort'] -> callable object Calling the functions releases the Python GIL during the call and reacquires it afterwards. zrNFc s|_j|rtO|r$tOtjdrV|rV|drVd|krV|tj tj BO}tj dkr|dk rn|}n6ddl }|j }d|ksd|kr|j_||jO}Gfdd d t}|_|dkrtj|_n|_dS) NZaix)z.a(r r/\cseZdZZjZdS)zCDLL.__init__.._FuncPtrN)r-r.r/r2_func_restype_r1r$r5r^r$r%_FuncPtrosr)_name _func_flags_r:r;rplatform startswithendswithrZ RTLD_MEMBERRTLD_NOWrr Z!_LOAD_LIBRARY_SEARCH_DEFAULT_DIRSZ_getfullpathnameZ!_LOAD_LIBRARY_SEARCH_DLL_LOAD_DIRr@r_dlopen_handle) r^rmodeZhandler)r*Zwinmoder rr$rr%__init__Ss,   z CDLL.__init__cCs8d|jj|j|jtjdd@t|tjdd@fS)Nz<%s '%s', handle %x at %#x>rr)r`r-rrrmaxsizerr]r$r$r%r[ys  z CDLL.__repr__cCs6|dr|drt|||}t||||S)N__)rrAttributeError __getitem__setattr)r^rfuncr$r$r% __getattr__s   zCDLL.__getattr__cCs"|||f}t|ts||_|Sr')rrrr-)r^Zname_or_ordinalrr$r$r%rs zCDLL.__getitem__)r-r.r/__doc__r8rrmrrrr DEFAULT_MODErr[rrr$r$r$r%r>s  &rc@seZdZdZeeBZdS)PyDLLzThis class represents the Python library itself. It allows accessing Python API functions. The GIL is not released, and Python exceptions are handled correctly. N)r-r.r/rr8_FUNCFLAG_PYTHONAPIrr$r$r$r%rsrc@seZdZdZeZdS)WinDLLznThis class represents a dll exporting functions using the Windows stdcall calling convention. N)r-r.r/rrFrr$r$r$r%rsr)_check_HRESULTrQc@seZdZdZeZdS)HRESULTriN)r-r.r/rSrZ_check_retval_r$r$r$r%rs rc@seZdZdZeZeZdS)OleDLLzThis class represents a dll exporting functions using the Windows stdcall calling convention, and returning HRESULT. HRESULT error values are automatically raised as OSError exceptions. N)r-r.r/rrFrrrr$r$r$r%rsrc@s,eZdZddZddZddZddZd S) LibraryLoadercCs ||_dSr'_dlltype)r^Zdlltyper$r$r%rszLibraryLoader.__init__cCs.|ddkrt|||}t||||S)Nr_)rrr)r^rZdllr$r$r%rs    zLibraryLoader.__getattr__cCs t||Sr')getattrr^rr$r$r%rszLibraryLoader.__getitem__cCs ||Sr'rrr$r$r%rCszLibraryLoader.LoadLibraryN)r-r.r/rrrrCr$r$r$r%rsrz python dllcygwinzlibpython%d.%d.dllr)get_last_errorset_last_errorcCs0|dkrt}|dkr"t|}td|d|Sr') GetLastErrorrstripOSError)codeZdescrr$r$r%WinErrors  r) _memmove_addr _memset_addr_string_at_addr _cast_addrcsGfdddt}|S)NcseZdZZZeeBZdS)z!PYFUNCTYPE..CFunctionTypeN)r-r.r/r0r1r8rr2r$r4r6r$r%r7sr7)r@)r6r4r7r$rr% PYFUNCTYPEsrcCs t|||Sr')_cast)objrUr$r$r%castsrcCs t||S)zAstring_at(addr[, size]) -> string Return the string at addr.) _string_atZptrr#r$r$r% string_atsr)_wstring_at_addrcCs t||S)zFwstring_at(addr[, size]) -> string Return the string at addr.) _wstring_atrr$r$r% wstring_at srcCsBztdttdg}Wntk r.YdSX||||SdS)Ncomtypes.server.inprocserver*i) __import__globalslocals ImportErrorDllGetClassObject)ZrclsidZriidZppvccomr$r$r%rs rcCs8ztdttdg}Wntk r.YdSX|S)Nrrr)rrrrDllCanUnloadNow)rr$r$r%rs r)BigEndianStructureLittleEndianStructure)N)N)N)N)NN)r)r)rosrsysrrZ_ctypesrrrrrr@Z_ctypes_versionrr r rRr Z _calcsize Exceptionrrrrrunamereleasesplitrr8rrrr:rr;r&r(r>rBrCrrDrFrGrHreplacerIrJrKrLrMrNrOrPrQrWrXrcrfrhrjrmrnrprrrtrwrxrzZ __ctype_le__Z __ctype_be__r|rrrZc_voidprrrrrrrrrrobjectrrrrrrrZcdllZpydllZ dllhandleZ pythonapi version_infoZwindllZoledllZkernel32rrrrZc_size_tZ c_ssize_trrrrZmemmoveZmemsetrrrrrrrrrrrZctypes._endianrrZc_int8Zc_uint8ZkindZc_int16Zc_int32Zc_int64Zc_uint16Zc_uint32Zc_uint64r$r$r$r%s4          !              N          PK!rrL__pycache__/util.cpython-38.pycnu[U ,a76@sBddlZddlZddlZddlZejdkrDddZddZddZnejd krnejd krndd l m Z d dZnej d rddl mZnejd kr&ddlZddlZddZddZejdkrddZnddZej drddZddZn8ejdkrddZd'ddZndd Zd!d"Zd#dZd$d%Zed&kr>edS)(NntcCsd}tj|}|dkrdS|t|}tj|ddd\}}t|ddd}|dkrf|d7}t|d d d }|dkrd }|dkr||SdS) zReturn the version of MSVC that was used to build Python. For Python 2.3 and up, the version number is included in sys.version. For earlier versions, assume the compiler is MSVC 6. zMSC v.N  g$@r)sysversionfindlensplitint)prefixisrestZ majorVersionZ minorVersionr0/opt/alt/python38/lib64/python3.8/ctypes/util.py_get_build_version s  rcCs^t}|dkrdS|dkr d}n|dkr6d|d}ndSddl}d|jjkrV|d 7}|d S) z%Return the name of the VC runtime dllNrmsvcrtrzmsvcr%d rz_d.pydd.dll)rimportlib.machinery machineryEXTENSION_SUFFIXES)r Zclibname importlibrrr find_msvcrt"s r cCsx|dkrtStjdtjD]R}tj||}tj|rF|S| drVq |d}tj|r |Sq dS)N)cmPATHr) r osenvironrpathseppathjoinisfilelowerendswith)nameZ directoryZfnamerrr find_library7s   r-posixdarwin) dyld_findc CsPd|d|d||fg}|D],}zt|WStk rHYqYqXqdS)Nz lib%s.dylibz%s.dylibz%s.framework/%s) _dyld_find ValueError)r,possiblerrrr-Hs  aix)r-c Cs4d}t|d}|d|kW5QRSQRXdS)z,Return True if the given file is an ELF filesELFbrN)openread)filenameZ elf_headerZthefilerrr_is_elf`s r:c Cs tdt|}td}|s,td}|s4dSt}z|dd|j d|g}t tj }d|d<d|d <zt j|t jt j|d }Wntk rYW$dSX||j}W5QRXW5z |Wnt k rYnXXt||}|sdS|D]} t| sqt| SdS) N[^\(\)\s]*lib%s\.[^\(\)\s]*ZgccZccz-Wl,-t-oz-lCLC_ALLLANGstdoutstderrenv)r$fsencodereescapeshutilwhichtempfileZNamedTemporaryFilecloseFileNotFoundErrorr,dictr% subprocessPopenPIPEZSTDOUTOSErrorrAr8findallr:fsdecode) r,exprZ c_compilerZtempargsrCprocZtraceresfilerrr _findLib_gccfsB        rXZsunos5c Cs||sdSztjdd|ftjtjd}Wntk r<YdSX||j}W5QRXtd|}|sldSt | dS)Nz/usr/ccs/bin/dumpz-LpvrArBs\[.*\]\sSONAME\s+([^\s]+)r) rMrNrODEVNULLrPrAr8rEsearchr$rRgroup)frUdatarVrrr _get_sonames   r_c Cs|sdStd}|sdSz"tj|ddd|ftjtjd}Wntk rRYdSX||j}W5QRXt d|}|sdSt | dS)Nobjdump-pz-jz.dynamicrYs\sSONAME\s+([^\s]+)r)rGrHrMrNrOrZrPrAr8rEr[r$rRr\)r]r`rUdumprVrrrr_s$   )ZfreebsdZopenbsdZ dragonflycCsN|d}g}z|r*|dt|qWntk r@YnX|pLtjgS)N.r)rinsertrpopr2r maxsize)ZlibnamepartsZnumsrrr _num_versions rhc Cst|}d||f}t|}ztjdtjtjd}Wntk rPd}YnX||j }W5QRXt ||}|st t |S|jtdt|dS)Nz:-l%s\.\S+ => \S*/(lib%s\.\S+))/sbin/ldconfigz-rrY)keyr)rErFr$rDrMrNrOrZrPrAr8rQr_rXsortrhrR)r,ZenamerSrUr^rVrrrr-s"        c CstjdsdSttj}d|d<|r,d}nd}d}ztj|tjtj|d}Wnt k rdYdSX|6|j D](}| }| drrt |d}qrW5QRX|sdS|d D]*}tj|d |}tj|r|SqdS) N /usr/bin/crler=r>)rm-64)rmr@sDefault Library Path (ELF):r6:zlib%s.so)r$r'existsrLr%rMrNrOrZrPrAstrip startswithrRrr() r,is64rCrTpathsrUlinedirZlibfilerrr _findLib_crles8       rwFcCstt||pt|SN)r_rwrX)r,rsrrrr- sc Csddl}|ddkr&tjd}ntjd}dddddd }||d }d }t|t||f}zht j d d gt j t j t j dddd:}t ||j}|rt|dW5QRWSW5QRXWntk rYnXdS)Nrlr6z-32rnz libc6,x86-64z libc6,64bitz libc6,IA-64)z x86_64-64zppc64-64z sparc64-64zs390x-64zia64-64Zlibc6z\s+(lib%s\.[^\s]+)\s+\(%srirar=)r>r?)stdinrBrArCr)structZcalcsizer$unamemachinegetrDrErFrMrNrZrOr[rAr8rRr\rP)r,r{r}Zmach_mapZabi_typeZregexprVrrr_findSoname_ldconfigs4  ,rc Csdt|}ddg}tjd}|rD|dD]}|d|gq0|dtjd|gd}zZtj |tj tj d d }| \}}t |t |} | D]} t| sqt | WSWntk rYnX|S) Nr;Zldz-tZLD_LIBRARY_PATHroz-Lr<z-l%sT)rArBZuniversal_newlines)rErFr$r%r~rextenddevnullrMrNrOZ communicaterQrRr: Exception) r,rScmdZlibpathrresultrout_rVrWrrr _findLib_ld,s,   rcCs t|ptt|ptt|Srx)rr_rXr)r,rrrr-Gs   cCsddlm}tjdkr:t|jt|dttdtjdkrttdttdttdtj d krt| d t| d t| d t| d ntj drddlm }tj dkrtd|dtjtd| dttdt| dn*td|dtjtd| dtdtdtd| tdtdtdtd| tdn(t| dt| dttddS)Nr)cdllrrr.r"r!bz2r/z libm.dylibzlibcrypto.dylibzlibSystem.dylibzSystem.framework/Systemr4)CDLLlz"Using CDLL(name, os.RTLD_MEMBER): z libc.a(shr.o)zUsing cdll.LoadLibrary(): Zrpmz librpm.sozlibc.a(shr_64.o)z crypt :: Zcryptz crypto :: Zcryptozlibm.soz libcrypt.so)Zctypesrr$r,printrloadr-r platformZ LoadLibraryrrrrfZ RTLD_MEMBER)rrrrrtestOs<            r__main__)F)r$rGrMr r,rr r-rZctypes.macholib.dyldr0r1rrZ ctypes._aixrErIr:rXr_rhrwrrr__name__rrrrs>     2     $ ( PK!+11_aix.pynu[""" Lib/ctypes.util.find_library() support for AIX Similar approach as done for Darwin support by using separate files but unlike Darwin - no extension such as ctypes.macholib.* dlopen() is an interface to AIX initAndLoad() - primary documentation at: https://www.ibm.com/support/knowledgecenter/en/ssw_aix_61/com.ibm.aix.basetrf1/dlopen.htm https://www.ibm.com/support/knowledgecenter/en/ssw_aix_61/com.ibm.aix.basetrf1/load.htm AIX supports two styles for dlopen(): svr4 (System V Release 4) which is common on posix platforms, but also a BSD style - aka SVR3. From AIX 5.3 Difference Addendum (December 2004) 2.9 SVR4 linking affinity Nowadays, there are two major object file formats used by the operating systems: XCOFF: The COFF enhanced by IBM and others. The original COFF (Common Object File Format) was the base of SVR3 and BSD 4.2 systems. ELF: Executable and Linking Format that was developed by AT&T and is a base for SVR4 UNIX. While the shared library content is identical on AIX - one is located as a filepath name (svr4 style) and the other is located as a member of an archive (and the archive is located as a filepath name). The key difference arises when supporting multiple abi formats (i.e., 32 and 64 bit). For svr4 either only one ABI is supported, or there are two directories, or there are different file names. The most common solution for multiple ABI is multiple directories. For the XCOFF (aka AIX) style - one directory (one archive file) is sufficient as multiple shared libraries can be in the archive - even sharing the same name. In documentation the archive is also referred to as the "base" and the shared library object is referred to as the "member". For dlopen() on AIX (read initAndLoad()) the calls are similar. Default activity occurs when no path information is provided. When path information is provided dlopen() does not search any other directories. For SVR4 - the shared library name is the name of the file expected: libFOO.so For AIX - the shared library is expressed as base(member). The search is for the base (e.g., libFOO.a) and once the base is found the shared library - identified by member (e.g., libFOO.so, or shr.o) is located and loaded. The mode bit RTLD_MEMBER tells initAndLoad() that it needs to use the AIX (SVR3) naming style. """ __author__ = "Michael Felt " import re from os import environ, path from sys import executable from ctypes import c_void_p, sizeof from subprocess import Popen, PIPE, DEVNULL # Executable bit size - 32 or 64 # Used to filter the search in an archive by size, e.g., -X64 AIX_ABI = sizeof(c_void_p) * 8 from sys import maxsize def _last_version(libnames, sep): def _num_version(libname): # "libxyz.so.MAJOR.MINOR" => [MAJOR, MINOR] parts = libname.split(sep) nums = [] try: while parts: nums.insert(0, int(parts.pop())) except ValueError: pass return nums or [maxsize] return max(reversed(libnames), key=_num_version) def get_ld_header(p): # "nested-function, but placed at module level ld_header = None for line in p.stdout: if line.startswith(('/', './', '../')): ld_header = line elif "INDEX" in line: return ld_header.rstrip('\n') return None def get_ld_header_info(p): # "nested-function, but placed at module level # as an ld_header was found, return known paths, archives and members # these lines start with a digit info = [] for line in p.stdout: if re.match("[0-9]", line): info.append(line) else: # blank line (separator), consume line and end for loop break return info def get_ld_headers(file): """ Parse the header of the loader section of executable and archives This function calls /usr/bin/dump -H as a subprocess and returns a list of (ld_header, ld_header_info) tuples. """ # get_ld_headers parsing: # 1. Find a line that starts with /, ./, or ../ - set as ld_header # 2. If "INDEX" in occurs in a following line - return ld_header # 3. get info (lines starting with [0-9]) ldr_headers = [] p = Popen(["/usr/bin/dump", f"-X{AIX_ABI}", "-H", file], universal_newlines=True, stdout=PIPE, stderr=DEVNULL) # be sure to read to the end-of-file - getting all entries while True: ld_header = get_ld_header(p) if ld_header: ldr_headers.append((ld_header, get_ld_header_info(p))) else: break p.stdout.close() p.wait() return ldr_headers def get_shared(ld_headers): """ extract the shareable objects from ld_headers character "[" is used to strip off the path information. Note: the "[" and "]" characters that are part of dump -H output are not removed here. """ shared = [] for (line, _) in ld_headers: # potential member lines contain "[" # otherwise, no processing needed if "[" in line: # Strip off trailing colon (:) shared.append(line[line.index("["):-1]) return shared def get_one_match(expr, lines): """ Must be only one match, otherwise result is None. When there is a match, strip leading "[" and trailing "]" """ # member names in the ld_headers output are between square brackets expr = rf'\[({expr})\]' matches = list(filter(None, (re.search(expr, line) for line in lines))) if len(matches) == 1: return matches[0].group(1) else: return None # additional processing to deal with AIX legacy names for 64-bit members def get_legacy(members): """ This routine provides historical aka legacy naming schemes started in AIX4 shared library support for library members names. e.g., in /usr/lib/libc.a the member name shr.o for 32-bit binary and shr_64.o for 64-bit binary. """ if AIX_ABI == 64: # AIX 64-bit member is one of shr64.o, shr_64.o, or shr4_64.o expr = r'shr4?_?64\.o' member = get_one_match(expr, members) if member: return member else: # 32-bit legacy names - both shr.o and shr4.o exist. # shr.o is the preffered name so we look for shr.o first # i.e., shr4.o is returned only when shr.o does not exist for name in ['shr.o', 'shr4.o']: member = get_one_match(re.escape(name), members) if member: return member return None def get_version(name, members): """ Sort list of members and return highest numbered version - if it exists. This function is called when an unversioned libFOO.a(libFOO.so) has not been found. Versioning for the member name is expected to follow GNU LIBTOOL conventions: the highest version (x, then X.y, then X.Y.z) * find [libFoo.so.X] * find [libFoo.so.X.Y] * find [libFoo.so.X.Y.Z] Before the GNU convention became the standard scheme regardless of binary size AIX packagers used GNU convention "as-is" for 32-bit archive members but used an "distinguishing" name for 64-bit members. This scheme inserted either 64 or _64 between libFOO and .so - generally libFOO_64.so, but occasionally libFOO64.so """ # the expression ending for versions must start as # '.so.[0-9]', i.e., *.so.[at least one digit] # while multiple, more specific expressions could be specified # to search for .so.X, .so.X.Y and .so.X.Y.Z # after the first required 'dot' digit # any combination of additional 'dot' digits pairs are accepted # anything more than libFOO.so.digits.digits.digits # should be seen as a member name outside normal expectations exprs = [rf'lib{name}\.so\.[0-9]+[0-9.]*', rf'lib{name}_?64\.so\.[0-9]+[0-9.]*'] for expr in exprs: versions = [] for line in members: m = re.search(expr, line) if m: versions.append(m.group(0)) if versions: return _last_version(versions, '.') return None def get_member(name, members): """ Return an archive member matching the request in name. Name is the library name without any prefix like lib, suffix like .so, or version number. Given a list of members find and return the most appropriate result Priority is given to generic libXXX.so, then a versioned libXXX.so.a.b.c and finally, legacy AIX naming scheme. """ # look first for a generic match - prepend lib and append .so expr = rf'lib{name}\.so' member = get_one_match(expr, members) if member: return member elif AIX_ABI == 64: expr = rf'lib{name}64\.so' member = get_one_match(expr, members) if member: return member # since an exact match with .so as suffix was not found # look for a versioned name # If a versioned name is not found, look for AIX legacy member name member = get_version(name, members) if member: return member else: return get_legacy(members) def get_libpaths(): """ On AIX, the buildtime searchpath is stored in the executable. as "loader header information". The command /usr/bin/dump -H extracts this info. Prefix searched libraries with LD_LIBRARY_PATH (preferred), or LIBPATH if defined. These paths are appended to the paths to libraries the python executable is linked with. This mimics AIX dlopen() behavior. """ libpaths = environ.get("LD_LIBRARY_PATH") if libpaths is None: libpaths = environ.get("LIBPATH") if libpaths is None: libpaths = [] else: libpaths = libpaths.split(":") objects = get_ld_headers(executable) for (_, lines) in objects: for line in lines: # the second (optional) argument is PATH if it includes a / path = line.split()[1] if "/" in path: libpaths.extend(path.split(":")) return libpaths def find_shared(paths, name): """ paths is a list of directories to search for an archive. name is the abbreviated name given to find_library(). Process: search "paths" for archive, and if an archive is found return the result of get_member(). If an archive is not found then return None """ for dir in paths: # /lib is a symbolic link to /usr/lib, skip it if dir == "/lib": continue # "lib" is prefixed to emulate compiler name resolution, # e.g., -lc to libc base = f'lib{name}.a' archive = path.join(dir, base) if path.exists(archive): members = get_shared(get_ld_headers(archive)) member = get_member(re.escape(name), members) if member != None: return (base, member) else: return (None, None) return (None, None) def find_library(name): """AIX implementation of ctypes.util.find_library() Find an archive member that will dlopen(). If not available, also search for a file (or link) with a .so suffix. AIX supports two types of schemes that can be used with dlopen(). The so-called SystemV Release4 (svr4) format is commonly suffixed with .so while the (default) AIX scheme has the library (archive) ending with the suffix .a As an archive has multiple members (e.g., 32-bit and 64-bit) in one file the argument passed to dlopen must include both the library and the member names in a single string. find_library() looks first for an archive (.a) with a suitable member. If no archive+member pair is found, look for a .so file. """ libpaths = get_libpaths() (base, member) = find_shared(libpaths, name) if base != None: return f"{base}({member})" # To get here, a member in an archive has not been found # In other words, either: # a) a .a file was not found # b) a .a file did not have a suitable member # So, look for a .so file # Check libpaths for .so file # Note, the installation must prepare a link from a .so # to a versioned file # This is common practice by GNU libtool on other platforms soname = f"lib{name}.so" for dir in libpaths: # /lib is a symbolic link to /usr/lib, skip it if dir == "/lib": continue shlib = path.join(dir, soname) if path.exists(shlib): return soname # if we are here, we have not found anything plausible return None PK!gTT3macholib/__pycache__/framework.cpython-38.opt-1.pycnu[U ,a@s>dZddlZdgZedZddZddZedkr:edS) z% Generic framework path manipulation Nframework_infoz(?x) (?P^.*)(?:^|/) (?P (?P\w+).framework/ (?:Versions/(?P[^/]+)/)? (?P=shortname) (?:_(?P[^_]+))? )$ cCst|}|sdS|S)a} A framework name can take one of the following four forms: Location/Name.framework/Versions/SomeVersion/Name_Suffix Location/Name.framework/Versions/SomeVersion/Name Location/Name.framework/Name_Suffix Location/Name.framework/Name returns None if not found, or a mapping equivalent to: dict( location='Location', name='Name.framework/Versions/SomeVersion/Name_Suffix', shortname='Name', version='SomeVersion', suffix='Suffix', ) Note that SomeVersion and Suffix are optional and may be None if not present N)STRICT_FRAMEWORK_REmatch groupdict)filenameZ is_frameworkr>/opt/alt/python38/lib64/python3.8/ctypes/macholib/framework.pyrs cCsddd}dS)NcSst|||||dS)NlocationnameZ shortnameversionsuffix)dictr rrrd-sztest_framework_info..d)NNNNNr)rrrrtest_framework_info,s r__main__)__doc__re__all__compilerrr__name__rrrrs PK!r{䊣-macholib/__pycache__/framework.cpython-38.pycnu[U ,a@s>dZddlZdgZedZddZddZedkr:edS) z% Generic framework path manipulation Nframework_infoz(?x) (?P^.*)(?:^|/) (?P (?P\w+).framework/ (?:Versions/(?P[^/]+)/)? (?P=shortname) (?:_(?P[^_]+))? )$ cCst|}|sdS|S)a} A framework name can take one of the following four forms: Location/Name.framework/Versions/SomeVersion/Name_Suffix Location/Name.framework/Versions/SomeVersion/Name Location/Name.framework/Name_Suffix Location/Name.framework/Name returns None if not found, or a mapping equivalent to: dict( location='Location', name='Name.framework/Versions/SomeVersion/Name_Suffix', shortname='Name', version='SomeVersion', suffix='Suffix', ) Note that SomeVersion and Suffix are optional and may be None if not present N)STRICT_FRAMEWORK_REmatch groupdict)filenameZ is_frameworkr>/opt/alt/python38/lib64/python3.8/ctypes/macholib/framework.pyrs cCsddd}tddksttddks*ttddks:ttddksJttd|dd d ksbttd |dd d d dks~ttddksttddksttd|ddd dksttd|ddd dd kstdS)NcSst|||||dS)NlocationnameZ shortnameversionsuffix)dictr rrrd-sztest_framework_info..dzcompletely/invalidzcompletely/invalid/_debugz P/F.frameworkzP/F.framework/_debugzP/F.framework/FPz F.framework/FFzP/F.framework/F_debugzF.framework/F_debugdebug)r zP/F.framework/VersionszP/F.framework/Versions/AzP/F.framework/Versions/A/FzF.framework/Versions/A/FAz P/F.framework/Versions/A/F_debugzF.framework/Versions/A/F_debug)NNNNN)rAssertionError)rrrrtest_framework_info,s r__main__)__doc__re__all__compilerrr__name__rrrrs PK!=ff/macholib/__pycache__/dylib.cpython-38.opt-2.pycnu[U ,a$@s:ddlZdgZedZddZddZedkr6edS)N dylib_infoz(?x) (?P^.*)(?:^|/) (?P (?P\w+?) (?:\.(?P[^._]+))? (?:_(?P[^._]+))? \.dylib$ ) cCst|}|sdS|S)N)DYLIB_REmatch groupdict)filenameZis_dylibr:/opt/alt/python38/lib64/python3.8/ctypes/macholib/dylib.pyrs cCsddd}dS)NcSst|||||dS)NlocationnameZ shortnameversionsuffix)dictr rrrd.sztest_dylib_info..d)NNNNNr)rrrrtest_dylib_info-s r__main__)re__all__compilerrr__name__rrrrs  PK!t`2macholib/__pycache__/__init__.cpython-38.opt-2.pycnu[U ,a@sdZdS)z1.0N) __version__rr=/opt/alt/python38/lib64/python3.8/ctypes/macholib/__init__.py PK! @II(macholib/__pycache__/dyld.cpython-38.pycnu[U ,a@s dZddlZddlmZddlmZddlTzddlmZWne k rXddZYnXd d d d gZ ej d dddgZ ej ddddgZddZd.ddZd/ddZd0ddZd1ddZd2dd Zd3d!d"Zd4d#d$Zd5d%d&Zd6d'd(Zd7d)d Zd8d*d Zd+d,Zed-kredS)9z dyld emulation N)framework_info) dylib_info)*) _dyld_shared_cache_contains_pathcGstdS)N)NotImplementedError)argsr9/opt/alt/python38/lib64/python3.8/ctypes/macholib/dyld.pyr sr dyld_findframework_findrrz~/Library/Frameworksz/Library/Frameworksz/Network/Library/Frameworksz/System/Library/Frameworksz~/libz/usr/local/libz/libz/usr/libcCs.|dkrtj}||}|dkr$gS|dS)N:)osenvirongetsplit)envvarZrvalrrr dyld_env$s  rcCs|dkrtj}|dS)NZDYLD_IMAGE_SUFFIX)r rrrrrr dyld_image_suffix,srcCs t|dS)NZDYLD_FRAMEWORK_PATHrrrrr dyld_framework_path1srcCs t|dS)NZDYLD_LIBRARY_PATHrrrrr dyld_library_path4srcCs t|dS)NZDYLD_FALLBACK_FRAMEWORK_PATHrrrrr dyld_fallback_framework_path7srcCs t|dS)NZDYLD_FALLBACK_LIBRARY_PATHrrrrr dyld_fallback_library_path:srcCs(t|}|dkr|S||fdd}|S)z>For a potential path iterator, add DYLD_IMAGE_SUFFIX semanticsNcssF|D]<}|dr0|dtd |dVn ||V|VqdS)Nz.dylib)endswithlen)iteratorsuffixpathrrr _injectBs   z)dyld_image_suffix_search.._inject)r)rrrr rrr dyld_image_suffix_search=s r!ccs\t|}|dk r2t|D]}tj||dVqt|D]}tj|tj|Vq:dSNname)rrr rjoinrbasename)r#r frameworkrrrr dyld_override_searchKs   r'ccs2|dr.|dk r.tj||tddVdS)Nz@executable_path/) startswithr rr$r)r#executable_pathrrr dyld_executable_path_search\sr*ccs|Vt|}|dk rsL                PK!6'::2macholib/__pycache__/__init__.cpython-38.opt-1.pycnu[U ,a@s dZdZdS)z~ Enough Mach-O to make your head spin. See the relevant header files in /usr/include/mach-o And also Apple's documentation. z1.0N)__doc__ __version__rr=/opt/alt/python38/lib64/python3.8/ctypes/macholib/__init__.pysPK!c/macholib/__pycache__/dylib.cpython-38.opt-1.pycnu[U ,a$@s>dZddlZdgZedZddZddZedkr:edS) z! Generic dylib path manipulation N dylib_infoz(?x) (?P^.*)(?:^|/) (?P (?P\w+?) (?:\.(?P[^._]+))? (?:_(?P[^._]+))? \.dylib$ ) cCst|}|sdS|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_REmatch groupdict)filenameZis_dylibr:/opt/alt/python38/lib64/python3.8/ctypes/macholib/dylib.pyrs cCsddd}dS)NcSst|||||dS)NlocationnameZ shortnameversionsuffix)dictr rrrd.sztest_dylib_info..d)NNNNNr)rrrrtest_dylib_info-s r__main__)__doc__re__all__compilerrr__name__rrrrs PK!6'::,macholib/__pycache__/__init__.cpython-38.pycnu[U ,a@s dZdZdS)z~ Enough Mach-O to make your head spin. See the relevant header files in /usr/include/mach-o And also Apple's documentation. z1.0N)__doc__ __version__rr=/opt/alt/python38/lib64/python3.8/ctypes/macholib/__init__.pysPK!I6n3macholib/__pycache__/framework.cpython-38.opt-2.pycnu[U ,a@s:ddlZdgZedZddZddZedkr6edS)Nframework_infoz(?x) (?P^.*)(?:^|/) (?P (?P\w+).framework/ (?:Versions/(?P[^/]+)/)? (?P=shortname) (?:_(?P[^_]+))? )$ cCst|}|sdS|S)N)STRICT_FRAMEWORK_REmatch groupdict)filenameZ is_frameworkr>/opt/alt/python38/lib64/python3.8/ctypes/macholib/framework.pyrs cCsddd}dS)NcSst|||||dS)NlocationnameZ shortnameversionsuffix)dictr rrrd-sztest_framework_info..d)NNNNNr)rrrrtest_framework_info,s r__main__)re__all__compilerrr__name__rrrrs  PK!s.macholib/__pycache__/dyld.cpython-38.opt-1.pycnu[U ,a@s dZddlZddlmZddlmZddlTzddlmZWne k rXddZYnXd d d d gZ ej d dddgZ ej ddddgZddZd.ddZd/ddZd0ddZd1ddZd2dd Zd3d!d"Zd4d#d$Zd5d%d&Zd6d'd(Zd7d)d Zd8d*d Zd+d,Zed-kredS)9z dyld emulation N)framework_info) dylib_info)*) _dyld_shared_cache_contains_pathcGstdSN)NotImplementedError)argsr 9/opt/alt/python38/lib64/python3.8/ctypes/macholib/dyld.pyr sr dyld_findframework_findrrz~/Library/Frameworksz/Library/Frameworksz/Network/Library/Frameworksz/System/Library/Frameworksz~/libz/usr/local/libz/libz/usr/libcCs.|dkrtj}||}|dkr$gS|dS)N:)osenvirongetsplit)envvarZrvalr r r dyld_env$s  rcCs|dkrtj}|dS)NZDYLD_IMAGE_SUFFIX)rrrrr r r dyld_image_suffix,srcCs t|dS)NZDYLD_FRAMEWORK_PATHrrr r r dyld_framework_path1srcCs t|dS)NZDYLD_LIBRARY_PATHrrr r r dyld_library_path4srcCs t|dS)NZDYLD_FALLBACK_FRAMEWORK_PATHrrr r r dyld_fallback_framework_path7srcCs t|dS)NZDYLD_FALLBACK_LIBRARY_PATHrrr r r dyld_fallback_library_path:srcCs(t|}|dkr|S||fdd}|S)z>For a potential path iterator, add DYLD_IMAGE_SUFFIX semanticsNcssF|D]<}|dr0|dtd |dVn ||V|VqdS)Nz.dylib)endswithlen)iteratorsuffixpathr r r _injectBs   z)dyld_image_suffix_search.._inject)r)rrrr!r r r dyld_image_suffix_search=s r"ccs\t|}|dk r2t|D]}tj||dVqt|D]}tj|tj|Vq:dSNname)rrrr joinrbasename)r$r frameworkr r r r dyld_override_searchKs   r(ccs2|dr.|dk r.tj||tddVdS)Nz@executable_path/) startswithrr r%r)r$executable_pathr r r dyld_executable_path_search\sr+ccs|Vt|}|dk rsL                PK!")macholib/__pycache__/dylib.cpython-38.pycnu[U ,a$@s>dZddlZdgZedZddZddZedkr:edS) z! Generic dylib path manipulation N dylib_infoz(?x) (?P^.*)(?:^|/) (?P (?P\w+?) (?:\.(?P[^._]+))? (?:_(?P[^._]+))? \.dylib$ ) cCst|}|sdS|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_REmatch groupdict)filenameZis_dylibr:/opt/alt/python38/lib64/python3.8/ctypes/macholib/dylib.pyrs cCsddd}tddksttddks*ttd|dddksBttd |dd dd d ks^ttd |ddddksxttd|ddddksttd|ddddd kstdS)NcSst|||||dS)NlocationnameZ shortnameversionsuffix)dictr rrrd.sztest_dylib_info..dzcompletely/invalidzcompletely/invalide_debugz P/Foo.dylibPz Foo.dylibZFoozP/Foo_debug.dylibzFoo_debug.dylibdebug)r z P/Foo.A.dylibz Foo.A.dylibAzP/Foo_debug.A.dylibzFoo_debug.A.dylibZ Foo_debugzP/Foo.A_debug.dylibzFoo.A_debug.dylib)NNNNN)rAssertionError)rrrrtest_dylib_info-s r__main__)__doc__re__all__compilerrr__name__rrrrs PK!fII.macholib/__pycache__/dyld.cpython-38.opt-2.pycnu[U ,a@sddlZddlmZddlmZddlTzddlmZWnek rTddZYnXdd d d gZ ej d d ddgZ ej ddddgZ ddZd-ddZd.ddZd/ddZd0ddZd1ddZd2d d!Zd3d"d#Zd4d$d%Zd5d&d'Zd6d(dZd7d)d Zd*d+Zed,kredS)8N)framework_info) dylib_info)*) _dyld_shared_cache_contains_pathcGstdSN)NotImplementedError)argsr 9/opt/alt/python38/lib64/python3.8/ctypes/macholib/dyld.pyr sr dyld_findframework_findrrz~/Library/Frameworksz/Library/Frameworksz/Network/Library/Frameworksz/System/Library/Frameworksz~/libz/usr/local/libz/libz/usr/libcCs.|dkrtj}||}|dkr$gS|dS)N:)osenvirongetsplit)envvarZrvalr r r dyld_env$s  rcCs|dkrtj}|dS)NZDYLD_IMAGE_SUFFIX)rrrrr r r dyld_image_suffix,srcCs t|dS)NZDYLD_FRAMEWORK_PATHrrr r r dyld_framework_path1srcCs t|dS)NZDYLD_LIBRARY_PATHrrr r r dyld_library_path4srcCs t|dS)NZDYLD_FALLBACK_FRAMEWORK_PATHrrr r r dyld_fallback_framework_path7srcCs t|dS)NZDYLD_FALLBACK_LIBRARY_PATHrrr r r dyld_fallback_library_path:srcCs(t|}|dkr|S||fdd}|S)NcssF|D]<}|dr0|dtd |dVn ||V|VqdS)Nz.dylib)endswithlen)iteratorsuffixpathr r r _injectBs   z)dyld_image_suffix_search.._inject)r)rrrr!r r r dyld_image_suffix_search=s r"ccs\t|}|dk r2t|D]}tj||dVqt|D]}tj|tj|Vq:dSNname)rrrr joinrbasename)r$r frameworkr r r r dyld_override_searchKs   r(ccs2|dr.|dk r.tj||tddVdS)Nz@executable_path/) startswithrr r%r)r$executable_pathr r r dyld_executable_path_search\sr+ccs|Vt|}|dk rsJ                PK!~JEE __init__.pynu[PK!Gƻ7 .F_endian.pynu[PK!٨%NN 8N__init__.pycnu[PK!K94""6util.pyonu[PK!FpCC wintypes.pyonu[PK! [#[#util.py.binutils-no-depnu[PK!Vd  _endian.pycnu[PK!٨%NN __init__.pyonu[PK!t7yOmacholib/__init__.pynu[PK! HdPmacholib/framework.pynu[PK!~Ymacholib/dyld.pyonu[PK!il<<omacholib/__init__.pycnu[PK!Y8qmacholib/dylib.pyonu[PK!J((?xmacholib/README.ctypesnu[PK!6z$$ymacholib/dylib.pynu[PK!il<<macholib/__init__.pyonu[PK!JgMmacholib/dyld.pynu[PK!vmacholib/dyld.pycnu[PK!UrA A Rmacholib/framework.pycnu[PK!K CTTٸmacholib/fetch_macholibnuȯPK![D tmacholib/dylib.pycnu[PK!yDSSmacholib/framework.pyonu[PK!Vd  Z_endian.pyonu[PK!l7676util.pynu[PK!  wintypes.pynu[PK!FpCC = wintypes.pycnu[PK!K94""7util.pycnu[PK!kO9)W__pycache__/wintypes.cpython-36.opt-1.pycnu[PK!)Qk__pycache__/wintypes.cpython-36.opt-2.pycnu[PK!.,,(__pycache__/_endian.cpython-36.opt-2.pycnu[PK!=W55%__pycache__/util.cpython-36.opt-1.pycnu[PK!+D"__pycache__/_endian.cpython-36.pycnu[PK!}.>.>)r__pycache__/__init__.cpython-36.opt-1.pycnu[PK!+D(__pycache__/_endian.cpython-36.opt-1.pycnu[PK!exB[DD%__pycache__/util.cpython-36.opt-2.pycnu[PK!}.>.>#i __pycache__/__init__.cpython-36.pycnu[PK!=W55J__pycache__/util.cpython-36.pycnu[PK!'Y5Y5)ng__pycache__/__init__.cpython-36.opt-2.pycnu[PK!kO9# __pycache__/wintypes.cpython-36.pycnu[PK!Η14[[/Umacholib/__pycache__/dylib.cpython-36.opt-2.pycnu[PK!KW3macholib/__pycache__/framework.cpython-36.opt-2.pycnu[PK!;7pp)macholib/__pycache__/dylib.cpython-36.pycnu[PK!d(macholib/__pycache__/dyld.cpython-36.pycnu[PK! 2macholib/__pycache__/__init__.cpython-36.opt-1.pycnu[PK! ,xmacholib/__pycache__/__init__.cpython-36.pycnu[PK!l8611.macholib/__pycache__/dyld.cpython-36.opt-1.pycnu[PK!M2xmacholib/__pycache__/__init__.cpython-36.opt-2.pycnu[PK!.pmacholib/__pycache__/dyld.cpython-36.opt-2.pycnu[PK!lN993macholib/__pycache__/framework.cpython-36.opt-1.pycnu[PK!-Umacholib/__pycache__/framework.cpython-36.pycnu[PK! sO/:macholib/__pycache__/dylib.cpython-36.opt-1.pycnu[PK!'k"L __pycache__/_endian.cpython-35.pycnu[PK!Ifcjj#__pycache__/wintypes.cpython-35.pycnu[PK!4O+FF%n*__pycache__/util.cpython-35.opt-2.pycnu[PK!5Zcc) G__pycache__/wintypes.cpython-35.opt-2.pycnu[PK!(]__pycache__/_endian.cpython-35.opt-2.pycnu[PK!ȵFEE%d__pycache__/util.cpython-35.opt-1.pycnu[PK!C!D!D#e__pycache__/__init__.cpython-35.pycnu[PK!^C4;4;)__pycache__/__init__.cpython-35.opt-2.pycnu[PK!ȵFEEf__pycache__/util.cpython-35.pycnu[PK!'k(__pycache__/_endian.cpython-35.opt-1.pycnu[PK!Ifcjj)e(__pycache__/wintypes.cpython-35.opt-1.pycnu[PK!C!D!D)(?__pycache__/__init__.cpython-35.opt-1.pycnu[PK!3macholib/__pycache__/framework.cpython-35.opt-1.pycnu[PK!,4.macholib/__pycache__/dyld.cpython-35.opt-1.pycnu[PK!ҕ/macholib/__pycache__/dylib.cpython-35.opt-2.pycnu[PK!7ؾ/macholib/__pycache__/dylib.cpython-35.opt-1.pycnu[PK!GM\\(macholib/__pycache__/dyld.cpython-35.pycnu[PK!L3macholib/__pycache__/framework.cpython-35.opt-2.pycnu[PK!WG G -ܽmacholib/__pycache__/framework.cpython-35.pycnu[PK!)HN66,macholib/__pycache__/__init__.cpython-35.pycnu[PK!2macholib/__pycache__/__init__.cpython-35.opt-2.pycnu[PK!!) macholib/__pycache__/dylib.cpython-35.pycnu[PK!)HN662~macholib/__pycache__/__init__.cpython-35.opt-1.pycnu[PK!;88.macholib/__pycache__/dyld.cpython-35.opt-2.pycnu[PK!d qff%__pycache__/util.cpython-38.opt-2.pycnu[PK!Z"g__pycache__/_endian.cpython-38.pycnu[PK!}#Q __pycache__/wintypes.cpython-38.pycnu[PK!l+7+7)__pycache__/__init__.cpython-38.opt-2.pycnu[PK!jCC(&W__pycache__/_endian.cpython-38.opt-2.pycnu[PK!rrL%]__pycache__/util.cpython-38.opt-1.pycnu[PK!})}__pycache__/wintypes.cpython-38.opt-1.pycnu[PK!$)ۃ&&%__pycache__/_aix.cpython-38.opt-1.pycnu[PK!mO̜%Ѹ__pycache__/_aix.cpython-38.opt-2.pycnu[PK!$)ۃ&&__pycache__/_aix.cpython-38.pycnu[PK!"p@@)__pycache__/__init__.cpython-38.opt-1.pycnu[PK!})0__pycache__/wintypes.cpython-38.opt-2.pycnu[PK!Z(GE__pycache__/_endian.cpython-38.opt-1.pycnu[PK!"p@@#7M__pycache__/__init__.cpython-38.pycnu[PK!rrL__pycache__/util.cpython-38.pycnu[PK!+11h_aix.pynu[PK!gTT3macholib/__pycache__/framework.cpython-38.opt-1.pycnu[PK!r{䊣-mmacholib/__pycache__/framework.cpython-38.pycnu[PK!=ff/mmacholib/__pycache__/dylib.cpython-38.opt-2.pycnu[PK!t`22macholib/__pycache__/__init__.cpython-38.opt-2.pycnu[PK! @II(?macholib/__pycache__/dyld.cpython-38.pycnu[PK!6'::2macholib/__pycache__/__init__.cpython-38.opt-1.pycnu[PK!c/|macholib/__pycache__/dylib.cpython-38.opt-1.pycnu[PK!6'::, macholib/__pycache__/__init__.cpython-38.pycnu[PK!I6n3?macholib/__pycache__/framework.cpython-38.opt-2.pycnu[PK!s.>macholib/__pycache__/dyld.cpython-38.opt-1.pycnu[PK!");%macholib/__pycache__/dylib.cpython-38.pycnu[PK!fII.-macholib/__pycache__/dyld.cpython-38.opt-2.pycnu[PKgg'=