uawdijnntqw1x1x1
IP : 216.73.216.110
Hostname : 6.87.74.97.host.secureserver.net
Kernel : Linux 6.87.74.97.host.secureserver.net 4.18.0-553.83.1.el8_10.x86_64 #1 SMP Mon Nov 10 04:22:44 EST 2025 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
home
/
emeraadmin
/
www
/
node_modules
/
liftup
/
..
/
map-cache
/
..
/
..
/
4d695
/
ctypes.zip
/
/
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(��\t7y���macholib/__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(��\}�`�<<macholib/__init__.pycnu�[���� {fc@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<module>sPK(��\}�`�<<macholib/__init__.pyonu�[���� {fc@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<module>sPK(��\�;�kEEmacholib/dyld.pynu�[���""" dyld emulation """ import os from ctypes.macholib.framework import framework_info from ctypes.macholib.dylib import dylib_info from itertools import * __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 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 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(��\ʆ�W��macholib/dyld.pycnu�[���� {fc@sIdZddlZddlmZddlmZddlTdddd gZejj d �ddd gZ ejj d�dddgZd�Zd�Z dd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zddd�Zddd�Zd�Zed krEe�ndS(!s dyld emulation i����N(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|t�r|jd�S|S(sCNot all of PyObjC and Python understand unicode paths very well yettutf8(t isinstancetunicodetencode(ts((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pytensure_utf8s cCsD|dkrtj}n|j|�}|dkr7gS|jd�S(Nt:(tNonetostenvirontgettsplit(tenvtvartrval((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pytdyld_env%scCs%|dkrtj}n|jd�S(NtDYLD_IMAGE_SUFFIX(RR RR(R((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pytdyld_image_suffix-scCs t|d�S(NtDYLD_FRAMEWORK_PATH(R(R((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pytdyld_framework_path2scCs t|d�S(NtDYLD_LIBRARY_PATH(R(R((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pytdyld_library_path5scCs t|d�S(NtDYLD_FALLBACK_FRAMEWORK_PATH(R(R((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pytdyld_fallback_framework_path8scCs t|d�S(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]>}|jd�r7|td� |dVn ||V|VqWdS(Ns.dylib(tendswithtlen(titeratortsuffixtpath((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pyt_injectCs N(RR(R!RR"R$((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pytdyld_image_suffix_search>s ccs�t|�}|dk rJx/t|�D]}tjj||d�Vq%Wnx4t|�D]&}tjj|tjj|��VqWWdS(Ntname(RRRR R#tjoinRtbasename(R&Rt frameworkR#((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pytdyld_override_searchLsccs@|jd�r<|dk r<tjj||td��VndS(Ns@executable_path/(t startswithRR 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||d�Vq0Wnt|�}x.|D]&}tjj|tjj|��VqhW|dk r�|r�x)tD]}tjj||d�Vq�Wn|sx1t D]&}tjj|tjj|��Vq�WndS(NR&( RRRR 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_searchds $ cCs�t|�}t|�}xTttt||�t||�t||��|�D]}tjj|�rO|SqOWt d|f��dS(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.pyRzs cCs�yt|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 .frameworki����N(RR5trfindR R R#R'R((tfnR,Rtet fmwk_index((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pyR�s % cCs:i}td�dkst�td�dks6t�dS(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_find�st__main__(t__doc__R R)RtdylibRt itertoolst__all__R#t expanduserR.R/R RRRRRRRR%R*R-R2RRR;t__name__(((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pyt<module>s< PK(��\d/���macholib/dyld.pyonu�[���� {fc@sIdZddlZddlmZddlmZddlTdddd gZejj d �ddd gZ ejj d�dddgZd�Zd�Z dd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zddd�Zddd�Zd�Zed krEe�ndS(!s dyld emulation i����N(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|t�r|jd�S|S(sCNot all of PyObjC and Python understand unicode paths very well yettutf8(t isinstancetunicodetencode(ts((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pytensure_utf8s cCsD|dkrtj}n|j|�}|dkr7gS|jd�S(Nt:(tNonetostenvirontgettsplit(tenvtvartrval((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pytdyld_env%scCs%|dkrtj}n|jd�S(NtDYLD_IMAGE_SUFFIX(RR RR(R((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pytdyld_image_suffix-scCs t|d�S(NtDYLD_FRAMEWORK_PATH(R(R((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pytdyld_framework_path2scCs t|d�S(NtDYLD_LIBRARY_PATH(R(R((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pytdyld_library_path5scCs t|d�S(NtDYLD_FALLBACK_FRAMEWORK_PATH(R(R((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pytdyld_fallback_framework_path8scCs t|d�S(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]>}|jd�r7|td� |dVn ||V|VqWdS(Ns.dylib(tendswithtlen(titeratortsuffixtpath((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pyt_injectCs N(RR(R!RR"R$((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pytdyld_image_suffix_search>s ccs�t|�}|dk rJx/t|�D]}tjj||d�Vq%Wnx4t|�D]&}tjj|tjj|��VqWWdS(Ntname(RRRR R#tjoinRtbasename(R&Rt frameworkR#((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pytdyld_override_searchLsccs@|jd�r<|dk r<tjj||td��VndS(Ns@executable_path/(t startswithRR 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||d�Vq0Wnt|�}x.|D]&}tjj|tjj|��VqhW|dk r�|r�x)tD]}tjj||d�Vq�Wn|sx1t D]&}tjj|tjj|��Vq�WndS(NR&( RRRR 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_searchds $ cCs�t|�}t|�}xTttt||�t||�t||��|�D]}tjj|�rO|SqOWt d|f��dS(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.pyRzs cCs�yt|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 .frameworki����N(RR5trfindR R R#R'R((tfnR,Rtet fmwk_index((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pyR�s % cCs i}dS(N((R((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pyttest_dyld_find�st__main__(t__doc__R R)RtdylibRt itertoolst__all__R#t expanduserR.R/R RRRRRRRR%R*R-R2RRR:t__name__(((s,/usr/lib64/python2.7/ctypes/macholib/dyld.pyt<module>s< PK(��\6z�$$macholib/dylib.pynu�[���""" Generic dylib path manipulation """ import re __all__ = ['dylib_info'] DYLIB_RE = re.compile(r"""(?x) (?P<location>^.*)(?:^|/) (?P<name> (?P<shortname>\w+?) (?:\.(?P<version>[^._]+))? (?:_(?P<suffix>[^._]+))? \.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(��\� @� macholib/dylib.pycnu�[���� {fc@sVdZddlZdgZejd�Zd�Zd�ZedkrRe�ndS(s! Generic dylib path manipulation i����Nt dylib_infos�(?x) (?P<location>^.*)(?:^|/) (?P<name> (?P<shortname>\w+?) (?:\.(?P<version>[^._]+))? (?:_(?P<suffix>[^._]+))? \.dylib$ ) cCs#tj|�}|sdS|j�S(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�}td�dks0t�td�dksHt�td�|ddd�kslt�td�|dd dd d�ks�t�td�|dd dd�ks�t�td�|dddd�ks�t�td�|ddddd�kst�dS(NcSs%td|d|d|d|d|�S(Ntlocationtnamet shortnametversiontsuffix(tdict(RRR R R((s-/usr/lib64/python2.7/ctypes/macholib/dylib.pytd.sscompletely/invalidscompletely/invalide_debugsP/Foo.dylibtPs Foo.dylibtFoosP/Foo_debug.dylibsFoo_debug.dylibRtdebugs P/Foo.A.dylibsFoo.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_info-s$*''t__main__(t__doc__tret__all__tcompileRRRt__name__(((s-/usr/lib64/python2.7/ctypes/macholib/dylib.pyt<module>s PK(��\������macholib/dylib.pyonu�[���� {fc@sVdZddlZdgZejd�Zd�Zd�ZedkrRe�ndS(s! Generic dylib path manipulation i����Nt dylib_infos�(?x) (?P<location>^.*)(?:^|/) (?P<name> (?P<shortname>\w+?) (?:\.(?P<version>[^._]+))? (?:_(?P<suffix>[^._]+))? \.dylib$ ) cCs#tj|�}|sdS|j�S(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(NcSs%td|d|d|d|d|�S(Ntlocationtnamet shortnametversiontsuffix(tdict(RRR R R((s-/usr/lib64/python2.7/ctypes/macholib/dylib.pytd.s(R(R ((s-/usr/lib64/python2.7/ctypes/macholib/dylib.pyttest_dylib_info-st__main__(t__doc__tret__all__tcompileRRRt__name__(((s-/usr/lib64/python2.7/ctypes/macholib/dylib.pyt<module>s PK(��\K CTTmacholib/fetch_macholibnuȯ��#!/bin/sh svn export --force http://svn.red-bean.com/bob/macholib/trunk/macholib/ . PK(��\� Hd��macholib/framework.pynu�[���""" Generic framework path manipulation """ import re __all__ = ['framework_info'] STRICT_FRAMEWORK_RE = re.compile(r"""(?x) (?P<location>^.*)(?:^|/) (?P<name> (?P<shortname>\w+).framework/ (?:Versions/(?P<version>[^/]+)/)? (?P=shortname) (?:_(?P<suffix>[^_]+))? )$ """) 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(��\�7�|A A macholib/framework.pycnu�[���� {fc@sVdZddlZdgZejd�Zd�Zd�ZedkrRe�ndS(s% Generic framework path manipulation i����Ntframework_infos�(?x) (?P<location>^.*)(?:^|/) (?P<name> (?P<shortname>\w+).framework/ (?:Versions/(?P<version>[^/]+)/)? (?P=shortname) (?:_(?P<suffix>[^_]+))? )$ cCs#tj|�}|sdS|j�S(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(tfilenametis_framework((s1/usr/lib64/python2.7/ctypes/macholib/framework.pyRscCsKdddddd�}td�dks0t�td�dksHt�td�dks`t�td�dksxt�td�|ddd �ks�t�td �|ddd dd �ks�t�td�dks�t�td�dks�t�td�|ddd d�kst�td�|ddd dd �ksGt�dS(NcSs%td|d|d|d|d|�S(Ntlocationtnamet shortnametversiontsuffix(tdict(RRR R R((s1/usr/lib64/python2.7/ctypes/macholib/framework.pytd-sscompletely/invalidscompletely/invalid/_debugs P/F.frameworksP/F.framework/_debugsP/F.framework/FtPs F.framework/FtFsP/F.framework/F_debugsF.framework/F_debugRtdebugsP/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.pyt<module>s PK(��\"�SSmacholib/framework.pyonu�[���� {fc@sVdZddlZdgZejd�Zd�Zd�ZedkrRe�ndS(s% Generic framework path manipulation i����Ntframework_infos�(?x) (?P<location>^.*)(?:^|/) (?P<name> (?P<shortname>\w+).framework/ (?:Versions/(?P<version>[^/]+)/)? (?P=shortname) (?:_(?P<suffix>[^_]+))? )$ cCs#tj|�}|sdS|j�S(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(tfilenametis_framework((s1/usr/lib64/python2.7/ctypes/macholib/framework.pyRscCsdddddd�}dS(NcSs%td|d|d|d|d|�S(Ntlocationtnamet shortnametversiontsuffix(tdict(RRR R R((s1/usr/lib64/python2.7/ctypes/macholib/framework.pytd-s(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.pyt<module>s PK(��\l�q�1@1@__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 buftype = c_char * size buf = buftype() buf.value = init return buf elif isinstance(init, int): 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(<NULL>)" % 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: size = len(init)+1 buftype = c_wchar * size buf = buftype() buf.value = init return buf elif isinstance(init, int): 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: <obj>.qsort -> callable object <obj>['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 = '<uninitialized>' _handle = 0 _FuncPtr = None def __init__(self, name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False): self._name = name flags = self._func_flags_ if use_errno: flags |= _FUNCFLAG_USE_ERRNO if use_last_error: flags |= _FUNCFLAG_USE_LASTERROR 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) if _os.name == "nt": GetLastError = windll.kernel32.GetLastError else: GetLastError = windll.coredll.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(��\�����N�N__init__.pycnu�[���� {fc@sQ dZddlZddlZdZddlmZmZm Z ddlm Z ddlmZddlmZ ddlmZmZdd lmZdd lmZee kr�edee ��nejdukr�ddlmZneZejdkrBejdkrBeej�djd�d�dkrBeZqBnddlmZmZm Z!m"Z#dd�Z%dd�Z&iZ'd�Z(ejdvkrddlm)Z*ddlm+Z,ejd kr�eZ,niZ-d�Z.e.jr*e(jj/dd�e._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@d0e8fd1��YZ?e9e?�d2e8fd3��YZ@e9e@�d4e8fd5��YZAe9eA�d6e8fd7��YZBe9eB�d8e8fd9��YZCe1eC�e1eB�kreBZCned/�ed:�kr,e=ZDe>ZEn@d;e8fd<��YZDe9eD�d=e8fd>��YZEe9eE�d?e8fd@��YZFeFeF_GeF_He9eF�dAe8fdB��YZIeIeI_GeI_He9eI�dCe8fdD��YZJeJeJ_GeJ_He9eJ�dEe8fdF��YZKe9eKd%�dGe8fdH��YZLeLZMe9eL�dIe8fdJ��YZNddKlmOZOmPZPmQZQdL�ZRyddMlmSZSWneTk r�neXejdwkr�eSdNdO�n eSdPdQ�dRe8fdS��YZUdTe8fdU��YZVddV�ZWdW�ZXdX�ZYdYeZfdZ��YZ[d[e[fd\��YZ\ejdxkr�d]e[fd^��YZ]dd_lm^Z^m8Z8d`e8fda��YZ_dbe[fdc��YZ`nddeZfde��YZaeae[�Zbeae\�Zcejdykr e\dfdejd�Zen5ejdgkr2e\dhejfd �Zene\d�Zeejdzkr�eae]�Zgeae`�Zhejdkr�egjijjZjnegjkjjZjddilmlZlmmZmdddj�Znne1e@�e1eL�kr�e@Zoe?ZpnNe1e>�e1eL�kre>Zoe=Zpn'e1eE�e1eL�kr,eEZoeDZpnddklmqZqmrZrmsZsmtZte(eLeLeLeo�eq�Zue(eLeLe?eo�er�Zvdl�Zwewe:eLe:e:�et�Zxdm�Zyewe:eLe?�es�Zzddn�Z{yddolm|Z|WneTk r�n%Xewe:eLe?�e|�Z}ddp�Z~ejd{krE dq�Zdr�Z�nddsl�m�Z�m�Z�eIZ�eFZ�xke;e?e=eDgD]WZ�e1e��dkr� e�Z�qz e1e��dtkr� e�Z�qz e1e��dkrz e�Z�qz qz Wxke<e@e>eEgD]WZ�e1e��dkr e�Z�q� e1e��dtkr$ e�Z�q� e1e��dkr� e�Z�q� q� W[�eR�dS(|s,create and manipulate C data types in Pythoni����Ns1.1.0(tUniont StructuretArray(t_Pointer(tCFuncPtr(t__version__(t RTLD_LOCALtRTLD_GLOBAL(t ArgumentError(tcalcsizesVersion number mismatchtnttce(tFormatErrortposixtdarwinit.ii(tFUNCFLAG_CDECLtFUNCFLAG_PYTHONAPItFUNCFLAG_USE_ERRNOtFUNCFLAG_USE_LASTERRORcCs�t|ttf�rT|dkr4t|�d}nt|}|�}||_|St|ttf�r�t|}|�}|St |��dS(s�create_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_buffer1s cCs t||�S(N(R"(RR((s'/usr/lib64/python2.7/ctypes/__init__.pytc_bufferCscs�t�|jdt�r%�tO�n|jdt�rD�tO�n|rctd|j���nyt���fSWnGtk r�dt f���fd��Y}|t���f<|SXdS(s�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 t use_errnotuse_last_errors!unexpected keyword argument(s) %st CFunctionTypecseZ�Z�Z�ZRS((t__name__t __module__t _argtypes_t _restype_t_flags_((targtypestflagstrestype(s'/usr/lib64/python2.7/ctypes/__init__.pyR&esN( 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 CFUNCTYPEKs "(tLoadLibrary(tFUNCFLAG_STDCALLcs�t�|jdt�r%�tO�n|jdt�rD�tO�n|rctd|j���nyt���fSWnGtk r�dt f���fd��Y}|t���f<|SXdS(NR$R%s!unexpected keyword argument(s) %stWinFunctionTypecseZ�Z�Z�ZRS((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__.pytWINFUNCTYPEts "R:R@(tdlopen(tsizeoftbyreft addressoft alignmenttresize(t get_errnot set_errno(t_SimpleCDatacCsmddlm}|dkr(|j}nt|�||�}}||kritd|||f��ndS(Ni����(R s"sizeof(%s) wrong: %d instead of %d(tstructR Rt_type_RBtSystemError(ttypttypecodeR tactualtrequired((s'/usr/lib64/python2.7/ctypes/__init__.pyt_check_size�st py_objectcBseZdZd�ZRS(tOcCs=ytt|�j�SWntk r8dt|�jSXdS(Ns %s(<NULL>)(tsuperRRt__repr__R4ttypeR'(tself((s'/usr/lib64/python2.7/ctypes/__init__.pyRU�s (R'R(RKRU(((s'/usr/lib64/python2.7/ctypes/__init__.pyRR�stPtc_shortcBseZdZRS(th(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyRY�stc_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__.pyRb�stc_uintcBseZdZRS(tI(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyRc�stc_floatcBseZdZRS(tf(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyRe�stc_doublecBseZdZRS(td(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyRg�stc_longdoublecBseZdZRS(tg(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyRi�stqt c_longlongcBseZdZRS(Rk(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyRl�stc_ulonglongcBseZdZRS(tQ(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyRm�stc_ubytecBseZdZRS(tB(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyRo�stc_bytecBseZdZRS(tb(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyRq�sRcBseZdZRS(tc(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyR�stc_char_pcBs2eZdZejdkr'd�Zn d�ZRS(tzR cCsLtjj|d�s,d|jj|jfSd|jjt|t�jfS(Ni����s%s(%r)s%s(%s)(twindlltkernel32tIsBadStringPtrAt __class__R'Rtcasttc_void_p(RW((s'/usr/lib64/python2.7/ctypes/__init__.pyRU�scCs d|jjt|t�jfS(Ns%s(%s)(RyR'RzR{R(RW((s'/usr/lib64/python2.7/ctypes/__init__.pyRU�s(R'R(RKt_ostnameRU(((s'/usr/lib64/python2.7/ctypes/__init__.pyRt�sR{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_cachecCsbtj�tj�tjdkr0tj�ntjtt �_t jtt�_ttd<dS(NR R(R R(R�tclearR6R|R}R?t c_wchar_pt from_paramR�tc_wcharRtRR{R(((s'/usr/lib64/python2.7/ctypes/__init__.pyt_reset_caches (tset_conversion_modetmbcstignoretasciitstrictR�cBseZdZRS(tZ(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyR�sR�cBseZdZRS(tu(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyR�scCs�t|ttf�rT|dkr4t|�d}nt|}|�}||_|St|ttf�r�t|}|�}|St |��dS(s�create_unicode_buffer(aString) -> character array create_unicode_buffer(anInteger) -> character array create_unicode_buffer(aString, anInteger) -> character array iN( RRRRRR�RRRR(RRR R!((s'/usr/lib64/python2.7/ctypes/__init__.pytcreate_unicode_buffer!s cCsptj|d�dk r'td��nt|�tkrHtd��n|j|�|t|<tt|�=dS(Ns%This type already exists in the cachesWhat's this???(R�tgetRtRuntimeErrortidtset_type(R�tcls((s'/usr/lib64/python2.7/ctypes/__init__.pytSetPointerType4s cCs||S(N((RMR((s'/usr/lib64/python2.7/ctypes/__init__.pytARRAY>stCDLLcBs\eZdZeZeZdZdZdZ edeed�Z d�Zd�Zd�ZRS(s�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: <obj>.qsort -> callable object <obj>['qsort'] -> callable object Calling the functions releases the Python GIL during the call and reacquires it afterwards. s<uninitialized>ics�|�_�j�|r%�tO�n|r8�tO�ndtf��fd��Y}|�_|dkr�t�j|��_n |�_dS(Nt_FuncPtrcseZ�Z�jZRS((R'R(R+t_func_restype_R*((R-RW(s'/usr/lib64/python2.7/ctypes/__init__.pyR�cs( t_namet_func_flags_R2R3R8R�Rt_dlopent_handle(RWR}tmodethandleR$R%R�((R-RWs'/usr/lib64/python2.7/ctypes/__init__.pyt__init__Ys cCsDd|jj|j|jtjdd@t|�tjdd@fS(Ns<%s '%s', handle %x at %x>ii(RyR'R�R�t_systmaxintR�(RW((s'/usr/lib64/python2.7/ctypes/__init__.pyRUmscCsP|jd�r-|jd�r-t|��n|j|�}t|||�|S(Nt__(t startswithtendswithtAttributeErrort__getitem__tsetattr(RWR}tfunc((s'/usr/lib64/python2.7/ctypes/__init__.pyt__getattr__ss cCs:|j||f�}t|ttf�s6||_n|S(N(R�RRRR'(RWtname_or_ordinalR�((s'/usr/lib64/python2.7/ctypes/__init__.pyR�zsN(R'R(t__doc__R/R�RbR�R�R�RR�tDEFAULT_MODER1R�RUR�R�(((s'/usr/lib64/python2.7/ctypes/__init__.pyR�Ds tPyDLLcBseZdZeeBZRS(s�This class represents the Python library itself. It allows accessing Python API functions. The GIL is not released, and Python exceptions are handled correctly. (R'R(R�R/t_FUNCFLAG_PYTHONAPIR�(((s'/usr/lib64/python2.7/ctypes/__init__.pyR��stWinDLLcBseZdZeZRS(snThis class represents a dll exporting functions using the Windows stdcall calling convention. (R'R(R�R>R�(((s'/usr/lib64/python2.7/ctypes/__init__.pyR��s(t_check_HRESULTRItHRESULTcBseZdZeZRS(R^(R'R(RKR�t_check_retval_(((s'/usr/lib64/python2.7/ctypes/__init__.pyR��s tOleDLLcBseZdZeZeZRS(s�This 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(R�R>R�R�R�(((s'/usr/lib64/python2.7/ctypes/__init__.pyR��st LibraryLoadercBs,eZd�Zd�Zd�Zd�ZRS(cCs ||_dS(N(t_dlltype(RWtdlltype((s'/usr/lib64/python2.7/ctypes/__init__.pyR��scCsB|ddkrt|��n|j|�}t|||�|S(Nit_(R�R�R�(RWR}tdll((s'/usr/lib64/python2.7/ctypes/__init__.pyR��s cCs t||�S(N(tgetattr(RWR}((s'/usr/lib64/python2.7/ctypes/__init__.pyR��scCs |j|�S(N(R�(RWR}((s'/usr/lib64/python2.7/ctypes/__init__.pyR;�s(R'R(R�R�R�R;(((s'/usr/lib64/python2.7/ctypes/__init__.pyR��s s python dlltcygwinslibpython%d.%d.dll(tget_last_errortset_last_errorcCsF|dkrt�}n|dkr9t|�j�}nt||�S(N(RtGetLastErrorRtstriptWindowsError(tcodetdescr((s'/usr/lib64/python2.7/ctypes/__init__.pytWinError�s (t _memmove_addrt_memset_addrt_string_at_addrt _cast_addrcs#dtf��fd��Y}|S(NR&cseZ�Z�ZeeBZRS((R'R(R)R*R/R�R+((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 PYFUNCTYPE�scCst|||�S(N(t_cast(tobjRM((s'/usr/lib64/python2.7/ctypes/__init__.pyRz�scCs 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_at�s(t_wstring_at_addrcCs t||�S(sFwstring_at(addr[, size]) -> string Return the string at addr.(t_wstring_at(R�R((s'/usr/lib64/python2.7/ctypes/__init__.pyt wstring_atscCsNy"tdt�t�dg�}Wntk r6dSX|j|||�SdS(Nscomtypes.server.inprocservert*i�(t __import__tglobalstlocalstImportErrortDllGetClassObject(trclsidtriidtppvtccom((s'/usr/lib64/python2.7/ctypes/__init__.pyR� s " cCsAy"tdt�t�dg�}Wntk r6dSX|j�S(Nscomtypes.server.inprocserverR�i(R�R�R�R�tDllCanUnloadNow(R�((s'/usr/lib64/python2.7/ctypes/__init__.pyR�s " (tBigEndianStructuretLittleEndianStructurei(R R(R R(R R(R R(R R(R R(R R(�R�tosR|tsysR�Rt_ctypesRRRRRR8t_ctypes_versionRRRRJR t _calcsizet ExceptionR}RR�tplatformRtunametsplitRR/RR�RR2RR3RR"R#R6R:R;R�R<R>R?R@treplaceRARBRCRDRERFRGRHRIRQRRRYR[R]R_RbRcReRgRiRlRmRot__ctype_le__t__ctype_be__RqRRtR{tc_voidpR~R�R�R�R�R�R�R�R�R�R�R�tobjectR�R�R�R�R�R�R�tcdlltpydllt dllhandlet pythonapitversion_infoRvtoledllRwR�tcoredllR�R�R�tc_size_tt c_ssize_tR�R�R�R�tmemmovetmemsetR�R�RzR�R�R�R�R�R�R�tctypes._endianR�R�tc_int8tc_uint8tkindtc_int16tc_int32tc_int64tc_uint16tc_uint32tc_uint64(((s'/usr/lib64/python2.7/ctypes/__init__.pyt<module>sJ)" ! ( < " PK(��\�����N�N__init__.pyonu�[���� {fc@sQ dZddlZddlZdZddlmZmZm Z ddlm Z ddlmZddlmZ ddlmZmZdd lmZdd lmZee kr�edee ��nejdukr�ddlmZneZejdkrBejdkrBeej�djd�d�dkrBeZqBnddlmZmZm Z!m"Z#dd�Z%dd�Z&iZ'd�Z(ejdvkrddlm)Z*ddlm+Z,ejd kr�eZ,niZ-d�Z.e.jr*e(jj/dd�e._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@d0e8fd1��YZ?e9e?�d2e8fd3��YZ@e9e@�d4e8fd5��YZAe9eA�d6e8fd7��YZBe9eB�d8e8fd9��YZCe1eC�e1eB�kreBZCned/�ed:�kr,e=ZDe>ZEn@d;e8fd<��YZDe9eD�d=e8fd>��YZEe9eE�d?e8fd@��YZFeFeF_GeF_He9eF�dAe8fdB��YZIeIeI_GeI_He9eI�dCe8fdD��YZJeJeJ_GeJ_He9eJ�dEe8fdF��YZKe9eKd%�dGe8fdH��YZLeLZMe9eL�dIe8fdJ��YZNddKlmOZOmPZPmQZQdL�ZRyddMlmSZSWneTk r�neXejdwkr�eSdNdO�n eSdPdQ�dRe8fdS��YZUdTe8fdU��YZVddV�ZWdW�ZXdX�ZYdYeZfdZ��YZ[d[e[fd\��YZ\ejdxkr�d]e[fd^��YZ]dd_lm^Z^m8Z8d`e8fda��YZ_dbe[fdc��YZ`nddeZfde��YZaeae[�Zbeae\�Zcejdykr e\dfdejd�Zen5ejdgkr2e\dhejfd �Zene\d�Zeejdzkr�eae]�Zgeae`�Zhejdkr�egjijjZjnegjkjjZjddilmlZlmmZmdddj�Znne1e@�e1eL�kr�e@Zoe?ZpnNe1e>�e1eL�kre>Zoe=Zpn'e1eE�e1eL�kr,eEZoeDZpnddklmqZqmrZrmsZsmtZte(eLeLeLeo�eq�Zue(eLeLe?eo�er�Zvdl�Zwewe:eLe:e:�et�Zxdm�Zyewe:eLe?�es�Zzddn�Z{yddolm|Z|WneTk r�n%Xewe:eLe?�e|�Z}ddp�Z~ejd{krE dq�Zdr�Z�nddsl�m�Z�m�Z�eIZ�eFZ�xke;e?e=eDgD]WZ�e1e��dkr� e�Z�qz e1e��dtkr� e�Z�qz e1e��dkrz e�Z�qz qz Wxke<e@e>eEgD]WZ�e1e��dkr e�Z�q� e1e��dtkr$ e�Z�q� e1e��dkr� e�Z�q� q� W[�eR�dS(|s,create and manipulate C data types in Pythoni����Ns1.1.0(tUniont StructuretArray(t_Pointer(tCFuncPtr(t__version__(t RTLD_LOCALtRTLD_GLOBAL(t ArgumentError(tcalcsizesVersion number mismatchtnttce(tFormatErrortposixtdarwinit.ii(tFUNCFLAG_CDECLtFUNCFLAG_PYTHONAPItFUNCFLAG_USE_ERRNOtFUNCFLAG_USE_LASTERRORcCs�t|ttf�rT|dkr4t|�d}nt|}|�}||_|St|ttf�r�t|}|�}|St |��dS(s�create_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_buffer1s cCs t||�S(N(R"(RR((s'/usr/lib64/python2.7/ctypes/__init__.pytc_bufferCscs�t�|jdt�r%�tO�n|jdt�rD�tO�n|rctd|j���nyt���fSWnGtk r�dt f���fd��Y}|t���f<|SXdS(s�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 t use_errnotuse_last_errors!unexpected keyword argument(s) %st CFunctionTypecseZ�Z�Z�ZRS((t__name__t __module__t _argtypes_t _restype_t_flags_((targtypestflagstrestype(s'/usr/lib64/python2.7/ctypes/__init__.pyR&esN( 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 CFUNCTYPEKs "(tLoadLibrary(tFUNCFLAG_STDCALLcs�t�|jdt�r%�tO�n|jdt�rD�tO�n|rctd|j���nyt���fSWnGtk r�dt f���fd��Y}|t���f<|SXdS(NR$R%s!unexpected keyword argument(s) %stWinFunctionTypecseZ�Z�Z�ZRS((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__.pytWINFUNCTYPEts "R:R@(tdlopen(tsizeoftbyreft addressoft alignmenttresize(t get_errnot set_errno(t_SimpleCDatacCsmddlm}|dkr(|j}nt|�||�}}||kritd|||f��ndS(Ni����(R s"sizeof(%s) wrong: %d instead of %d(tstructR Rt_type_RBtSystemError(ttypttypecodeR tactualtrequired((s'/usr/lib64/python2.7/ctypes/__init__.pyt_check_size�st py_objectcBseZdZd�ZRS(tOcCs=ytt|�j�SWntk r8dt|�jSXdS(Ns %s(<NULL>)(tsuperRRt__repr__R4ttypeR'(tself((s'/usr/lib64/python2.7/ctypes/__init__.pyRU�s (R'R(RKRU(((s'/usr/lib64/python2.7/ctypes/__init__.pyRR�stPtc_shortcBseZdZRS(th(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyRY�stc_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__.pyRb�stc_uintcBseZdZRS(tI(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyRc�stc_floatcBseZdZRS(tf(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyRe�stc_doublecBseZdZRS(td(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyRg�stc_longdoublecBseZdZRS(tg(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyRi�stqt c_longlongcBseZdZRS(Rk(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyRl�stc_ulonglongcBseZdZRS(tQ(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyRm�stc_ubytecBseZdZRS(tB(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyRo�stc_bytecBseZdZRS(tb(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyRq�sRcBseZdZRS(tc(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyR�stc_char_pcBs2eZdZejdkr'd�Zn d�ZRS(tzR cCsLtjj|d�s,d|jj|jfSd|jjt|t�jfS(Ni����s%s(%r)s%s(%s)(twindlltkernel32tIsBadStringPtrAt __class__R'Rtcasttc_void_p(RW((s'/usr/lib64/python2.7/ctypes/__init__.pyRU�scCs d|jjt|t�jfS(Ns%s(%s)(RyR'RzR{R(RW((s'/usr/lib64/python2.7/ctypes/__init__.pyRU�s(R'R(RKt_ostnameRU(((s'/usr/lib64/python2.7/ctypes/__init__.pyRt�sR{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_cachecCsbtj�tj�tjdkr0tj�ntjtt �_t jtt�_ttd<dS(NR R(R R(R�tclearR6R|R}R?t c_wchar_pt from_paramR�tc_wcharRtRR{R(((s'/usr/lib64/python2.7/ctypes/__init__.pyt_reset_caches (tset_conversion_modetmbcstignoretasciitstrictR�cBseZdZRS(tZ(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyR�sR�cBseZdZRS(tu(R'R(RK(((s'/usr/lib64/python2.7/ctypes/__init__.pyR�scCs�t|ttf�rT|dkr4t|�d}nt|}|�}||_|St|ttf�r�t|}|�}|St |��dS(s�create_unicode_buffer(aString) -> character array create_unicode_buffer(anInteger) -> character array create_unicode_buffer(aString, anInteger) -> character array iN( RRRRRR�RRRR(RRR R!((s'/usr/lib64/python2.7/ctypes/__init__.pytcreate_unicode_buffer!s cCsptj|d�dk r'td��nt|�tkrHtd��n|j|�|t|<tt|�=dS(Ns%This type already exists in the cachesWhat's this???(R�tgetRtRuntimeErrortidtset_type(R�tcls((s'/usr/lib64/python2.7/ctypes/__init__.pytSetPointerType4s cCs||S(N((RMR((s'/usr/lib64/python2.7/ctypes/__init__.pytARRAY>stCDLLcBs\eZdZeZeZdZdZdZ edeed�Z d�Zd�Zd�ZRS(s�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: <obj>.qsort -> callable object <obj>['qsort'] -> callable object Calling the functions releases the Python GIL during the call and reacquires it afterwards. s<uninitialized>ics�|�_�j�|r%�tO�n|r8�tO�ndtf��fd��Y}|�_|dkr�t�j|��_n |�_dS(Nt_FuncPtrcseZ�Z�jZRS((R'R(R+t_func_restype_R*((R-RW(s'/usr/lib64/python2.7/ctypes/__init__.pyR�cs( t_namet_func_flags_R2R3R8R�Rt_dlopent_handle(RWR}tmodethandleR$R%R�((R-RWs'/usr/lib64/python2.7/ctypes/__init__.pyt__init__Ys cCsDd|jj|j|jtjdd@t|�tjdd@fS(Ns<%s '%s', handle %x at %x>ii(RyR'R�R�t_systmaxintR�(RW((s'/usr/lib64/python2.7/ctypes/__init__.pyRUmscCsP|jd�r-|jd�r-t|��n|j|�}t|||�|S(Nt__(t startswithtendswithtAttributeErrort__getitem__tsetattr(RWR}tfunc((s'/usr/lib64/python2.7/ctypes/__init__.pyt__getattr__ss cCs:|j||f�}t|ttf�s6||_n|S(N(R�RRRR'(RWtname_or_ordinalR�((s'/usr/lib64/python2.7/ctypes/__init__.pyR�zsN(R'R(t__doc__R/R�RbR�R�R�RR�tDEFAULT_MODER1R�RUR�R�(((s'/usr/lib64/python2.7/ctypes/__init__.pyR�Ds tPyDLLcBseZdZeeBZRS(s�This class represents the Python library itself. It allows accessing Python API functions. The GIL is not released, and Python exceptions are handled correctly. (R'R(R�R/t_FUNCFLAG_PYTHONAPIR�(((s'/usr/lib64/python2.7/ctypes/__init__.pyR��stWinDLLcBseZdZeZRS(snThis class represents a dll exporting functions using the Windows stdcall calling convention. (R'R(R�R>R�(((s'/usr/lib64/python2.7/ctypes/__init__.pyR��s(t_check_HRESULTRItHRESULTcBseZdZeZRS(R^(R'R(RKR�t_check_retval_(((s'/usr/lib64/python2.7/ctypes/__init__.pyR��s tOleDLLcBseZdZeZeZRS(s�This 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(R�R>R�R�R�(((s'/usr/lib64/python2.7/ctypes/__init__.pyR��st LibraryLoadercBs,eZd�Zd�Zd�Zd�ZRS(cCs ||_dS(N(t_dlltype(RWtdlltype((s'/usr/lib64/python2.7/ctypes/__init__.pyR��scCsB|ddkrt|��n|j|�}t|||�|S(Nit_(R�R�R�(RWR}tdll((s'/usr/lib64/python2.7/ctypes/__init__.pyR��s cCs t||�S(N(tgetattr(RWR}((s'/usr/lib64/python2.7/ctypes/__init__.pyR��scCs |j|�S(N(R�(RWR}((s'/usr/lib64/python2.7/ctypes/__init__.pyR;�s(R'R(R�R�R�R;(((s'/usr/lib64/python2.7/ctypes/__init__.pyR��s s python dlltcygwinslibpython%d.%d.dll(tget_last_errortset_last_errorcCsF|dkrt�}n|dkr9t|�j�}nt||�S(N(RtGetLastErrorRtstriptWindowsError(tcodetdescr((s'/usr/lib64/python2.7/ctypes/__init__.pytWinError�s (t _memmove_addrt_memset_addrt_string_at_addrt _cast_addrcs#dtf��fd��Y}|S(NR&cseZ�Z�ZeeBZRS((R'R(R)R*R/R�R+((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 PYFUNCTYPE�scCst|||�S(N(t_cast(tobjRM((s'/usr/lib64/python2.7/ctypes/__init__.pyRz�scCs 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_at�s(t_wstring_at_addrcCs t||�S(sFwstring_at(addr[, size]) -> string Return the string at addr.(t_wstring_at(R�R((s'/usr/lib64/python2.7/ctypes/__init__.pyt wstring_atscCsNy"tdt�t�dg�}Wntk r6dSX|j|||�SdS(Nscomtypes.server.inprocservert*i�(t __import__tglobalstlocalstImportErrortDllGetClassObject(trclsidtriidtppvtccom((s'/usr/lib64/python2.7/ctypes/__init__.pyR� s " cCsAy"tdt�t�dg�}Wntk r6dSX|j�S(Nscomtypes.server.inprocserverR�i(R�R�R�R�tDllCanUnloadNow(R�((s'/usr/lib64/python2.7/ctypes/__init__.pyR�s " (tBigEndianStructuretLittleEndianStructurei(R R(R R(R R(R R(R R(R R(R R(�R�tosR|tsysR�Rt_ctypesRRRRRR8t_ctypes_versionRRRRJR t _calcsizet ExceptionR}RR�tplatformRtunametsplitRR/RR�RR2RR3RR"R#R6R:R;R�R<R>R?R@treplaceRARBRCRDRERFRGRHRIRQRRRYR[R]R_RbRcReRgRiRlRmRot__ctype_le__t__ctype_be__RqRRtR{tc_voidpR~R�R�R�R�R�R�R�R�R�R�R�tobjectR�R�R�R�R�R�R�tcdlltpydllt dllhandlet pythonapitversion_infoRvtoledllRwR�tcoredllR�R�R�tc_size_tt c_ssize_tR�R�R�R�tmemmovetmemsetR�R�RzR�R�R�R�R�R�R�tctypes._endianR�R�tc_int8tc_uint8tkindtc_int16tc_int32tc_int64tc_uint16tc_uint32tc_uint64(((s'/usr/lib64/python2.7/ctypes/__init__.pyt<module>sJ)" ! ( < " 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(��\�� � _endian.pycnu�[���� {fc@s�ddlZddlTee�Zd�Zdee�fd��YZejdkr{dZ eZ defd ��YZn@ejd kr�dZ eZdefd ��YZ ned��dS(i����N(t*cCsft|t�rt|t�St|t�r?t|j�|jSt|t �rR|St d|��dS(s�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. 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.pyRs t _swapped_metacBseZd�ZRS(cCs�|dkrgg}xI|D]A}|d}|d}|d}|j|t|�f|�qW|}ntt|�j||�dS(Nt_fields_iii(tappendRtsuperR t__setattr__(tselftattrnametvaluetfieldstdesctnameRtrest((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.pyR.stbigt__ctype_le__tLittleEndianStructurecBseZdZeZdZRS(s'Structure with little endian byte orderN(RRRR RR R!(((s&/usr/lib64/python2.7/ctypes/_endian.pyR$7ssInvalid byteorder( tsystctypesttypetArrayRRR R t byteorderRR$RtRuntimeError(((s&/usr/lib64/python2.7/ctypes/_endian.pyt<module>s PK(��\�� � _endian.pyonu�[���� {fc@s�ddlZddlTee�Zd�Zdee�fd��YZejdkr{dZ eZ defd ��YZn@ejd kr�dZ eZdefd ��YZ ned��dS(i����N(t*cCsft|t�rt|t�St|t�r?t|j�|jSt|t �rR|St d|��dS(s�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. 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.pyRs t _swapped_metacBseZd�ZRS(cCs�|dkrgg}xI|D]A}|d}|d}|d}|j|t|�f|�qW|}ntt|�j||�dS(Nt_fields_iii(tappendRtsuperR t__setattr__(tselftattrnametvaluetfieldstdesctnameRtrest((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.pyR.stbigt__ctype_le__tLittleEndianStructurecBseZdZeZdZRS(s'Structure with little endian byte orderN(RRRR RR R!(((s&/usr/lib64/python2.7/ctypes/_endian.pyR$7ssInvalid byteorder( tsystctypesttypetArrayRRR R t byteorderRR$RtRuntimeError(((s&/usr/lib64/python2.7/ctypes/_endian.pyt<module>s PK(��\S+�]�-�-util.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 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 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.search(expr, trace) if not res: return None return os.fsdecode(res.group(0)) 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.search(expr, os.fsdecode(out)) if res: result = res.group(0) except Exception as e: 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 _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")) # 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(��\�wV� ) )util.py.binutils-no-depnu�[���import os 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 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): # 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 = r'[^\(\)\s]*lib%s\.[^\(\)\s]*' % re.escape(name) cmd = 'if type gcc >/dev/null 2>&1; then CC=gcc; elif type cc >/dev/null 2>&1; then CC=cc;else exit; fi;' \ 'LANG=C LC_ALL=C $CC -Wl,-t -o "$2" 2>&1 -l"$1"' temp = tempfile.NamedTemporaryFile() try: proc = subprocess.Popen((cmd, '_findLib_gcc', name, temp.name), shell=True, stdout=subprocess.PIPE) [trace, _] = proc.communicate() finally: try: temp.close() except OSError, e: # ENOENT is raised if the file was already removed, which is # the normal behaviour of GCC if linking fails if e.errno != errno.ENOENT: raise 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 null = open(os.devnull, "wb") try: with null: proc = subprocess.Popen(("/usr/ccs/bin/dump", "-Lpv", f), stdout=subprocess.PIPE, stderr=null) except OSError: # E.g. command not found return None [data, _] = proc.communicate() res = re.search(br'\[.*\]\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; fi;' \ 'objdump -p -j .dynamic 2>/dev/null "$1"' proc = subprocess.Popen((cmd, '_get_soname', f), shell=True, stdout=subprocess.PIPE) [dump, _] = proc.communicate() res = re.search(br'\sSONAME\s+([^\s]+)', dump) 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(b".") 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) null = open(os.devnull, 'wb') try: with null: proc = subprocess.Popen(('/sbin/ldconfig', '-r'), stdout=subprocess.PIPE, stderr=null) except OSError: # E.g. command not found data = b'' else: [data, _] = proc.communicate() res = re.findall(expr, data) if not res: return _get_soname(_findLib_gcc(name)) res.sort(key=_num_version) return 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 null = open(os.devnull, 'wb') try: with null: proc = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=null, env=env) except OSError: # E.g. bad executable return None try: for line in proc.stdout: line = line.strip() if line.startswith(b'Default Library Path (ELF):'): paths = line.split()[4] finally: proc.stdout.close() proc.wait() 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) env = dict(os.environ) env['LC_ALL'] = 'C' env['LANG'] = 'C' null = open(os.devnull, 'wb') try: with null: p = subprocess.Popen(['/sbin/ldconfig', '-p'], stderr=null, stdout=subprocess.PIPE, env=env) except OSError: # E.g. command not found return None [data, _] = p.communicate() 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(��\=�*0g!g!util.pycnu�[���� {fc@s�ddlZddlZddlZejdkrQd�Zd�Zd�Znejdkrld�Znejdkr�ejd kr�dd lm Z d�Zn�ejdkr�ddlZddlZddl Z d�Zejd kr�d�Zn d�Zejjd�s<ejjd�s<ejjd�rQd�Zd�Zq�ejd krxd�Zed�Zq�d�Zd�Znd�Zedkr�e�ndS(i����NtntcCs�d}tjj|�}|dkr(dS|t|�}tj|jdd�\}}t|d �d}t|dd!�d }|dkr�d }n|dkr�||SdS(s�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. sMSC v.i����it ii����iig$@iN(tsystversiontfindtlentsplittinttNone(tprefixtitstresttmajorVersiontminorVersion((s#/usr/lib64/python2.7/ctypes/util.pyt_get_build_versions cCswt�}|dkrdS|dkr.d}nd|d}ddl}|j�dddkro|d 7}n|d S(s%Return the name of the VC runtime dllitmsvcrtsmsvcr%di i����Nis_d.pydtds.dll(RRtimptget_suffixes(RtclibnameR((s#/usr/lib64/python2.7/ctypes/util.pytfind_msvcrts cCs�|dkrt�Sx�tjdjtj�D]l}tjj||�}tjj|�r^|S|j�j d�ryq-n|d}tjj|�r-|Sq-WdS(NtctmtPATHs.dll(RR(RtostenvironRtpathseptpathtjointisfiletlowertendswithR(tnamet directorytfname((s#/usr/lib64/python2.7/ctypes/util.pytfind_library0s tcecCs|S(N((R!((s#/usr/lib64/python2.7/ctypes/util.pyR$Fstposixtdarwin(t dyld_findcCs[d|d|d||fg}x3|D]+}yt|�SWq(tk rRq(q(Xq(WdS(Nslib%s.dylibs%s.dylibs%s.framework/%s(t _dyld_findt ValueErrorR(R!tpossible((s#/usr/lib64/python2.7/ctypes/util.pyR$Ks c Cs�dtj|�}d}tj�}zCtj|d||jfdtdtj�}|j �\}}Wdy|j �Wn+tk r�}|jtj kr��q�nXXtj||�}|s�dS|jd�S(Ns[^\(\)\s]*lib%s\.[^\(\)\s]*s�if type gcc >/dev/null 2>&1; then CC=gcc; elif type cc >/dev/null 2>&1; then CC=cc;else exit; fi;LANG=C LC_ALL=C $CC -Wl,-t -o "$2" 2>&1 -l"$1"t_findLib_gcctshelltstdouti(tretescapettempfiletNamedTemporaryFilet subprocesstPopenR!tTruetPIPEtcommunicatetclosetOSErrorterrnotENOENTtsearchRtgroup( R!texprtcmdttemptprocttracet_tetres((s#/usr/lib64/python2.7/ctypes/util.pyR,Zs"tsunos5c Cs�|s dSttjd�}y8|�,tjdd|fdtjd|�}WdQXWntk rhdSX|j�\}}t j d|�}|s�dS|jd�S(Ntwbs/usr/ccs/bin/dumps-LpvR.tstderrs\[.*\]\sSONAME\s+([^\s]+)i(RtopenRtdevnullR3R4R6R9R7R/R<R=(tftnullRAtdataRCRE((s#/usr/lib64/python2.7/ctypes/util.pyt_get_sonameys cCs�|s dSd}tj|d|fdtdtj�}|j�\}}|jdkrhtjj |�St jd|�}|s�dS|jd�S(Ns[if ! type objdump >/dev/null 2>&1; then exit 10; fi;objdump -p -j .dynamic 2>/dev/null "$1"RNR-R.i s\sSONAME\s+([^\s]+)i( RR3R4R5R6R7t returncodeRRtbasenameR/R<R=(RKR?RAtdumpRCRE((s#/usr/lib64/python2.7/ctypes/util.pyRN�stfreebsdtopenbsdt dragonflycCsf|jd�}g}y-x&|r@|jdt|j���qWWntk rUnX|petjgS(Nt.i(RtinsertRtpopR*Rtmaxint(tlibnametpartstnums((s#/usr/lib64/python2.7/ctypes/util.pyt_num_version�s $ c Cs�tj|�}d||f}ttjd�}y/|�#tjd dtjd|�}WdQXWntk ryd}nX|j �\}}tj ||�}|s�tt|��S|j dt�|d S(Ns:-l%s\.\S+ => \S*/(lib%s\.\S+)RGs/sbin/ldconfigs-rR.RHttkeyi����(s/sbin/ldconfigs-r(R/R0RIRRJR3R4R6R9R7tfindallRNR,tsortR\(R!tenameR>RLRARMRCRE((s#/usr/lib64/python2.7/ctypes/util.pyR$�s c Cs^tjjd�sdSttj�}d|d<|r>d }nd}d}ttjd�}y5|�)tj |dtj d|d|�}WdQXWntk r�dSXzFx?|jD]4}|j �}|jd �r�|j�d }q�q�WWd|jj�|j�X|sdSxF|jd�D]5}tjj|d|�} tjj| �r!| Sq!WdS(Ns /usr/bin/crletCtLC_ALLs-64RGR.RHtenvsDefault Library Path (ELF):it:slib%s.so(s /usr/bin/crles-64(s /usr/bin/crle(RRtexistsRtdictRRIRJR3R4R6R9R.tstript startswithRR8twaitR( R!tis64RdtargstpathsRLRAtlinetdirtlibfile((s#/usr/lib64/python2.7/ctypes/util.pyt _findLib_crle�s> cCstt||�pt|��S(N(RNRqR,(R!Rk((s#/usr/lib64/python2.7/ctypes/util.pyR$�scCs`ddl}|jd�dkr8tj�dd}ntj�dd}idd6dd 6dd 6dd6dd 6}|j|d�}dtj|�|f}ttj�}d|d<d|d<t tj d�}y;|�/tjddgd|dtj d|�}WdQXWntk r$dSX|j�\} } tj|| �}|sSdS|jd�S(Ni����tlis-32s-64slibc6,x86-64s x86_64-64slibc6,64bitsppc64-64s sparc64-64ss390x-64slibc6,IA-64sia64-64tlibc6s\s+(lib%s\.[^\s]+)\s+\(%sRbRctLANGRGs/sbin/ldconfigs-pRHR.Rdi(tstructtcalcsizeRtunametgetR/R0RgRRIRJR3R4R6R9RR7R<R=(R!Rutmachinetmach_maptabi_typeR>RdRLtpRMRCRE((s#/usr/lib64/python2.7/ctypes/util.pyt_findSoname_ldconfig�s: cCst|�ptt|��S(N(R}RNR,(R!((s#/usr/lib64/python2.7/ctypes/util.pyR$scCs�ddlm}tjdkrC|jGH|jd�GHtd�GHntjdkr�td�GHtd�GHtd�GHtjd kr�|j d �GH|j d�GH|j d�GH|j d �GHq�|j d�GH|j d�GHtd�GHndS(Ni����(tcdllRRR&RRtbz2R's libm.dylibslibcrypto.dylibslibSystem.dylibsSystem.framework/Systemslibm.soslibcrypt.sotcrypt( tctypesR~RR!RtloadR$RtplatformtLoadLibrary(R~((s#/usr/lib64/python2.7/ctypes/util.pyttests"t__main__(RR3RR!RRR$R�tctypes.macholib.dyldR(R)R/R1R:R,RNRiR\RqtFalseR}R�t__name__(((s#/usr/lib64/python2.7/ctypes/util.pyt<module>s< $ ) $ PK(��\=�*0g!g!util.pyonu�[���� {fc@s�ddlZddlZddlZejdkrQd�Zd�Zd�Znejdkrld�Znejdkr�ejd kr�dd lm Z d�Zn�ejdkr�ddlZddlZddl Z d�Zejd kr�d�Zn d�Zejjd�s<ejjd�s<ejjd�rQd�Zd�Zq�ejd krxd�Zed�Zq�d�Zd�Znd�Zedkr�e�ndS(i����NtntcCs�d}tjj|�}|dkr(dS|t|�}tj|jdd�\}}t|d �d}t|dd!�d }|dkr�d }n|dkr�||SdS(s�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. sMSC v.i����it ii����iig$@iN(tsystversiontfindtlentsplittinttNone(tprefixtitstresttmajorVersiontminorVersion((s#/usr/lib64/python2.7/ctypes/util.pyt_get_build_versions cCswt�}|dkrdS|dkr.d}nd|d}ddl}|j�dddkro|d 7}n|d S(s%Return the name of the VC runtime dllitmsvcrtsmsvcr%di i����Nis_d.pydtds.dll(RRtimptget_suffixes(RtclibnameR((s#/usr/lib64/python2.7/ctypes/util.pytfind_msvcrts cCs�|dkrt�Sx�tjdjtj�D]l}tjj||�}tjj|�r^|S|j�j d�ryq-n|d}tjj|�r-|Sq-WdS(NtctmtPATHs.dll(RR(RtostenvironRtpathseptpathtjointisfiletlowertendswithR(tnamet directorytfname((s#/usr/lib64/python2.7/ctypes/util.pytfind_library0s tcecCs|S(N((R!((s#/usr/lib64/python2.7/ctypes/util.pyR$Fstposixtdarwin(t dyld_findcCs[d|d|d||fg}x3|D]+}yt|�SWq(tk rRq(q(Xq(WdS(Nslib%s.dylibs%s.dylibs%s.framework/%s(t _dyld_findt ValueErrorR(R!tpossible((s#/usr/lib64/python2.7/ctypes/util.pyR$Ks c Cs�dtj|�}d}tj�}zCtj|d||jfdtdtj�}|j �\}}Wdy|j �Wn+tk r�}|jtj kr��q�nXXtj||�}|s�dS|jd�S(Ns[^\(\)\s]*lib%s\.[^\(\)\s]*s�if type gcc >/dev/null 2>&1; then CC=gcc; elif type cc >/dev/null 2>&1; then CC=cc;else exit; fi;LANG=C LC_ALL=C $CC -Wl,-t -o "$2" 2>&1 -l"$1"t_findLib_gcctshelltstdouti(tretescapettempfiletNamedTemporaryFilet subprocesstPopenR!tTruetPIPEtcommunicatetclosetOSErrorterrnotENOENTtsearchRtgroup( R!texprtcmdttemptprocttracet_tetres((s#/usr/lib64/python2.7/ctypes/util.pyR,Zs"tsunos5c Cs�|s dSttjd�}y8|�,tjdd|fdtjd|�}WdQXWntk rhdSX|j�\}}t j d|�}|s�dS|jd�S(Ntwbs/usr/ccs/bin/dumps-LpvR.tstderrs\[.*\]\sSONAME\s+([^\s]+)i(RtopenRtdevnullR3R4R6R9R7R/R<R=(tftnullRAtdataRCRE((s#/usr/lib64/python2.7/ctypes/util.pyt_get_sonameys cCs�|s dSd}tj|d|fdtdtj�}|j�\}}|jdkrhtjj |�St jd|�}|s�dS|jd�S(Ns[if ! type objdump >/dev/null 2>&1; then exit 10; fi;objdump -p -j .dynamic 2>/dev/null "$1"RNR-R.i s\sSONAME\s+([^\s]+)i( RR3R4R5R6R7t returncodeRRtbasenameR/R<R=(RKR?RAtdumpRCRE((s#/usr/lib64/python2.7/ctypes/util.pyRN�stfreebsdtopenbsdt dragonflycCsf|jd�}g}y-x&|r@|jdt|j���qWWntk rUnX|petjgS(Nt.i(RtinsertRtpopR*Rtmaxint(tlibnametpartstnums((s#/usr/lib64/python2.7/ctypes/util.pyt_num_version�s $ c Cs�tj|�}d||f}ttjd�}y/|�#tjd dtjd|�}WdQXWntk ryd}nX|j �\}}tj ||�}|s�tt|��S|j dt�|d S(Ns:-l%s\.\S+ => \S*/(lib%s\.\S+)RGs/sbin/ldconfigs-rR.RHttkeyi����(s/sbin/ldconfigs-r(R/R0RIRRJR3R4R6R9R7tfindallRNR,tsortR\(R!tenameR>RLRARMRCRE((s#/usr/lib64/python2.7/ctypes/util.pyR$�s c Cs^tjjd�sdSttj�}d|d<|r>d }nd}d}ttjd�}y5|�)tj |dtj d|d|�}WdQXWntk r�dSXzFx?|jD]4}|j �}|jd �r�|j�d }q�q�WWd|jj�|j�X|sdSxF|jd�D]5}tjj|d|�} tjj| �r!| Sq!WdS(Ns /usr/bin/crletCtLC_ALLs-64RGR.RHtenvsDefault Library Path (ELF):it:slib%s.so(s /usr/bin/crles-64(s /usr/bin/crle(RRtexistsRtdictRRIRJR3R4R6R9R.tstript startswithRR8twaitR( R!tis64RdtargstpathsRLRAtlinetdirtlibfile((s#/usr/lib64/python2.7/ctypes/util.pyt _findLib_crle�s> cCstt||�pt|��S(N(RNRqR,(R!Rk((s#/usr/lib64/python2.7/ctypes/util.pyR$�scCs`ddl}|jd�dkr8tj�dd}ntj�dd}idd6dd 6dd 6dd6dd 6}|j|d�}dtj|�|f}ttj�}d|d<d|d<t tj d�}y;|�/tjddgd|dtj d|�}WdQXWntk r$dSX|j�\} } tj|| �}|sSdS|jd�S(Ni����tlis-32s-64slibc6,x86-64s x86_64-64slibc6,64bitsppc64-64s sparc64-64ss390x-64slibc6,IA-64sia64-64tlibc6s\s+(lib%s\.[^\s]+)\s+\(%sRbRctLANGRGs/sbin/ldconfigs-pRHR.Rdi(tstructtcalcsizeRtunametgetR/R0RgRRIRJR3R4R6R9RR7R<R=(R!Rutmachinetmach_maptabi_typeR>RdRLtpRMRCRE((s#/usr/lib64/python2.7/ctypes/util.pyt_findSoname_ldconfig�s: cCst|�ptt|��S(N(R}RNR,(R!((s#/usr/lib64/python2.7/ctypes/util.pyR$scCs�ddlm}tjdkrC|jGH|jd�GHtd�GHntjdkr�td�GHtd�GHtd�GHtjd kr�|j d �GH|j d�GH|j d�GH|j d �GHq�|j d�GH|j d�GHtd�GHndS(Ni����(tcdllRRR&RRtbz2R's libm.dylibslibcrypto.dylibslibSystem.dylibsSystem.framework/Systemslibm.soslibcrypt.sotcrypt( tctypesR~RR!RtloadR$RtplatformtLoadLibrary(R~((s#/usr/lib64/python2.7/ctypes/util.pyttests"t__main__(RR3RR!RRR$R�tctypes.macholib.dyldR(R)R/R1R:R,RNRiR\RqtFalseR}R�t__name__(((s#/usr/lib64/python2.7/ctypes/util.pyt<module>s< $ ) $ 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(��\H�CCwintypes.pycnu�[���� {fcZ@sddlTeZeZeZeZe Z eZe ZeZeZeZddlmZdefd��YZeZeZeZeZeZZeZZ e!Z"Z#Z$e!Z%Z&e'Z(Z)e*Z+Z,e-e�e-e*�kr�eZ.eZ/n'e-e�e-e*�kreZ.eZ/neZ0eZ1eZ2eZ3eZ4eZ5e*Z6e6Z7e6Z8e6Z9e6Z:e6Z;e6Z<e6Z=e6Z>e6Z?e6Z@e6ZAe6ZBe6ZCe6ZDe6ZEe6ZFe6ZGe6ZHe6ZIe6ZJe6ZKe6ZLe6ZMe6ZNe6ZOe6ZPe6ZQe6ZRe6ZSe6ZTe6ZUdeVfd��YZWeWZXZYZZdeVfd��YZ[e[Z\d eVfd ��YZ]deVfd��YZ^e^Z_Z`Zad eVfd��YZbebZcZdd�ZedeVfd��YZfefZgdeVfd��YZhehZidZjdeVfd��YZkdeVfd��YZlddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOddPddQddRdSdTdUdVd dWdXdYdZd[d\dd]ddd^d_d d`dadbdcddddedfdgdhgZZmdiS(ji����(t*(t_SimpleCDatatVARIANT_BOOLcBseZdZd�ZRS(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`s t_SMALL_RECTcBs2eZdefdefdefdefgZRS(tLefttToptRighttBottom(RR tc_shortR(((s'/usr/lib64/python2.7/ctypes/wintypes.pyRgs t_COORDcBs eZdefdefgZRS(tXtY(RR RR(((s'/usr/lib64/python2.7/ctypes/wintypes.pyRns tPOINTcBs eZdefdefgZRS(txty(RR RR(((s'/usr/lib64/python2.7/ctypes/wintypes.pyRrs tSIZEcBs eZdefdefgZRS(tcxtcy(RR RR(((s'/usr/lib64/python2.7/ctypes/wintypes.pyRws cCs||d>|d>S(Nii((tredtgreentblue((s'/usr/lib64/python2.7/ctypes/wintypes.pytRGB|stFILETIMEcBs 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_DATAAcBspeZdefdefdefdefdefdefdefdefdeefd ed fg ZRS(tdwFileAttributestftCreationTimetftLastAccessTimetftLastWriteTimet nFileSizeHightnFileSizeLowtdwReserved0tdwReserved1t cFileNametcAlternateFileNamei(RR R(R%tc_chartMAX_PATHR(((s'/usr/lib64/python2.7/ctypes/wintypes.pyR4�s tWIN32_FIND_DATAWcBspeZdefdefdefdefdefdefdefdefdeefd ed fg ZRS(R5R6R7R8R9R:R;R<R=R>i(RR R(R%tc_wcharR@R(((s'/usr/lib64/python2.7/ctypes/wintypes.pyRA�s tATOMtBOOLtBOOLEANtBYTEtCOLORREFtDOUBLER(tFLOATtHACCELtHANDLEtHBITMAPtHBRUSHtHCOLORSPACEtHDCtHDESKtHDWPtHENHMETAFILEtHFONTtHGDIOBJtHGLOBALtHHOOKtHICONt HINSTANCEtHKEYtHKLtHLOCALtHMENUt HMETAFILEtHMODULEtHMONITORtHPALETTEtHPENtHRGNtHRSRCtHSTRtHTASKtHWINSTAR0tINTtLANGIDt LARGE_INTEGERtLCIDtLCTYPEtLGRPIDtLONGR3t LPCOLESTRtLPCSTRtLPCVOIDtLPCWSTRtLPOLESTRtLPSTRtLPVOIDtLPWSTRR@tOLESTRtPOINTLtRECTLR$t SC_HANDLEtSERVICE_STATUS_HANDLEtSHORTtSIZELt SMALL_RECTtUINTtULARGE_INTEGERtULONGtUSHORTtWCHARtWORDR2t _FILETIMEt_LARGE_INTEGERt_POINTLt_RECTLt_ULARGE_INTEGERttagMSGttagPOINTttagRECTttagSIZEN(ntctypestc_byteRFtc_ushortR�tc_ulongR(RBR�R1R~tc_intRgtc_doubleRHtc_floatRIRERRDRRR�RmR�RR{t c_longlongR�Ritc_ulonglongR�Rt c_wchar_pRnRrRvRqRutc_char_pRoRstc_void_pRpRttsizeofR2R3RCRhRGRlRkRjRKRJRLRMRNRORPRQRRRSRTRURVRWRXRYRZR[R\R]R^R_R`RaRbRcRdReRfR0RyRzt StructureRR�R�RxRR}RRR�R�RwRR�R|R$R%R�R)R�R@R4RAt__all__(((s'/usr/lib64/python2.7/ctypes/wintypes.pyt<module>s� PK(��\H�CCwintypes.pyonu�[���� {fcZ@sddlTeZeZeZeZe Z eZe ZeZeZeZddlmZdefd��YZeZeZeZeZeZZeZZ e!Z"Z#Z$e!Z%Z&e'Z(Z)e*Z+Z,e-e�e-e*�kr�eZ.eZ/n'e-e�e-e*�kreZ.eZ/neZ0eZ1eZ2eZ3eZ4eZ5e*Z6e6Z7e6Z8e6Z9e6Z:e6Z;e6Z<e6Z=e6Z>e6Z?e6Z@e6ZAe6ZBe6ZCe6ZDe6ZEe6ZFe6ZGe6ZHe6ZIe6ZJe6ZKe6ZLe6ZMe6ZNe6ZOe6ZPe6ZQe6ZRe6ZSe6ZTe6ZUdeVfd��YZWeWZXZYZZdeVfd��YZ[e[Z\d eVfd ��YZ]deVfd��YZ^e^Z_Z`Zad eVfd��YZbebZcZdd�ZedeVfd��YZfefZgdeVfd��YZhehZidZjdeVfd��YZkdeVfd��YZlddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOddPddQddRdSdTdUdVd dWdXdYdZd[d\dd]ddd^d_d d`dadbdcddddedfdgdhgZZmdiS(ji����(t*(t_SimpleCDatatVARIANT_BOOLcBseZdZd�ZRS(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`s t_SMALL_RECTcBs2eZdefdefdefdefgZRS(tLefttToptRighttBottom(RR tc_shortR(((s'/usr/lib64/python2.7/ctypes/wintypes.pyRgs t_COORDcBs eZdefdefgZRS(tXtY(RR RR(((s'/usr/lib64/python2.7/ctypes/wintypes.pyRns tPOINTcBs eZdefdefgZRS(txty(RR RR(((s'/usr/lib64/python2.7/ctypes/wintypes.pyRrs tSIZEcBs eZdefdefgZRS(tcxtcy(RR RR(((s'/usr/lib64/python2.7/ctypes/wintypes.pyRws cCs||d>|d>S(Nii((tredtgreentblue((s'/usr/lib64/python2.7/ctypes/wintypes.pytRGB|stFILETIMEcBs 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_DATAAcBspeZdefdefdefdefdefdefdefdefdeefd ed fg ZRS(tdwFileAttributestftCreationTimetftLastAccessTimetftLastWriteTimet nFileSizeHightnFileSizeLowtdwReserved0tdwReserved1t cFileNametcAlternateFileNamei(RR R(R%tc_chartMAX_PATHR(((s'/usr/lib64/python2.7/ctypes/wintypes.pyR4�s tWIN32_FIND_DATAWcBspeZdefdefdefdefdefdefdefdefdeefd ed fg ZRS(R5R6R7R8R9R:R;R<R=R>i(RR R(R%tc_wcharR@R(((s'/usr/lib64/python2.7/ctypes/wintypes.pyRA�s tATOMtBOOLtBOOLEANtBYTEtCOLORREFtDOUBLER(tFLOATtHACCELtHANDLEtHBITMAPtHBRUSHtHCOLORSPACEtHDCtHDESKtHDWPtHENHMETAFILEtHFONTtHGDIOBJtHGLOBALtHHOOKtHICONt HINSTANCEtHKEYtHKLtHLOCALtHMENUt HMETAFILEtHMODULEtHMONITORtHPALETTEtHPENtHRGNtHRSRCtHSTRtHTASKtHWINSTAR0tINTtLANGIDt LARGE_INTEGERtLCIDtLCTYPEtLGRPIDtLONGR3t LPCOLESTRtLPCSTRtLPCVOIDtLPCWSTRtLPOLESTRtLPSTRtLPVOIDtLPWSTRR@tOLESTRtPOINTLtRECTLR$t SC_HANDLEtSERVICE_STATUS_HANDLEtSHORTtSIZELt SMALL_RECTtUINTtULARGE_INTEGERtULONGtUSHORTtWCHARtWORDR2t _FILETIMEt_LARGE_INTEGERt_POINTLt_RECTLt_ULARGE_INTEGERttagMSGttagPOINTttagRECTttagSIZEN(ntctypestc_byteRFtc_ushortR�tc_ulongR(RBR�R1R~tc_intRgtc_doubleRHtc_floatRIRERRDRRR�RmR�RR{t c_longlongR�Ritc_ulonglongR�Rt c_wchar_pRnRrRvRqRutc_char_pRoRstc_void_pRpRttsizeofR2R3RCRhRGRlRkRjRKRJRLRMRNRORPRQRRRSRTRURVRWRXRYRZR[R\R]R^R_R`RaRbRcRdReRfR0RyRzt StructureRR�R�RxRR}RRR�R�RwRR�R|R$R%R�R)R�R@R4RAt__all__(((s'/usr/lib64/python2.7/ctypes/wintypes.pyt<module>s� PKW}�\�-V�5>5>)__pycache__/__init__.cpython-36.opt-1.pycnu�[���3 ���i1@�@s>dZddlZddlZdZddlmZmZm Z ddlm Z ddlmZddlmZ ddlmZmZdd lmZdd lmZee kr�edee ��ejdkr�dd lmZeZejdkr�ejdkr�eej�jjd�d�dkr�eZddlmZmZ m!Z"m#Z$d}dd�Z%d~dd�Z&iZ'dd�Z(ejdk�r\ddlm)Z*ddlm+Z,iZ-dd�Z.e.j�rte(jj/dd�e._nejdk�rtddlm0Z*ddlm1Z1m2Z2m3Z3m4Z4m5Z5ddlm6Z6m7Z7dd lm8Z8dd!d"�Z9Gd#d$�d$e8�Z:e9e:d%�Gd&d'�d'e8�Z;e9e;�Gd(d)�d)e8�Z<e9e<�Gd*d+�d+e8�Z=e9e=�Gd,d-�d-e8�Z>e9e>�ed.�ed/�k�rLe=Z?e>Z@n0Gd0d1�d1e8�Z?e9e?�Gd2d3�d3e8�Z@e9e@�Gd4d5�d5e8�ZAe9eA�Gd6d7�d7e8�ZBe9eB�Gd8d9�d9e8�ZCe1eC�e1eB�k�r�eBZCed/�ed:�k�r�e=ZDe>ZEn0Gd;d<�d<e8�ZDe9eD�Gd=d>�d>e8�ZEe9eE�Gd?d@�d@e8�ZFeFeF_GeF_He9eF�GdAdB�dBe8�ZIeIeI_GeI_He9eI�GdCdD�dDe8�ZJeJeJ_GeJ_He9eJ�GdEdF�dFe8�ZKe9eKd%�GdGdH�dHe8�ZLeLZMe9eL�GdIdJ�dJe8�ZNddKlmOZOmPZPmQZQGdLdM�dMe8�ZRGdNdO�dOe8�ZSdPdQ�ZTd�dRdS�ZUdTdU�ZVdVdW�ZWGdXdY�dYeX�ZYGdZd[�d[eY�ZZejdk�r�Gd\d]�d]eY�Z[dd^lm\Z\m8Z8Gd_d`�d`e8�Z]Gdadb�dbeY�Z^Gdcdd�ddeX�Z_e_eY�Z`e_eZ�Zaejdk�r�eZdedejb�Zcn,ejdfk�r�eZdgejdddh��ZcneZd�Zcejdk�rNe_e[�Zee_e^�Zfejdk�r,eejgjhZhneejijhZhddilmjZjmkZkd�djdk�Zle1e@�e1eL�k�rje@Zme?Znn6e1e>�e1eL�k�r�e>Zme=Znne1eE�e1eL�k�r�eEZmeDZnddllmoZompZpmqZqmrZre(eLeLeLem�eo�Zse(eLeLe?em�ep�Ztdmdn�Zueue:eLe:e:�er�Zvdodp�Zweue:eLe?�eq�Zxd�drds�ZyyddtlmzZzWne{k �r>YnXeue:eLe?�ez�Z|d�dudv�Z}ejdk�rvdwdx�Z~dydz�Zdd{l�m�Z�m�Z�eIZ�eFZ�xPe;e?e=eDgD]@Z�e1e��dhk�r�e�Z�n&e1e��d|k�r�e�Z�ne1e��dk�r�e�Z��q�WxPe<e@e>eEgD]@Z�e1e��dhk�re�Z�n&e1e��d|k�re�Z�ne1e��dk�r�e�Z��q�W[�eT�dS)�z,create and manipulate C data types in Python�Nz1.1.0)�Union� Structure�Array)�_Pointer)�CFuncPtr)�__version__)� RTLD_LOCAL�RTLD_GLOBAL)� ArgumentError)�calcsizezVersion number mismatch�nt)�FormatError�posix�darwin�.�)�FUNCFLAG_CDECL�FUNCFLAG_PYTHONAPI�FUNCFLAG_USE_ERRNO�FUNCFLAG_USE_LASTERRORcCs^t|t�r6|dkrt|�d}t|}|�}||_|St|t�rRt|}|�}|St|��dS)z�create_string_buffer(aBytes) -> character array create_string_buffer(anInteger) -> character array create_string_buffer(aBytes, anInteger) -> character array N�)� isinstance�bytes�len�c_char�value�int� TypeError)�init�size�buftype�buf�r"�'/usr/lib64/python3.6/ctypes/__init__.py�create_string_buffer/s r$cCs t||�S)N)r$)rrr"r"r#�c_bufferAsr%cs�t�|jdd�r�tO�|jdd�r,�tO�|r@td|j���yt���fStk r�G���fdd�dt�}|t���f<|SXdS)a�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 � use_errnoF�use_last_errorz!unexpected keyword argument(s) %scseZdZ�Z�Z�ZdS)z CFUNCTYPE.<locals>.CFunctionTypeN)�__name__� __module__�__qualname__� _argtypes_� _restype_�_flags_r")�argtypes�flags�restyper"r#� CFunctionTypecsr1N) �_FUNCFLAG_CDECL�pop�_FUNCFLAG_USE_ERRNO�_FUNCFLAG_USE_LASTERROR� ValueError�keys�_c_functype_cache�KeyError� _CFuncPtr)r0r.�kwr1r")r.r/r0r#� CFUNCTYPEIsr<)�LoadLibrary)�FUNCFLAG_STDCALLcs�t�|jdd�r�tO�|jdd�r,�tO�|r@td|j���yt���fStk r�G���fdd�dt�}|t���f<|SXdS)Nr&Fr'z!unexpected keyword argument(s) %scseZdZ�Z�Z�ZdS)z$WINFUNCTYPE.<locals>.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#�WINFUNCTYPEosrB)�dlopen)�sizeof�byref� addressof� alignment�resize)� get_errno� set_errno)�_SimpleCDatacCsJddlm}|dkr|j}t|�||�}}||krFtd|||f��dS)Nr)rz"sizeof(%s) wrong: %d instead of %d)�structr�_type_rD�SystemError)�typ�typecoderZactualZrequiredr"r"r#�_check_size�srQcs eZdZdZ�fdd�Z�ZS)� py_object�Ocs.y t�j�Stk r(dt|�jSXdS)Nz %s(<NULL>))�super�__repr__r6�typer()�self)� __class__r"r#rU�s zpy_object.__repr__)r(r)r*rMrU� __classcell__r"r")rXr#rR�srR�Pc@seZdZdZdS)�c_short�hN)r(r)r*rMr"r"r"r#r[�sr[c@seZdZdZdS)�c_ushort�HN)r(r)r*rMr"r"r"r#r]�sr]c@seZdZdZdS)�c_long�lN)r(r)r*rMr"r"r"r#r_�sr_c@seZdZdZdS)�c_ulong�LN)r(r)r*rMr"r"r"r#ra�sra�ir`c@seZdZdZdS)�c_intrcN)r(r)r*rMr"r"r"r#rd�srdc@seZdZdZdS)�c_uint�IN)r(r)r*rMr"r"r"r#re�srec@seZdZdZdS)�c_float�fN)r(r)r*rMr"r"r"r#rg�srgc@seZdZdZdS)�c_double�dN)r(r)r*rMr"r"r"r#ri�sric@seZdZdZdS)�c_longdouble�gN)r(r)r*rMr"r"r"r#rk�srk�qc@seZdZdZdS)� c_longlongrmN)r(r)r*rMr"r"r"r#rn�srnc@seZdZdZdS)�c_ulonglong�QN)r(r)r*rMr"r"r"r#ro�sroc@seZdZdZdS)�c_ubyte�BN)r(r)r*rMr"r"r"r#rq�srqc@seZdZdZdS)�c_byte�bN)r(r)r*rMr"r"r"r#rs�srsc@seZdZdZdS)r�cN)r(r)r*rMr"r"r"r#r�src@seZdZdZdd�ZdS)�c_char_p�zcCsd|jjtj|�jfS)Nz%s(%s))rXr(�c_void_p�from_bufferr)rWr"r"r#rU�szc_char_p.__repr__N)r(r)r*rMrUr"r"r"r#rv�srvc@seZdZdZdS)rxrZN)r(r)r*rMr"r"r"r#rx�srxc@seZdZdZdS)�c_bool�?N)r(r)r*rMr"r"r"r#rz�srz)�POINTER�pointer�_pointer_type_cachec@seZdZdZdd�ZdS)� c_wchar_p�ZcCsd|jjtj|�jfS)Nz%s(%s))rXr(rxryr)rWr"r"r#rU�szc_wchar_p.__repr__N)r(r)r*rMrUr"r"r"r#r�src@seZdZdZdS)�c_wchar�uN)r(r)r*rMr"r"r"r#r�sr�cCsFtj�tj�tjdkr"tj�tjtt �_t jtt�_ttd<dS)Nr) r~�clearr8�_os�namerArZ from_paramr|r�rvrrxr"r"r"r#�_reset_caches r�cCs^t|t�r6|dkrt|�d}t|}|�}||_|St|t�rRt|}|�}|St|��dS)z�create_unicode_buffer(aString) -> character array create_unicode_buffer(anInteger) -> character array create_unicode_buffer(aString, anInteger) -> character array Nr)r�strrr�rrr)rrr r!r"r"r#�create_unicode_buffers r�cCsLtj|d�dk rtd��t|�tkr,td��|j|�|t|<tt|�=dS)Nz%This type already exists in the cachezWhat's this???)r~�get�RuntimeError�idZset_type)r}�clsr"r"r#�SetPointerType"s r�cCs||S)Nr")rOrr"r"r#�ARRAY,sr�c@sNeZdZdZeZeZdZdZ dZ edddfdd�Zdd �Z d d�Zdd �ZdS)�CDLLa�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: <obj>.qsort -> callable object <obj>['qsort'] -> callable object Calling the functions releases the Python GIL during the call and reacquires it afterwards. z<uninitialized>rNFcsb|�_�j�|r�tO�|r$�tO�G��fdd�dt�}|�_|dkrXt�j|��_n|�_dS)NcseZdZ�Z�jZdS)zCDLL.__init__.<locals>._FuncPtrN)r(r)r*r-�_func_restype_r,r")r/rWr"r#�_FuncPtrQsr�)�_name�_func_flags_r4r5r:r��_dlopen�_handle)rWr��modeZhandler&r'r�r")r/rWr#�__init__Gsz CDLL.__init__cCs8d|jj|j|jtjdd@t|�tjdd@fS)Nz<%s '%s', handle %x at %#x>�r)rXr(r�r��_sys�maxsizer�)rWr"r"r#rU[s z CDLL.__repr__cCs6|jd�r|jd�rt|��|j|�}t|||�|S)N�__)� startswith�endswith�AttributeError�__getitem__�setattr)rWr��funcr"r"r#�__getattr__as zCDLL.__getattr__cCs"|j||f�}t|t�s||_|S)N)r�rrr()rWZname_or_ordinalr�r"r"r#r�hs zCDLL.__getitem__)r(r)r*�__doc__r2r�rdr�r�r�r��DEFAULT_MODEr�rUr�r�r"r"r"r#r�2s r�c@seZdZdZeeBZdS)�PyDLLz�This 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*r�r2�_FUNCFLAG_PYTHONAPIr�r"r"r"r#r�nsr�c@seZdZdZeZdS)�WinDLLznThis class represents a dll exporting functions using the Windows stdcall calling convention. N)r(r)r*r�r@r�r"r"r"r#r�wsr�)�_check_HRESULTrKc@seZdZdZeZdS)�HRESULTr`N)r(r)r*rMr�Z_check_retval_r"r"r"r#r��s r�c@seZdZdZeZeZdS)�OleDLLz�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. N)r(r)r*r�r@r�r�r�r"r"r"r#r��sr�c@s,eZdZdd�Zdd�Zdd�Zdd�Zd S) � LibraryLoadercCs ||_dS)N)�_dlltype)rWZdlltyper"r"r#r��szLibraryLoader.__init__cCs.|ddkrt|��|j|�}t|||�|S)Nr�_)r�r�r�)rWr�Zdllr"r"r#r��s zLibraryLoader.__getattr__cCs t||�S)N)�getattr)rWr�r"r"r#r��szLibraryLoader.__getitem__cCs |j|�S)N)r�)rWr�r"r"r#r=�szLibraryLoader.LoadLibraryN)r(r)r*r�r�r�r=r"r"r"r#r��sr�z python dll�cygwinzlibpython%d.%d.dllr�)�get_last_error�set_last_errorcCs0|dkrt�}|dkr"t|�j�}td|d|�S)N)�GetLastErrorr �strip�OSError)�codeZdescrr"r"r#�WinError�s r�)� _memmove_addr�_memset_addr�_string_at_addr� _cast_addrcsG��fdd�dt�}|S)NcseZdZ�Z�ZeeBZdS)z!PYFUNCTYPE.<locals>.CFunctionTypeN)r(r)r*r+r,r2r�r-r")r.r0r"r#r1�sr1)r:)r0r.r1r")r.r0r#� PYFUNCTYPE�sr�cCst|||�S)N)�_cast)�objrOr"r"r#�cast�sr�rcCs t||�S)zAstring_at(addr[, size]) -> string Return the string at addr.)� _string_at)�ptrrr"r"r#� string_at�sr�)�_wstring_at_addrcCs t||�S)zFwstring_at(addr[, size]) -> string Return the string at addr.)�_wstring_at)r�rr"r"r#� wstring_at�sr�cCs@ytdt�t�dg�}Wntk r,dSX|j|||�SdS)Nzcomtypes.server.inprocserver�*i�i�)� __import__�globals�locals�ImportError�DllGetClassObject)ZrclsidZriidZppv�ccomr"r"r#r��s r�cCs6ytdt�t�dg�}Wntk r,dSX|j�S)Nzcomtypes.server.inprocserverr�r)r�r�r�r��DllCanUnloadNow)r�r"r"r#r��s r�)�BigEndianStructure�LittleEndianStructure�)N)N)N)N)NN���)r�r�)r�)�r��osr��sysr�rZ_ctypesrrrrrr:Z_ctypes_versionrr r rLrZ _calcsize� Exceptionr�r r��platformr�uname�release�splitrr2rr�rr4rr5r$r%r8r<r=r�r>r@rArB�replacerCrDrErFrGrHrIrJrKrQrRr[r]r_rardrergrirkrnrorqZ__ctype_le__Z__ctype_be__rsrrvrxZc_voidprzr|r}r~rr�r�r�r�r��objectr�r�r�r�r�r�r�ZcdllZpydllZ dllhandleZ pythonapi�version_infoZwindllZoledllZkernel32r�Zcoredllr�r�r�Zc_size_tZ c_ssize_tr�r�r�r�ZmemmoveZmemsetr�r�r�r�r�r�r�r�r�r�r�Zctypes._endianr�r�Zc_int8Zc_uint8ZkindZc_int16Zc_int32Zc_int64Zc_uint16Zc_uint32Zc_uint64r"r"r"r#�<module>s8 ! < PKW}�\D��Y5Y5)__pycache__/__init__.cpython-36.opt-2.pycnu�[���3 ���i1@�@s:ddlZddlZdZddlmZmZmZddlm Z ddlm ZddlmZddlm Z mZddlmZdd lmZeekr�ed ee��ejdkr�ddlmZe Zejd kr�ejdkr�eej�jjd�d�dkr�eZddlmZmZm Z!m"Z#d|dd�Z$d}dd�Z%iZ&dd�Z'ejdk�rXddlm(Z)ddlm*Z+iZ,dd�Z-e-j.�rpe'j.j/dd�e-_.nejd k�rpddlm0Z)ddlm1Z1m2Z2m3Z3m4Z4m5Z5ddlm6Z6m7Z7ddlm8Z8d~d d!�Z9Gd"d#�d#e8�Z:e9e:d$�Gd%d&�d&e8�Z;e9e;�Gd'd(�d(e8�Z<e9e<�Gd)d*�d*e8�Z=e9e=�Gd+d,�d,e8�Z>e9e>�ed-�ed.�k�rHe=Z?e>Z@n0Gd/d0�d0e8�Z?e9e?�Gd1d2�d2e8�Z@e9e@�Gd3d4�d4e8�ZAe9eA�Gd5d6�d6e8�ZBe9eB�Gd7d8�d8e8�ZCe1eC�e1eB�k�r�eBZCed.�ed9�k�r�e=ZDe>ZEn0Gd:d;�d;e8�ZDe9eD�Gd<d=�d=e8�ZEe9eE�Gd>d?�d?e8�ZFeFeF_GeF_He9eF�Gd@dA�dAe8�ZIeIeI_GeI_He9eI�GdBdC�dCe8�ZJeJeJ_GeJ_He9eJ�GdDdE�dEe8�ZKe9eKd$�GdFdG�dGe8�ZLeLZMe9eL�GdHdI�dIe8�ZNddJlmOZOmPZPmQZQGdKdL�dLe8�ZRGdMdN�dNe8�ZSdOdP�ZTddQdR�ZUdSdT�ZVdUdV�ZWGdWdX�dXeX�ZYGdYdZ�dZeY�ZZejdk�r�Gd[d\�d\eY�Z[dd]lm\Z\m8Z8Gd^d_�d_e8�Z]Gd`da�daeY�Z^Gdbdc�dceX�Z_e_eY�Z`e_eZ�Zaejdk�r�eZdddejb�Zcn,ejdek�r�eZdfejdddg��ZcneZd�Zcejdk�rJe_e[�Zee_e^�Zfejdk�r(eejgjhZhneejijhZhddhlmjZjmkZkd�didj�Zle1e@�e1eL�k�rfe@Zme?Znn6e1e>�e1eL�k�r�e>Zme=Znne1eE�e1eL�k�r�eEZmeDZnddklmoZompZpmqZqmrZre'eLeLeLem�eo�Zse'eLeLe?em�ep�Ztdldm�Zueue:eLe:e:�er�Zvdndo�Zweue:eLe?�eq�Zxd�dqdr�ZyyddslmzZzWne{k �r:YnXeue:eLe?�ez�Z|d�dtdu�Z}ejdk�rrdvdw�Z~dxdy�Zddzl�m�Z�m�Z�eIZ�eFZ�xPe;e?e=eDgD]@Z�e1e��dgk�r�e�Z�n&e1e��d{k�r�e�Z�ne1e��dk�r�e�Z��q�WxPe<e@e>eEgD]@Z�e1e��dgk�re�Z�n&e1e��d{k�re�Z�ne1e��dk�r�e�Z��q�W[�eT�dS)��Nz1.1.0)�Union� Structure�Array)�_Pointer)�CFuncPtr)�__version__)� RTLD_LOCAL�RTLD_GLOBAL)� ArgumentError)�calcsizezVersion number mismatch�nt)�FormatError�posix�darwin�.�)�FUNCFLAG_CDECL�FUNCFLAG_PYTHONAPI�FUNCFLAG_USE_ERRNO�FUNCFLAG_USE_LASTERRORcCs^t|t�r6|dkrt|�d}t|}|�}||_|St|t�rRt|}|�}|St|��dS)N�)� isinstance�bytes�len�c_char�value�int� TypeError)�init�size�buftype�buf�r"�'/usr/lib64/python3.6/ctypes/__init__.py�create_string_buffer/s r$cCs t||�S)N)r$)rrr"r"r#�c_bufferAsr%cs�t�|jdd�r�tO�|jdd�r,�tO�|r@td|j���yt���fStk r�G���fdd�dt�}|t���f<|SXdS)N� use_errnoF�use_last_errorz!unexpected keyword argument(s) %scseZdZ�Z�Z�ZdS)z CFUNCTYPE.<locals>.CFunctionTypeN)�__name__� __module__�__qualname__� _argtypes_� _restype_�_flags_r")�argtypes�flags�restyper"r#� CFunctionTypecsr1) �_FUNCFLAG_CDECL�pop�_FUNCFLAG_USE_ERRNO�_FUNCFLAG_USE_LASTERROR� ValueError�keys�_c_functype_cache�KeyError� _CFuncPtr)r0r.�kwr1r")r.r/r0r#� CFUNCTYPEIsr<)�LoadLibrary)�FUNCFLAG_STDCALLcs�t�|jdd�r�tO�|jdd�r,�tO�|r@td|j���yt���fStk r�G���fdd�dt�}|t���f<|SXdS)Nr&Fr'z!unexpected keyword argument(s) %scseZdZ�Z�Z�ZdS)z$WINFUNCTYPE.<locals>.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#�WINFUNCTYPEosrB)�dlopen)�sizeof�byref� addressof� alignment�resize)� get_errno� set_errno)�_SimpleCDatacCsJddlm}|dkr|j}t|�||�}}||krFtd|||f��dS)Nr)rz"sizeof(%s) wrong: %d instead of %d)�structr�_type_rD�SystemError)�typ�typecoderZactualZrequiredr"r"r#�_check_size�srQcs eZdZdZ�fdd�Z�ZS)� py_object�Ocs.y t�j�Stk r(dt|�jSXdS)Nz %s(<NULL>))�super�__repr__r6�typer()�self)� __class__r"r#rU�s zpy_object.__repr__)r(r)r*rMrU� __classcell__r"r")rXr#rR�srR�Pc@seZdZdZdS)�c_short�hN)r(r)r*rMr"r"r"r#r[�sr[c@seZdZdZdS)�c_ushort�HN)r(r)r*rMr"r"r"r#r]�sr]c@seZdZdZdS)�c_long�lN)r(r)r*rMr"r"r"r#r_�sr_c@seZdZdZdS)�c_ulong�LN)r(r)r*rMr"r"r"r#ra�sra�ir`c@seZdZdZdS)�c_intrcN)r(r)r*rMr"r"r"r#rd�srdc@seZdZdZdS)�c_uint�IN)r(r)r*rMr"r"r"r#re�srec@seZdZdZdS)�c_float�fN)r(r)r*rMr"r"r"r#rg�srgc@seZdZdZdS)�c_double�dN)r(r)r*rMr"r"r"r#ri�sric@seZdZdZdS)�c_longdouble�gN)r(r)r*rMr"r"r"r#rk�srk�qc@seZdZdZdS)� c_longlongrmN)r(r)r*rMr"r"r"r#rn�srnc@seZdZdZdS)�c_ulonglong�QN)r(r)r*rMr"r"r"r#ro�sroc@seZdZdZdS)�c_ubyte�BN)r(r)r*rMr"r"r"r#rq�srqc@seZdZdZdS)�c_byte�bN)r(r)r*rMr"r"r"r#rs�srsc@seZdZdZdS)r�cN)r(r)r*rMr"r"r"r#r�src@seZdZdZdd�ZdS)�c_char_p�zcCsd|jjtj|�jfS)Nz%s(%s))rXr(�c_void_p�from_bufferr)rWr"r"r#rU�szc_char_p.__repr__N)r(r)r*rMrUr"r"r"r#rv�srvc@seZdZdZdS)rxrZN)r(r)r*rMr"r"r"r#rx�srxc@seZdZdZdS)�c_bool�?N)r(r)r*rMr"r"r"r#rz�srz)�POINTER�pointer�_pointer_type_cachec@seZdZdZdd�ZdS)� c_wchar_p�ZcCsd|jjtj|�jfS)Nz%s(%s))rXr(rxryr)rWr"r"r#rU�szc_wchar_p.__repr__N)r(r)r*rMrUr"r"r"r#r�src@seZdZdZdS)�c_wchar�uN)r(r)r*rMr"r"r"r#r�sr�cCsFtj�tj�tjdkr"tj�tjtt �_t jtt�_ttd<dS)Nr) r~�clearr8�_os�namerArZ from_paramr|r�rvrrxr"r"r"r#�_reset_caches r�cCs^t|t�r6|dkrt|�d}t|}|�}||_|St|t�rRt|}|�}|St|��dS)Nr)r�strrr�rrr)rrr r!r"r"r#�create_unicode_buffers r�cCsLtj|d�dk rtd��t|�tkr,td��|j|�|t|<tt|�=dS)Nz%This type already exists in the cachezWhat's this???)r~�get�RuntimeError�idZset_type)r}�clsr"r"r#�SetPointerType"s r�cCs||S)Nr")rOrr"r"r#�ARRAY,sr�c@sJeZdZeZeZdZdZdZ e dddfdd�Zdd�Zd d �Z dd�ZdS) �CDLLz<uninitialized>rNFcsb|�_�j�|r�tO�|r$�tO�G��fdd�dt�}|�_|dkrXt�j|��_n|�_dS)NcseZdZ�Z�jZdS)zCDLL.__init__.<locals>._FuncPtrN)r(r)r*r-�_func_restype_r,r")r/rWr"r#�_FuncPtrQsr�)�_name�_func_flags_r4r5r:r��_dlopen�_handle)rWr��modeZhandler&r'r�r")r/rWr#�__init__Gsz CDLL.__init__cCs8d|jj|j|jtjdd@t|�tjdd@fS)Nz<%s '%s', handle %x at %#x>�r)rXr(r�r��_sys�maxsizer�)rWr"r"r#rU[s z CDLL.__repr__cCs6|jd�r|jd�rt|��|j|�}t|||�|S)N�__)� startswith�endswith�AttributeError�__getitem__�setattr)rWr��funcr"r"r#�__getattr__as zCDLL.__getattr__cCs"|j||f�}t|t�s||_|S)N)r�rrr()rWZname_or_ordinalr�r"r"r#r�hs zCDLL.__getitem__)r(r)r*r2r�rdr�r�r�r��DEFAULT_MODEr�rUr�r�r"r"r"r#r�2sr�c@seZdZeeBZdS)�PyDLLN)r(r)r*r2�_FUNCFLAG_PYTHONAPIr�r"r"r"r#r�nsr�c@seZdZeZdS)�WinDLLN)r(r)r*r@r�r"r"r"r#r�wsr�)�_check_HRESULTrKc@seZdZdZeZdS)�HRESULTr`N)r(r)r*rMr�Z_check_retval_r"r"r"r#r��s r�c@seZdZeZeZdS)�OleDLLN)r(r)r*r@r�r�r�r"r"r"r#r��sr�c@s,eZdZdd�Zdd�Zdd�Zdd�Zd S) � LibraryLoadercCs ||_dS)N)�_dlltype)rWZdlltyper"r"r#r��szLibraryLoader.__init__cCs.|ddkrt|��|j|�}t|||�|S)Nr�_)r�r�r�)rWr�Zdllr"r"r#r��s zLibraryLoader.__getattr__cCs t||�S)N)�getattr)rWr�r"r"r#r��szLibraryLoader.__getitem__cCs |j|�S)N)r�)rWr�r"r"r#r=�szLibraryLoader.LoadLibraryN)r(r)r*r�r�r�r=r"r"r"r#r��sr�z python dll�cygwinzlibpython%d.%d.dllr�)�get_last_error�set_last_errorcCs0|dkrt�}|dkr"t|�j�}td|d|�S)N)�GetLastErrorr �strip�OSError)�codeZdescrr"r"r#�WinError�s r�)� _memmove_addr�_memset_addr�_string_at_addr� _cast_addrcsG��fdd�dt�}|S)NcseZdZ�Z�ZeeBZdS)z!PYFUNCTYPE.<locals>.CFunctionTypeN)r(r)r*r+r,r2r�r-r")r.r0r"r#r1�sr1)r:)r0r.r1r")r.r0r#� PYFUNCTYPE�sr�cCst|||�S)N)�_cast)�objrOr"r"r#�cast�sr�rcCs t||�S)N)� _string_at)�ptrrr"r"r#� string_at�sr�)�_wstring_at_addrcCs t||�S)N)�_wstring_at)r�rr"r"r#� wstring_at�sr�cCs@ytdt�t�dg�}Wntk r,dSX|j|||�SdS)Nzcomtypes.server.inprocserver�*i�i�)� __import__�globals�locals�ImportError�DllGetClassObject)ZrclsidZriidZppv�ccomr"r"r#r��s r�cCs6ytdt�t�dg�}Wntk r,dSX|j�S)Nzcomtypes.server.inprocserverr�r)r�r�r�r��DllCanUnloadNow)r�r"r"r#r��s r�)�BigEndianStructure�LittleEndianStructure�)N)N)N)N)NN���)r�r�)r�)��osr��sysr�rZ_ctypesrrrrrr:Z_ctypes_versionrr r rLrZ _calcsize� Exceptionr�r r��platformr�uname�release�splitrr2rr�rr4rr5r$r%r8r<r=r�r>r@rArB�__doc__�replacerCrDrErFrGrHrIrJrKrQrRr[r]r_rardrergrirkrnrorqZ__ctype_le__Z__ctype_be__rsrrvrxZc_voidprzr|r}r~rr�r�r�r�r��objectr�r�r�r�r�r�r�ZcdllZpydllZ dllhandleZ pythonapi�version_infoZwindllZoledllZkernel32r�Zcoredllr�r�r�Zc_size_tZ c_ssize_tr�r�r�r�ZmemmoveZmemsetr�r�r�r�r�r�r�r�r�r�r�Zctypes._endianr�r�Zc_int8Zc_uint8ZkindZc_int16Zc_int32Zc_int64Zc_uint16Zc_uint32Zc_uint64r"r"r"r#�<module>s6 ! < PKW}�\�-V�5>5>#__pycache__/__init__.cpython-36.pycnu�[���3 ���i1@�@s>dZddlZddlZdZddlmZmZm Z ddlm Z ddlmZddlmZ ddlmZmZdd lmZdd lmZee kr�edee ��ejdkr�dd lmZeZejdkr�ejdkr�eej�jjd�d�dkr�eZddlmZmZ m!Z"m#Z$d}dd�Z%d~dd�Z&iZ'dd�Z(ejdk�r\ddlm)Z*ddlm+Z,iZ-dd�Z.e.j�rte(jj/dd�e._nejdk�rtddlm0Z*ddlm1Z1m2Z2m3Z3m4Z4m5Z5ddlm6Z6m7Z7dd lm8Z8dd!d"�Z9Gd#d$�d$e8�Z:e9e:d%�Gd&d'�d'e8�Z;e9e;�Gd(d)�d)e8�Z<e9e<�Gd*d+�d+e8�Z=e9e=�Gd,d-�d-e8�Z>e9e>�ed.�ed/�k�rLe=Z?e>Z@n0Gd0d1�d1e8�Z?e9e?�Gd2d3�d3e8�Z@e9e@�Gd4d5�d5e8�ZAe9eA�Gd6d7�d7e8�ZBe9eB�Gd8d9�d9e8�ZCe1eC�e1eB�k�r�eBZCed/�ed:�k�r�e=ZDe>ZEn0Gd;d<�d<e8�ZDe9eD�Gd=d>�d>e8�ZEe9eE�Gd?d@�d@e8�ZFeFeF_GeF_He9eF�GdAdB�dBe8�ZIeIeI_GeI_He9eI�GdCdD�dDe8�ZJeJeJ_GeJ_He9eJ�GdEdF�dFe8�ZKe9eKd%�GdGdH�dHe8�ZLeLZMe9eL�GdIdJ�dJe8�ZNddKlmOZOmPZPmQZQGdLdM�dMe8�ZRGdNdO�dOe8�ZSdPdQ�ZTd�dRdS�ZUdTdU�ZVdVdW�ZWGdXdY�dYeX�ZYGdZd[�d[eY�ZZejdk�r�Gd\d]�d]eY�Z[dd^lm\Z\m8Z8Gd_d`�d`e8�Z]Gdadb�dbeY�Z^Gdcdd�ddeX�Z_e_eY�Z`e_eZ�Zaejdk�r�eZdedejb�Zcn,ejdfk�r�eZdgejdddh��ZcneZd�Zcejdk�rNe_e[�Zee_e^�Zfejdk�r,eejgjhZhneejijhZhddilmjZjmkZkd�djdk�Zle1e@�e1eL�k�rje@Zme?Znn6e1e>�e1eL�k�r�e>Zme=Znne1eE�e1eL�k�r�eEZmeDZnddllmoZompZpmqZqmrZre(eLeLeLem�eo�Zse(eLeLe?em�ep�Ztdmdn�Zueue:eLe:e:�er�Zvdodp�Zweue:eLe?�eq�Zxd�drds�ZyyddtlmzZzWne{k �r>YnXeue:eLe?�ez�Z|d�dudv�Z}ejdk�rvdwdx�Z~dydz�Zdd{l�m�Z�m�Z�eIZ�eFZ�xPe;e?e=eDgD]@Z�e1e��dhk�r�e�Z�n&e1e��d|k�r�e�Z�ne1e��dk�r�e�Z��q�WxPe<e@e>eEgD]@Z�e1e��dhk�re�Z�n&e1e��d|k�re�Z�ne1e��dk�r�e�Z��q�W[�eT�dS)�z,create and manipulate C data types in Python�Nz1.1.0)�Union� Structure�Array)�_Pointer)�CFuncPtr)�__version__)� RTLD_LOCAL�RTLD_GLOBAL)� ArgumentError)�calcsizezVersion number mismatch�nt)�FormatError�posix�darwin�.�)�FUNCFLAG_CDECL�FUNCFLAG_PYTHONAPI�FUNCFLAG_USE_ERRNO�FUNCFLAG_USE_LASTERRORcCs^t|t�r6|dkrt|�d}t|}|�}||_|St|t�rRt|}|�}|St|��dS)z�create_string_buffer(aBytes) -> character array create_string_buffer(anInteger) -> character array create_string_buffer(aBytes, anInteger) -> character array N�)� isinstance�bytes�len�c_char�value�int� TypeError)�init�size�buftype�buf�r"�'/usr/lib64/python3.6/ctypes/__init__.py�create_string_buffer/s r$cCs t||�S)N)r$)rrr"r"r#�c_bufferAsr%cs�t�|jdd�r�tO�|jdd�r,�tO�|r@td|j���yt���fStk r�G���fdd�dt�}|t���f<|SXdS)a�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 � use_errnoF�use_last_errorz!unexpected keyword argument(s) %scseZdZ�Z�Z�ZdS)z CFUNCTYPE.<locals>.CFunctionTypeN)�__name__� __module__�__qualname__� _argtypes_� _restype_�_flags_r")�argtypes�flags�restyper"r#� CFunctionTypecsr1N) �_FUNCFLAG_CDECL�pop�_FUNCFLAG_USE_ERRNO�_FUNCFLAG_USE_LASTERROR� ValueError�keys�_c_functype_cache�KeyError� _CFuncPtr)r0r.�kwr1r")r.r/r0r#� CFUNCTYPEIsr<)�LoadLibrary)�FUNCFLAG_STDCALLcs�t�|jdd�r�tO�|jdd�r,�tO�|r@td|j���yt���fStk r�G���fdd�dt�}|t���f<|SXdS)Nr&Fr'z!unexpected keyword argument(s) %scseZdZ�Z�Z�ZdS)z$WINFUNCTYPE.<locals>.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#�WINFUNCTYPEosrB)�dlopen)�sizeof�byref� addressof� alignment�resize)� get_errno� set_errno)�_SimpleCDatacCsJddlm}|dkr|j}t|�||�}}||krFtd|||f��dS)Nr)rz"sizeof(%s) wrong: %d instead of %d)�structr�_type_rD�SystemError)�typ�typecoderZactualZrequiredr"r"r#�_check_size�srQcs eZdZdZ�fdd�Z�ZS)� py_object�Ocs.y t�j�Stk r(dt|�jSXdS)Nz %s(<NULL>))�super�__repr__r6�typer()�self)� __class__r"r#rU�s zpy_object.__repr__)r(r)r*rMrU� __classcell__r"r")rXr#rR�srR�Pc@seZdZdZdS)�c_short�hN)r(r)r*rMr"r"r"r#r[�sr[c@seZdZdZdS)�c_ushort�HN)r(r)r*rMr"r"r"r#r]�sr]c@seZdZdZdS)�c_long�lN)r(r)r*rMr"r"r"r#r_�sr_c@seZdZdZdS)�c_ulong�LN)r(r)r*rMr"r"r"r#ra�sra�ir`c@seZdZdZdS)�c_intrcN)r(r)r*rMr"r"r"r#rd�srdc@seZdZdZdS)�c_uint�IN)r(r)r*rMr"r"r"r#re�srec@seZdZdZdS)�c_float�fN)r(r)r*rMr"r"r"r#rg�srgc@seZdZdZdS)�c_double�dN)r(r)r*rMr"r"r"r#ri�sric@seZdZdZdS)�c_longdouble�gN)r(r)r*rMr"r"r"r#rk�srk�qc@seZdZdZdS)� c_longlongrmN)r(r)r*rMr"r"r"r#rn�srnc@seZdZdZdS)�c_ulonglong�QN)r(r)r*rMr"r"r"r#ro�sroc@seZdZdZdS)�c_ubyte�BN)r(r)r*rMr"r"r"r#rq�srqc@seZdZdZdS)�c_byte�bN)r(r)r*rMr"r"r"r#rs�srsc@seZdZdZdS)r�cN)r(r)r*rMr"r"r"r#r�src@seZdZdZdd�ZdS)�c_char_p�zcCsd|jjtj|�jfS)Nz%s(%s))rXr(�c_void_p�from_bufferr)rWr"r"r#rU�szc_char_p.__repr__N)r(r)r*rMrUr"r"r"r#rv�srvc@seZdZdZdS)rxrZN)r(r)r*rMr"r"r"r#rx�srxc@seZdZdZdS)�c_bool�?N)r(r)r*rMr"r"r"r#rz�srz)�POINTER�pointer�_pointer_type_cachec@seZdZdZdd�ZdS)� c_wchar_p�ZcCsd|jjtj|�jfS)Nz%s(%s))rXr(rxryr)rWr"r"r#rU�szc_wchar_p.__repr__N)r(r)r*rMrUr"r"r"r#r�src@seZdZdZdS)�c_wchar�uN)r(r)r*rMr"r"r"r#r�sr�cCsFtj�tj�tjdkr"tj�tjtt �_t jtt�_ttd<dS)Nr) r~�clearr8�_os�namerArZ from_paramr|r�rvrrxr"r"r"r#�_reset_caches r�cCs^t|t�r6|dkrt|�d}t|}|�}||_|St|t�rRt|}|�}|St|��dS)z�create_unicode_buffer(aString) -> character array create_unicode_buffer(anInteger) -> character array create_unicode_buffer(aString, anInteger) -> character array Nr)r�strrr�rrr)rrr r!r"r"r#�create_unicode_buffers r�cCsLtj|d�dk rtd��t|�tkr,td��|j|�|t|<tt|�=dS)Nz%This type already exists in the cachezWhat's this???)r~�get�RuntimeError�idZset_type)r}�clsr"r"r#�SetPointerType"s r�cCs||S)Nr")rOrr"r"r#�ARRAY,sr�c@sNeZdZdZeZeZdZdZ dZ edddfdd�Zdd �Z d d�Zdd �ZdS)�CDLLa�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: <obj>.qsort -> callable object <obj>['qsort'] -> callable object Calling the functions releases the Python GIL during the call and reacquires it afterwards. z<uninitialized>rNFcsb|�_�j�|r�tO�|r$�tO�G��fdd�dt�}|�_|dkrXt�j|��_n|�_dS)NcseZdZ�Z�jZdS)zCDLL.__init__.<locals>._FuncPtrN)r(r)r*r-�_func_restype_r,r")r/rWr"r#�_FuncPtrQsr�)�_name�_func_flags_r4r5r:r��_dlopen�_handle)rWr��modeZhandler&r'r�r")r/rWr#�__init__Gsz CDLL.__init__cCs8d|jj|j|jtjdd@t|�tjdd@fS)Nz<%s '%s', handle %x at %#x>�r)rXr(r�r��_sys�maxsizer�)rWr"r"r#rU[s z CDLL.__repr__cCs6|jd�r|jd�rt|��|j|�}t|||�|S)N�__)� startswith�endswith�AttributeError�__getitem__�setattr)rWr��funcr"r"r#�__getattr__as zCDLL.__getattr__cCs"|j||f�}t|t�s||_|S)N)r�rrr()rWZname_or_ordinalr�r"r"r#r�hs zCDLL.__getitem__)r(r)r*�__doc__r2r�rdr�r�r�r��DEFAULT_MODEr�rUr�r�r"r"r"r#r�2s r�c@seZdZdZeeBZdS)�PyDLLz�This 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*r�r2�_FUNCFLAG_PYTHONAPIr�r"r"r"r#r�nsr�c@seZdZdZeZdS)�WinDLLznThis class represents a dll exporting functions using the Windows stdcall calling convention. N)r(r)r*r�r@r�r"r"r"r#r�wsr�)�_check_HRESULTrKc@seZdZdZeZdS)�HRESULTr`N)r(r)r*rMr�Z_check_retval_r"r"r"r#r��s r�c@seZdZdZeZeZdS)�OleDLLz�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. N)r(r)r*r�r@r�r�r�r"r"r"r#r��sr�c@s,eZdZdd�Zdd�Zdd�Zdd�Zd S) � LibraryLoadercCs ||_dS)N)�_dlltype)rWZdlltyper"r"r#r��szLibraryLoader.__init__cCs.|ddkrt|��|j|�}t|||�|S)Nr�_)r�r�r�)rWr�Zdllr"r"r#r��s zLibraryLoader.__getattr__cCs t||�S)N)�getattr)rWr�r"r"r#r��szLibraryLoader.__getitem__cCs |j|�S)N)r�)rWr�r"r"r#r=�szLibraryLoader.LoadLibraryN)r(r)r*r�r�r�r=r"r"r"r#r��sr�z python dll�cygwinzlibpython%d.%d.dllr�)�get_last_error�set_last_errorcCs0|dkrt�}|dkr"t|�j�}td|d|�S)N)�GetLastErrorr �strip�OSError)�codeZdescrr"r"r#�WinError�s r�)� _memmove_addr�_memset_addr�_string_at_addr� _cast_addrcsG��fdd�dt�}|S)NcseZdZ�Z�ZeeBZdS)z!PYFUNCTYPE.<locals>.CFunctionTypeN)r(r)r*r+r,r2r�r-r")r.r0r"r#r1�sr1)r:)r0r.r1r")r.r0r#� PYFUNCTYPE�sr�cCst|||�S)N)�_cast)�objrOr"r"r#�cast�sr�rcCs t||�S)zAstring_at(addr[, size]) -> string Return the string at addr.)� _string_at)�ptrrr"r"r#� string_at�sr�)�_wstring_at_addrcCs t||�S)zFwstring_at(addr[, size]) -> string Return the string at addr.)�_wstring_at)r�rr"r"r#� wstring_at�sr�cCs@ytdt�t�dg�}Wntk r,dSX|j|||�SdS)Nzcomtypes.server.inprocserver�*i�i�)� __import__�globals�locals�ImportError�DllGetClassObject)ZrclsidZriidZppv�ccomr"r"r#r��s r�cCs6ytdt�t�dg�}Wntk r,dSX|j�S)Nzcomtypes.server.inprocserverr�r)r�r�r�r��DllCanUnloadNow)r�r"r"r#r��s r�)�BigEndianStructure�LittleEndianStructure�)N)N)N)N)NN���)r�r�)r�)�r��osr��sysr�rZ_ctypesrrrrrr:Z_ctypes_versionrr r rLrZ _calcsize� Exceptionr�r r��platformr�uname�release�splitrr2rr�rr4rr5r$r%r8r<r=r�r>r@rArB�replacerCrDrErFrGrHrIrJrKrQrRr[r]r_rardrergrirkrnrorqZ__ctype_le__Z__ctype_be__rsrrvrxZc_voidprzr|r}r~rr�r�r�r�r��objectr�r�r�r�r�r�r�ZcdllZpydllZ dllhandleZ pythonapi�version_infoZwindllZoledllZkernel32r�Zcoredllr�r�r�Zc_size_tZ c_ssize_tr�r�r�r�ZmemmoveZmemsetr�r�r�r�r�r�r�r�r�r�r�Zctypes._endianr�r�Zc_int8Zc_uint8ZkindZc_int16Zc_int32Zc_int64Zc_uint16Zc_uint32Zc_uint64r"r"r"r#�<module>s8 ! < PKW}�\��pY��(__pycache__/_endian.cpython-36.opt-1.pycnu�[���3 \��@s�ddlZddlTee�Zdd�ZGdd�dee��Zejdkr\dZ eZ Gd d �d eed�Zn0ejdkr�d Z eZGdd�deed�Z ned��dS)�N)�*cCsLt|t�rt|t�St|t�r.t|j�|jSt|t �r<|St d|��dS)z�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. z+This type does not support other endian: %sN)�hasattr� _OTHER_ENDIAN�getattr� isinstance�_array_type� _other_endianZ_type_Z_length_� issubclass� Structure� TypeError)�typ�r �&/usr/lib64/python3.6/ctypes/_endian.pyrs rcseZdZ�fdd�Z�ZS)� _swapped_metacsb|dkrPg}x>|D]6}|d}|d}|dd�}|j|t|�f|�qW|}t�j||�dS)NZ_fields_r��)�appendr�super�__setattr__)�selfZattrname�valueZfieldsZdesc�namer�rest)� __class__r rrs z_swapped_meta.__setattr__)�__name__� __module__�__qualname__r� __classcell__r r )rrrsr�littleZ__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) �sysZctypes�typeZArrayrrr r� byteorderrr$r�RuntimeErrorr r r r�<module>s PKW}�\��.,,(__pycache__/_endian.cpython-36.opt-2.pycnu�[���3 \��@s�ddlZddlTee�Zdd�ZGdd�dee��Zejdkr\dZ eZ Gd d �d eed�Zn0ejdkr�d Z eZGdd�deed�Z ned��dS)�N)�*cCsLt|t�rt|t�St|t�r.t|j�|jSt|t �r<|St d|��dS)Nz+This type does not support other endian: %s)�hasattr� _OTHER_ENDIAN�getattr� isinstance�_array_type� _other_endianZ_type_Z_length_� issubclass� Structure� TypeError)�typ�r �&/usr/lib64/python3.6/ctypes/_endian.pyrs rcseZdZ�fdd�Z�ZS)� _swapped_metacsb|dkrPg}x>|D]6}|d}|d}|dd�}|j|t|�f|�qW|}t�j||�dS)NZ_fields_r��)�appendr�super�__setattr__)�selfZattrname�valueZfieldsZdesc�namer�rest)� __class__r rrs z_swapped_meta.__setattr__)�__name__� __module__�__qualname__r� __classcell__r r )rrrsr�littleZ__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) �sysZctypes�typeZArrayrrr r� byteorderrr#r�RuntimeErrorr r r r�<module>s PKW}�\��pY��"__pycache__/_endian.cpython-36.pycnu�[���3 \��@s�ddlZddlTee�Zdd�ZGdd�dee��Zejdkr\dZ eZ Gd d �d eed�Zn0ejdkr�d Z eZGdd�deed�Z ned��dS)�N)�*cCsLt|t�rt|t�St|t�r.t|j�|jSt|t �r<|St d|��dS)z�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. z+This type does not support other endian: %sN)�hasattr� _OTHER_ENDIAN�getattr� isinstance�_array_type� _other_endianZ_type_Z_length_� issubclass� Structure� TypeError)�typ�r �&/usr/lib64/python3.6/ctypes/_endian.pyrs rcseZdZ�fdd�Z�ZS)� _swapped_metacsb|dkrPg}x>|D]6}|d}|d}|dd�}|j|t|�f|�qW|}t�j||�dS)NZ_fields_r��)�appendr�super�__setattr__)�selfZattrname�valueZfieldsZdesc�namer�rest)� __class__r rrs z_swapped_meta.__setattr__)�__name__� __module__�__qualname__r� __classcell__r r )rrrsr�littleZ__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) �sysZctypes�typeZArrayrrr r� byteorderrr$r�RuntimeErrorr r r r�<module>s PKW}�\�<<%__pycache__/util.cpython-36.opt-1.pycnu�[���3 \�-�@sddlZddlZddlZddlZejdkrBdd�Zdd�Zdd�Zejd krlejd krlddl m Zdd�Zn�ejd k�rddlZddl Z d d�Zejdkr�dd�Zndd�Zejjd%�r�dd�Zdd�Zn6ejdkr�dd�Zd&dd�Zndd�Zdd �Zd!d�Zd"d#�Zed$k�re�dS)'�N�ntcCs�d}tjj|�}|dkrdS|t|�}tj|d�jdd�\}}t|dd��d}|dkrf|d7}t|dd��d }|dkr�d }|dkr�||SdS) z�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. zMSC v.��N� �� �g$@r������)�sys�version�find�len�split�int)�prefix�i�s�restZmajorVersionZminorVersion�r�#/usr/lib64/python3.6/ctypes/util.py�_get_build_version srcCs^t�}|dkrdS|dkr d}n|dkr6d|d}ndSddl}d|jjkrV|d 7}|d S)z%Return the name of the VC runtime dllNr�msvcrtrzmsvcr%d� rz_d.pyd�dz.dll)r�importlib.machinery� machinery�EXTENSION_SUFFIXES)rZclibname� importlibrrr�find_msvcrt"srcCst|dkrt�Sx`tjdjtj�D]J}tjj||�}tjj|�rD|S|j�j d�rTq"|d}tjj|�r"|Sq"WdS)N�c�m�PATHz.dll)r r!) r�os�environr�pathsep�path�join�isfile�lower�endswith)�nameZ directoryZfnamerrr�find_library7sr,�posix�darwin)� dyld_findcCsLd|d|d||fg}x,|D]$}yt|�Stk rBw Yq Xq WdS)Nzlib%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 <ytj|tj tj|d �}Wntk r�dSX|�|jj�}WdQRXWdy|j�Wntk r�YnXXtj||�}|s�dStj|jd��S)Nz[^\(\)\s]*lib%s\.[^\(\)\s]*�gccZccz-Wl,-tz-oz-l�C�LC_ALL�LANG)�stdout�stderr�envr)r#�fsencode�re�escape�shutil�which�tempfileZNamedTemporaryFiler+�dictr$� subprocess�Popen�PIPEZSTDOUT�OSErrorr7�read�close�FileNotFoundError�search�fsdecode�group) r+�exprZ c_compilerZtemp�argsr9�procZtrace�resrrr�_findLib_gccWs: rOZsunos5cCsz|sdSytjdd|ftjtjd�}Wntk r:dSX|�|jj�}WdQRXtjd|�}|sjdSt j |jd��S)Nz/usr/ccs/bin/dumpz-Lpv)r7r8s\[.*\]\sSONAME\s+([^\s]+)r)rArBrC�DEVNULLrDr7rEr;rHr#rIrJ)�frM�datarNrrr�_get_soname�srScCs�|sdStjd�}|sdSy"tj|ddd|ftjtjd�}Wntk rPdSX|�|jj�}WdQRXt j d|�}|s�dStj|j d��S)N�objdumpz-pz-jz.dynamic)r7r8s\sSONAME\s+([^\s]+)r)r=r>rArBrCrPrDr7rEr;rHr#rIrJ)rQrTrM�dumprNrrrrS�s" �freebsd�openbsd� dragonflycCsR|jd�}g}y"x|r,|jdt|j���qWWntk rDYnX|pPtjgS)N�.r)r�insertr�popr1r�maxsize)Zlibname�partsZnumsrrr�_num_version�s r^cCs�tj|�}d||f}tj|�}ytjdtjtjd�}Wntk rPd}YnX|�|j j �}WdQRXtj||�}|s�tt |��S|jtd�tj|d �S) Nz:-l%s\.\S+ => \S*/(lib%s\.\S+)�/sbin/ldconfig�-r)r7r8�)�keyr)r_r`r )r;r<r#r:rArBrCrPrDr7rE�findallrSrO�sortr^rI)r+ZenamerKrMrRrNrrrr,�s c Cs�tjjd�sdSttj�}d|d<|r,d }nd}d}ytj|tjtj|d�}Wnt k rbdSX|�:x2|j D](}|j�}|jd�rrtj |�j�d}qrWWdQRX|s�dSx4|jd�D]&}tjj|d |�}tjj|�r�|Sq�WdS)N� /usr/bin/crler4r5�-64)r7r8r9sDefault Library Path (ELF):��:zlib%s.so)rerf)re)r#r&�existsr@r$rArBrCrPrDr7�strip� startswithrIrr') r+�is64r9rL�pathsrM�line�dirZlibfilerrr� _findLib_crle�s6 rpFcCstt||�pt|��S)N)rSrprO)r+rlrrrr,�scCs�ddl}|jd�dkr&tj�jd}ntj�jd}dddddd �}|j|d �}d}tj|tj|�|f�}yZt j dd gt jt jt jddd�d��,}tj ||jj��}|r�tj|jd��SWdQRXWntk r�YnXdS)Nr�lrgz-32z-64zlibc6,x86-64zlibc6,64bitzlibc6,IA-64)z x86_64-64zppc64-64z sparc64-64zs390x-64zia64-64Zlibc6z\s+(lib%s\.[^\s]+)\s+\(%sz/sbin/ldconfigz-pr4)r5r6)�stdinr8r7r9r)�structZcalcsizer#�uname�machine�getr:r;r<rArBrPrCrHr7rErIrJrD)r+rsruZmach_mapZabi_typeZregex�prNrrr�_findSoname_ldconfig�s. rxcCs�dtj|�}ddg}tjjd�}|rHx |jd�D]}|jd|g�q2W|jdtjd|g�d}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$rvr�extend�devnullrArBrCZcommunicaterHrIrJ� Exception)r+rK�cmdZlibpathr�resultrw�out�_rN�errr�_findLib_lds& r�cCst|�ptt|�pt|��S)N)rxrSrOr�)r+rrrr,,scCs�ddlm}tjdkr:t|j�t|jd��ttd��tjdkr�ttd��ttd��ttd��tj d kr�t|j d ��t|j d��t|j d��t|j d ��n(t|j d��t|j d��ttd��dS)Nr)�cdllrrr-r!r �bz2r.z libm.dylibzlibcrypto.dylibzlibSystem.dylibzSystem.framework/Systemzlibm.sozlibcrypt.soZcrypt)Zctypesr�r#r+�printr�loadr,r�platformZLoadLibrary)r�rrr�test4s" r��__main__)rVrWrX)F)r#r=rArr+rrr,r�Zctypes.macholib.dyldr/r0r;r?rOrSrkr^rprxr�r��__name__rrrr�<module>s8 + $ PKW}�\exB[DD%__pycache__/util.cpython-36.opt-2.pycnu�[���3 \�-�@sddlZddlZddlZddlZejdkrBdd�Zdd�Zdd�Zejd krlejd krlddl m Zdd�Zn�ejd k�rddlZddl Z d d�Zejdkr�dd�Zndd�Zejjd%�r�dd�Zdd�Zn6ejdkr�dd�Zd&dd�Zndd�Zdd �Zd!d�Zd"d#�Zed$k�re�dS)'�N�ntcCs�d}tjj|�}|d krdS|t|�}tj|d�jdd�\}}t|dd��d}|dkrf|d7}t|dd��d}|dkr�d }|dkr�||SdS)NzMSC v.��� �� �g$@r������)�sys�version�find�len�split�int)�prefix�i�s�restZmajorVersionZminorVersion�r�#/usr/lib64/python3.6/ctypes/util.py�_get_build_version srcCs^t�}|dkrdS|dkr d}n|dkr6d|d}ndSddl}d|jjkrV|d7}|d S) Nr�msvcrtrzmsvcr%d� rz_d.pyd�dz.dll)r�importlib.machinery� machinery�EXTENSION_SUFFIXES)rZclibname� importlibrrr�find_msvcrt"srcCst|dkrt�Sx`tjdjtj�D]J}tjj||�}tjj|�rD|S|j�j d�rTq"|d}tjj|�r"|Sq"WdS)N�c�m�PATHz.dll)r r!) r�os�environr�pathsep�path�join�isfile�lower�endswith)�nameZ directoryZfnamerrr�find_library7sr,�posix�darwin)� dyld_findcCsLd|d|d||fg}x,|D]$}yt|�Stk rBw Yq Xq WdS)Nzlib%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 <ytj|tj tj|d �}Wntk r�dSX|�|jj�}WdQRXWdy|j�Wntk r�YnXXtj||�}|s�dStj|jd��S)Nz[^\(\)\s]*lib%s\.[^\(\)\s]*�gccZccz-Wl,-tz-oz-l�C�LC_ALL�LANG)�stdout�stderr�envr)r#�fsencode�re�escape�shutil�which�tempfileZNamedTemporaryFiler+�dictr$� subprocess�Popen�PIPEZSTDOUT�OSErrorr7�read�close�FileNotFoundError�search�fsdecode�group) r+�exprZ c_compilerZtemp�argsr9�procZtrace�resrrr�_findLib_gccWs: rOZsunos5cCsz|sdSytjdd|ftjtjd�}Wntk r:dSX|�|jj�}WdQRXtjd|�}|sjdSt j |jd��S)Nz/usr/ccs/bin/dumpz-Lpv)r7r8s\[.*\]\sSONAME\s+([^\s]+)r)rArBrC�DEVNULLrDr7rEr;rHr#rIrJ)�frM�datarNrrr�_get_soname�srScCs�|sdStjd�}|sdSy"tj|ddd|ftjtjd�}Wntk rPdSX|�|jj�}WdQRXt j d|�}|s�dStj|j d��S)N�objdumpz-pz-jz.dynamic)r7r8s\sSONAME\s+([^\s]+)r)r=r>rArBrCrPrDr7rEr;rHr#rIrJ)rQrTrM�dumprNrrrrS�s" �freebsd�openbsd� dragonflycCsR|jd�}g}y"x|r,|jdt|j���qWWntk rDYnX|pPtjgS)N�.r)r�insertr�popr1r�maxsize)Zlibname�partsZnumsrrr�_num_version�s r^cCs�tj|�}d||f}tj|�}ytjdtjtjd�}Wntk rPd}YnX|�|j j �}WdQRXtj||�}|s�tt |��S|jtd�tj|d �S) Nz:-l%s\.\S+ => \S*/(lib%s\.\S+)�/sbin/ldconfig�-r)r7r8�)�keyr)r_r`r )r;r<r#r:rArBrCrPrDr7rE�findallrSrO�sortr^rI)r+ZenamerKrMrRrNrrrr,�s c Cs�tjjd�sdSttj�}d|d<|r,d }nd}d}ytj|tjtj|d�}Wnt k rbdSX|�:x2|j D](}|j�}|jd�rrtj |�j�d}qrWWdQRX|s�dSx4|jd�D]&}tjj|d |�}tjj|�r�|Sq�WdS)N� /usr/bin/crler4r5�-64)r7r8r9sDefault Library Path (ELF):��:zlib%s.so)rerf)re)r#r&�existsr@r$rArBrCrPrDr7�strip� startswithrIrr') r+�is64r9rL�pathsrM�line�dirZlibfilerrr� _findLib_crle�s6 rpFcCstt||�pt|��S)N)rSrprO)r+rlrrrr,�scCs�ddl}|jd�dkr&tj�jd}ntj�jd}dddddd �}|j|d �}d}tj|tj|�|f�}yZt j dd gt jt jt jddd�d��,}tj ||jj��}|r�tj|jd��SWdQRXWntk r�YnXdS)Nr�lrgz-32z-64zlibc6,x86-64zlibc6,64bitzlibc6,IA-64)z x86_64-64zppc64-64z sparc64-64zs390x-64zia64-64Zlibc6z\s+(lib%s\.[^\s]+)\s+\(%sz/sbin/ldconfigz-pr4)r5r6)�stdinr8r7r9r)�structZcalcsizer#�uname�machine�getr:r;r<rArBrPrCrHr7rErIrJrD)r+rsruZmach_mapZabi_typeZregex�prNrrr�_findSoname_ldconfig�s. rxcCs�dtj|�}ddg}tjjd�}|rHx |jd�D]}|jd|g�q2W|jdtjd|g�d}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$rvr�extend�devnullrArBrCZcommunicaterHrIrJ� Exception)r+rK�cmdZlibpathr�resultrw�out�_rN�errr�_findLib_lds& r�cCst|�ptt|�pt|��S)N)rxrSrOr�)r+rrrr,,scCs�ddlm}tjdkr:t|j�t|jd��ttd��tjdkr�ttd��ttd��ttd��tj d kr�t|j d ��t|j d��t|j d��t|j d ��n(t|j d��t|j d��ttd��dS)Nr)�cdllrrr-r!r �bz2r.z libm.dylibzlibcrypto.dylibzlibSystem.dylibzSystem.framework/Systemzlibm.sozlibcrypt.soZcrypt)Zctypesr�r#r+�printr�loadr,r�platformZLoadLibrary)r�rrr�test4s" r��__main__)rVrWrX)F)r#r=rArr+rrr,r�Zctypes.macholib.dyldr/r0r;r?rOrSrkr^rprxr�r��__name__rrrr�<module>s8 + $ PKW}�\�<<__pycache__/util.cpython-36.pycnu�[���3 \�-�@sddlZddlZddlZddlZejdkrBdd�Zdd�Zdd�Zejd krlejd krlddl m Zdd�Zn�ejd k�rddlZddl Z d d�Zejdkr�dd�Zndd�Zejjd%�r�dd�Zdd�Zn6ejdkr�dd�Zd&dd�Zndd�Zdd �Zd!d�Zd"d#�Zed$k�re�dS)'�N�ntcCs�d}tjj|�}|dkrdS|t|�}tj|d�jdd�\}}t|dd��d}|dkrf|d7}t|dd��d }|dkr�d }|dkr�||SdS) z�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. zMSC v.��N� �� �g$@r������)�sys�version�find�len�split�int)�prefix�i�s�restZmajorVersionZminorVersion�r�#/usr/lib64/python3.6/ctypes/util.py�_get_build_version srcCs^t�}|dkrdS|dkr d}n|dkr6d|d}ndSddl}d|jjkrV|d 7}|d S)z%Return the name of the VC runtime dllNr�msvcrtrzmsvcr%d� rz_d.pyd�dz.dll)r�importlib.machinery� machinery�EXTENSION_SUFFIXES)rZclibname� importlibrrr�find_msvcrt"srcCst|dkrt�Sx`tjdjtj�D]J}tjj||�}tjj|�rD|S|j�j d�rTq"|d}tjj|�r"|Sq"WdS)N�c�m�PATHz.dll)r r!) r�os�environr�pathsep�path�join�isfile�lower�endswith)�nameZ directoryZfnamerrr�find_library7sr,�posix�darwin)� dyld_findcCsLd|d|d||fg}x,|D]$}yt|�Stk rBw Yq Xq WdS)Nzlib%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 <ytj|tj tj|d �}Wntk r�dSX|�|jj�}WdQRXWdy|j�Wntk r�YnXXtj||�}|s�dStj|jd��S)Nz[^\(\)\s]*lib%s\.[^\(\)\s]*�gccZccz-Wl,-tz-oz-l�C�LC_ALL�LANG)�stdout�stderr�envr)r#�fsencode�re�escape�shutil�which�tempfileZNamedTemporaryFiler+�dictr$� subprocess�Popen�PIPEZSTDOUT�OSErrorr7�read�close�FileNotFoundError�search�fsdecode�group) r+�exprZ c_compilerZtemp�argsr9�procZtrace�resrrr�_findLib_gccWs: rOZsunos5cCsz|sdSytjdd|ftjtjd�}Wntk r:dSX|�|jj�}WdQRXtjd|�}|sjdSt j |jd��S)Nz/usr/ccs/bin/dumpz-Lpv)r7r8s\[.*\]\sSONAME\s+([^\s]+)r)rArBrC�DEVNULLrDr7rEr;rHr#rIrJ)�frM�datarNrrr�_get_soname�srScCs�|sdStjd�}|sdSy"tj|ddd|ftjtjd�}Wntk rPdSX|�|jj�}WdQRXt j d|�}|s�dStj|j d��S)N�objdumpz-pz-jz.dynamic)r7r8s\sSONAME\s+([^\s]+)r)r=r>rArBrCrPrDr7rEr;rHr#rIrJ)rQrTrM�dumprNrrrrS�s" �freebsd�openbsd� dragonflycCsR|jd�}g}y"x|r,|jdt|j���qWWntk rDYnX|pPtjgS)N�.r)r�insertr�popr1r�maxsize)Zlibname�partsZnumsrrr�_num_version�s r^cCs�tj|�}d||f}tj|�}ytjdtjtjd�}Wntk rPd}YnX|�|j j �}WdQRXtj||�}|s�tt |��S|jtd�tj|d �S) Nz:-l%s\.\S+ => \S*/(lib%s\.\S+)�/sbin/ldconfig�-r)r7r8�)�keyr)r_r`r )r;r<r#r:rArBrCrPrDr7rE�findallrSrO�sortr^rI)r+ZenamerKrMrRrNrrrr,�s c Cs�tjjd�sdSttj�}d|d<|r,d }nd}d}ytj|tjtj|d�}Wnt k rbdSX|�:x2|j D](}|j�}|jd�rrtj |�j�d}qrWWdQRX|s�dSx4|jd�D]&}tjj|d |�}tjj|�r�|Sq�WdS)N� /usr/bin/crler4r5�-64)r7r8r9sDefault Library Path (ELF):��:zlib%s.so)rerf)re)r#r&�existsr@r$rArBrCrPrDr7�strip� startswithrIrr') r+�is64r9rL�pathsrM�line�dirZlibfilerrr� _findLib_crle�s6 rpFcCstt||�pt|��S)N)rSrprO)r+rlrrrr,�scCs�ddl}|jd�dkr&tj�jd}ntj�jd}dddddd �}|j|d �}d}tj|tj|�|f�}yZt j dd gt jt jt jddd�d��,}tj ||jj��}|r�tj|jd��SWdQRXWntk r�YnXdS)Nr�lrgz-32z-64zlibc6,x86-64zlibc6,64bitzlibc6,IA-64)z x86_64-64zppc64-64z sparc64-64zs390x-64zia64-64Zlibc6z\s+(lib%s\.[^\s]+)\s+\(%sz/sbin/ldconfigz-pr4)r5r6)�stdinr8r7r9r)�structZcalcsizer#�uname�machine�getr:r;r<rArBrPrCrHr7rErIrJrD)r+rsruZmach_mapZabi_typeZregex�prNrrr�_findSoname_ldconfig�s. rxcCs�dtj|�}ddg}tjjd�}|rHx |jd�D]}|jd|g�q2W|jdtjd|g�d}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$rvr�extend�devnullrArBrCZcommunicaterHrIrJ� Exception)r+rK�cmdZlibpathr�resultrw�out�_rN�errr�_findLib_lds& r�cCst|�ptt|�pt|��S)N)rxrSrOr�)r+rrrr,,scCs�ddlm}tjdkr:t|j�t|jd��ttd��tjdkr�ttd��ttd��ttd��tj d kr�t|j d ��t|j d��t|j d��t|j d ��n(t|j d��t|j d��ttd��dS)Nr)�cdllrrr-r!r �bz2r.z libm.dylibzlibcrypto.dylibzlibSystem.dylibzSystem.framework/Systemzlibm.sozlibcrypt.soZcrypt)Zctypesr�r#r+�printr�loadr,r�platformZLoadLibrary)r�rrr�test4s" r��__main__)rVrWrX)F)r#r=rArr+rrr,r�Zctypes.macholib.dyldr/r0r;r?rOrSrkr^rprxr�r��__name__rrrr�<module>s8 + $ PKW}�\�����)__pycache__/wintypes.cpython-36.opt-1.pycnu�[���3 \��@sddlZejZejZejZejZej Z ejZej ZejZejZeZejZGdd�dej�ZejZejZejZejZejZZej Z!Z"ej#Z$Z%Z&ej#Z'Z(ej)Z*Z+ej,Z-Z.ej/ej�ej/ej,�kr�ejZ0ejZ1n$ej/ej�ej/ej,�kr�ej Z0ejZ1eZ2eZ3eZ4eZ5eZ6eZ7ej,Z8e8Z9e8Z:e8Z;e8Z<e8Z=e8Z>e8Z?e8Z@e8ZAe8ZBe8ZCe8ZDe8ZEe8ZFe8ZGe8ZHe8ZIe8ZJe8ZKe8ZLe8ZMe8ZNe8ZOe8ZPe8ZQe8ZRe8ZSe8ZTe8ZUe8ZVe8ZWGdd�dejX�ZYeYZZZ[Z\Gdd�dejX�Z]e]Z^Gdd �d ejX�Z_Gd d�dejX�Z`e`ZaZbZcGdd �d ejX�ZdedZeZfdd�ZgGdd�dejX�ZhehZiGdd�dejX�ZjejZkdZlGdd�dejX�ZmGdd�dejX�Znejoe�ZpZqejoe�Zrejoe�ZsZtejoe�Zuejoe4�Zvejoe�ZwZxejoeh�ZyZzejoe�Z{ejoe8�Z|Z}ejoeG�Z~ejoeH�Zejoe�Z�Z�ejoe�Z�ejoe7�Z�ejoe�Z�Z�ejoej�Z�Z�ejoe`�Z�Z�ejoec�Z�ejoeY�Z�Z�ejoe\�Z�Z�ejoeV�Z�ejoe�Z�ejoed�Z�Z�ejoef�Z�Z�ejoe^�Z�ejoe�Z�Z�ejoe"�Z�ejoe�Z�ejoe�Z�ejoe �Z�ejoem�Z�Z�ejoen�Z�Z�ejoe�Z�Z�dS)�Nc@seZdZdZdd�ZdS)�VARIANT_BOOL�vcCsd|jj|jfS)Nz%s(%r))� __class__�__name__�value)�self�r�'/usr/lib64/python3.6/ctypes/wintypes.py�__repr__szVARIANT_BOOL.__repr__N)r� __module__�__qualname__Z_type_r rrrr rsrc@s(eZdZdefdefdefdefgZdS)�RECT�left�top�rightZbottomN)rrr�LONG�_fields_rrrr r asr c@s(eZdZdefdefdefdefgZdS)�_SMALL_RECTZLeftZTopZRightZBottomN)rrr�SHORTrrrrr rhsrc@seZdZdefdefgZdS)�_COORD�X�YN)rrrrrrrrr rosrc@seZdZdefdefgZdS)�POINT�x�yN)rrrrrrrrr rssrc@seZdZdefdefgZdS)�SIZEZcxZcyN)rrrrrrrrr rxsrcCs||d>|d>S)N��r)ZredZgreenZbluerrr �RGB}src@seZdZdefdefgZdS)�FILETIMEZ dwLowDateTimeZdwHighDateTimeN)rrr�DWORDrrrrr r�src@s4eZdZdefdefdefdefdefdefgZ dS)�MSGZhWnd�messageZwParamZlParamZtimeZptN) rrr�HWND�UINT�WPARAM�LPARAMr rrrrrr r!�sr!ic@sTeZdZdefdefdefdefdefdefdefdefd eefd edfg ZdS) �WIN32_FIND_DATAA�dwFileAttributes�ftCreationTime�ftLastAccessTime�ftLastWriteTime� nFileSizeHigh�nFileSizeLow�dwReserved0�dwReserved1� cFileName�cAlternateFileName�N)rrrr r�CHAR�MAX_PATHrrrrr r'�s r'c@sTeZdZdefdefdefdefdefdefdefdefd eefd edfg ZdS) �WIN32_FIND_DATAWr(r)r*r+r,r-r.r/r0r1r2N)rrrr r�WCHARr4rrrrr r5�s r5)�ZctypesZc_byteZBYTEZc_ushortZWORDZc_ulongr Zc_charr3Zc_wcharr6Zc_uintr$Zc_intZINTZc_doubleZDOUBLEZc_floatZFLOATZBOOLEANZc_longZBOOLZ_SimpleCDatarZULONGrZUSHORTZc_shortrZ c_longlongZ_LARGE_INTEGERZ LARGE_INTEGERZc_ulonglongZ_ULARGE_INTEGERZULARGE_INTEGERZ c_wchar_pZ LPCOLESTRZLPOLESTRZOLESTRZLPCWSTRZLPWSTRZc_char_pZLPCSTRZLPSTRZc_void_pZLPCVOIDZLPVOIDZsizeofr%r&ZATOMZLANGIDZCOLORREFZLGRPIDZLCTYPEZLCIDZHANDLEZHACCELZHBITMAPZHBRUSHZHCOLORSPACEZHDCZHDESKZHDWPZHENHMETAFILEZHFONTZHGDIOBJZHGLOBALZHHOOKZHICONZ HINSTANCEZHKEYZHKLZHLOCALZHMENUZ HMETAFILEZHMODULEZHMONITORZHPALETTEZHPENZHRGNZHRSRCZHSTRZHTASKZHWINSTAr#Z SC_HANDLEZSERVICE_STATUS_HANDLEZ Structurer ZtagRECTZ_RECTLZRECTLrZ SMALL_RECTrrZtagPOINTZ_POINTLZPOINTLrZtagSIZEZSIZELrrZ _FILETIMEr!ZtagMSGr4r'r5ZPOINTERZLPBOOLZPBOOLZPBOOLEANZLPBYTEZPBYTEZPCHARZ LPCOLORREFZLPDWORDZPDWORDZ LPFILETIMEZ PFILETIMEZPFLOATZLPHANDLEZPHANDLEZPHKEYZLPHKLZLPINTZPINTZPLARGE_INTEGERZPLCIDZLPLONGZPLONGZLPMSGZPMSGZLPPOINTZPPOINTZPPOINTLZLPRECTZPRECTZLPRECTLZPRECTLZLPSC_HANDLEZPSHORTZLPSIZEZPSIZEZLPSIZELZPSIZELZPSMALL_RECTZLPUINTZPUINTZPULARGE_INTEGERZPULONGZPUSHORTZPWCHARZLPWIN32_FIND_DATAAZPWIN32_FIND_DATAAZLPWIN32_FIND_DATAWZPWIN32_FIND_DATAWZLPWORDZPWORDrrrr �<module>s� PKW}�\�����)__pycache__/wintypes.cpython-36.opt-2.pycnu�[���3 \��@sddlZejZejZejZejZej Z ejZej ZejZejZeZejZGdd�dej�ZejZejZejZejZejZZej Z!Z"ej#Z$Z%Z&ej#Z'Z(ej)Z*Z+ej,Z-Z.ej/ej�ej/ej,�kr�ejZ0ejZ1n$ej/ej�ej/ej,�kr�ej Z0ejZ1eZ2eZ3eZ4eZ5eZ6eZ7ej,Z8e8Z9e8Z:e8Z;e8Z<e8Z=e8Z>e8Z?e8Z@e8ZAe8ZBe8ZCe8ZDe8ZEe8ZFe8ZGe8ZHe8ZIe8ZJe8ZKe8ZLe8ZMe8ZNe8ZOe8ZPe8ZQe8ZRe8ZSe8ZTe8ZUe8ZVe8ZWGdd�dejX�ZYeYZZZ[Z\Gdd�dejX�Z]e]Z^Gdd �d ejX�Z_Gd d�dejX�Z`e`ZaZbZcGdd �d ejX�ZdedZeZfdd�ZgGdd�dejX�ZhehZiGdd�dejX�ZjejZkdZlGdd�dejX�ZmGdd�dejX�Znejoe�ZpZqejoe�Zrejoe�ZsZtejoe�Zuejoe4�Zvejoe�ZwZxejoeh�ZyZzejoe�Z{ejoe8�Z|Z}ejoeG�Z~ejoeH�Zejoe�Z�Z�ejoe�Z�ejoe7�Z�ejoe�Z�Z�ejoej�Z�Z�ejoe`�Z�Z�ejoec�Z�ejoeY�Z�Z�ejoe\�Z�Z�ejoeV�Z�ejoe�Z�ejoed�Z�Z�ejoef�Z�Z�ejoe^�Z�ejoe�Z�Z�ejoe"�Z�ejoe�Z�ejoe�Z�ejoe �Z�ejoem�Z�Z�ejoen�Z�Z�ejoe�Z�Z�dS)�Nc@seZdZdZdd�ZdS)�VARIANT_BOOL�vcCsd|jj|jfS)Nz%s(%r))� __class__�__name__�value)�self�r�'/usr/lib64/python3.6/ctypes/wintypes.py�__repr__szVARIANT_BOOL.__repr__N)r� __module__�__qualname__Z_type_r rrrr rsrc@s(eZdZdefdefdefdefgZdS)�RECT�left�top�rightZbottomN)rrr�LONG�_fields_rrrr r asr c@s(eZdZdefdefdefdefgZdS)�_SMALL_RECTZLeftZTopZRightZBottomN)rrr�SHORTrrrrr rhsrc@seZdZdefdefgZdS)�_COORD�X�YN)rrrrrrrrr rosrc@seZdZdefdefgZdS)�POINT�x�yN)rrrrrrrrr rssrc@seZdZdefdefgZdS)�SIZEZcxZcyN)rrrrrrrrr rxsrcCs||d>|d>S)N��r)ZredZgreenZbluerrr �RGB}src@seZdZdefdefgZdS)�FILETIMEZ dwLowDateTimeZdwHighDateTimeN)rrr�DWORDrrrrr r�src@s4eZdZdefdefdefdefdefdefgZ dS)�MSGZhWnd�messageZwParamZlParamZtimeZptN) rrr�HWND�UINT�WPARAM�LPARAMr rrrrrr r!�sr!ic@sTeZdZdefdefdefdefdefdefdefdefd eefd edfg ZdS) �WIN32_FIND_DATAA�dwFileAttributes�ftCreationTime�ftLastAccessTime�ftLastWriteTime� nFileSizeHigh�nFileSizeLow�dwReserved0�dwReserved1� cFileName�cAlternateFileName�N)rrrr r�CHAR�MAX_PATHrrrrr r'�s r'c@sTeZdZdefdefdefdefdefdefdefdefd eefd edfg ZdS) �WIN32_FIND_DATAWr(r)r*r+r,r-r.r/r0r1r2N)rrrr r�WCHARr4rrrrr r5�s r5)�ZctypesZc_byteZBYTEZc_ushortZWORDZc_ulongr Zc_charr3Zc_wcharr6Zc_uintr$Zc_intZINTZc_doubleZDOUBLEZc_floatZFLOATZBOOLEANZc_longZBOOLZ_SimpleCDatarZULONGrZUSHORTZc_shortrZ c_longlongZ_LARGE_INTEGERZ LARGE_INTEGERZc_ulonglongZ_ULARGE_INTEGERZULARGE_INTEGERZ c_wchar_pZ LPCOLESTRZLPOLESTRZOLESTRZLPCWSTRZLPWSTRZc_char_pZLPCSTRZLPSTRZc_void_pZLPCVOIDZLPVOIDZsizeofr%r&ZATOMZLANGIDZCOLORREFZLGRPIDZLCTYPEZLCIDZHANDLEZHACCELZHBITMAPZHBRUSHZHCOLORSPACEZHDCZHDESKZHDWPZHENHMETAFILEZHFONTZHGDIOBJZHGLOBALZHHOOKZHICONZ HINSTANCEZHKEYZHKLZHLOCALZHMENUZ HMETAFILEZHMODULEZHMONITORZHPALETTEZHPENZHRGNZHRSRCZHSTRZHTASKZHWINSTAr#Z SC_HANDLEZSERVICE_STATUS_HANDLEZ Structurer ZtagRECTZ_RECTLZRECTLrZ SMALL_RECTrrZtagPOINTZ_POINTLZPOINTLrZtagSIZEZSIZELrrZ _FILETIMEr!ZtagMSGr4r'r5ZPOINTERZLPBOOLZPBOOLZPBOOLEANZLPBYTEZPBYTEZPCHARZ LPCOLORREFZLPDWORDZPDWORDZ LPFILETIMEZ PFILETIMEZPFLOATZLPHANDLEZPHANDLEZPHKEYZLPHKLZLPINTZPINTZPLARGE_INTEGERZPLCIDZLPLONGZPLONGZLPMSGZPMSGZLPPOINTZPPOINTZPPOINTLZLPRECTZPRECTZLPRECTLZPRECTLZLPSC_HANDLEZPSHORTZLPSIZEZPSIZEZLPSIZELZPSIZELZPSMALL_RECTZLPUINTZPUINTZPULARGE_INTEGERZPULONGZPUSHORTZPWCHARZLPWIN32_FIND_DATAAZPWIN32_FIND_DATAAZLPWIN32_FIND_DATAWZPWIN32_FIND_DATAWZLPWORDZPWORDrrrr �<module>s� PKW}�\�����#__pycache__/wintypes.cpython-36.pycnu�[���3 \��@sddlZejZejZejZejZej Z ejZej ZejZejZeZejZGdd�dej�ZejZejZejZejZejZZej Z!Z"ej#Z$Z%Z&ej#Z'Z(ej)Z*Z+ej,Z-Z.ej/ej�ej/ej,�kr�ejZ0ejZ1n$ej/ej�ej/ej,�kr�ej Z0ejZ1eZ2eZ3eZ4eZ5eZ6eZ7ej,Z8e8Z9e8Z:e8Z;e8Z<e8Z=e8Z>e8Z?e8Z@e8ZAe8ZBe8ZCe8ZDe8ZEe8ZFe8ZGe8ZHe8ZIe8ZJe8ZKe8ZLe8ZMe8ZNe8ZOe8ZPe8ZQe8ZRe8ZSe8ZTe8ZUe8ZVe8ZWGdd�dejX�ZYeYZZZ[Z\Gdd�dejX�Z]e]Z^Gdd �d ejX�Z_Gd d�dejX�Z`e`ZaZbZcGdd �d ejX�ZdedZeZfdd�ZgGdd�dejX�ZhehZiGdd�dejX�ZjejZkdZlGdd�dejX�ZmGdd�dejX�Znejoe�ZpZqejoe�Zrejoe�ZsZtejoe�Zuejoe4�Zvejoe�ZwZxejoeh�ZyZzejoe�Z{ejoe8�Z|Z}ejoeG�Z~ejoeH�Zejoe�Z�Z�ejoe�Z�ejoe7�Z�ejoe�Z�Z�ejoej�Z�Z�ejoe`�Z�Z�ejoec�Z�ejoeY�Z�Z�ejoe\�Z�Z�ejoeV�Z�ejoe�Z�ejoed�Z�Z�ejoef�Z�Z�ejoe^�Z�ejoe�Z�Z�ejoe"�Z�ejoe�Z�ejoe�Z�ejoe �Z�ejoem�Z�Z�ejoen�Z�Z�ejoe�Z�Z�dS)�Nc@seZdZdZdd�ZdS)�VARIANT_BOOL�vcCsd|jj|jfS)Nz%s(%r))� __class__�__name__�value)�self�r�'/usr/lib64/python3.6/ctypes/wintypes.py�__repr__szVARIANT_BOOL.__repr__N)r� __module__�__qualname__Z_type_r rrrr rsrc@s(eZdZdefdefdefdefgZdS)�RECT�left�top�rightZbottomN)rrr�LONG�_fields_rrrr r asr c@s(eZdZdefdefdefdefgZdS)�_SMALL_RECTZLeftZTopZRightZBottomN)rrr�SHORTrrrrr rhsrc@seZdZdefdefgZdS)�_COORD�X�YN)rrrrrrrrr rosrc@seZdZdefdefgZdS)�POINT�x�yN)rrrrrrrrr rssrc@seZdZdefdefgZdS)�SIZEZcxZcyN)rrrrrrrrr rxsrcCs||d>|d>S)N��r)ZredZgreenZbluerrr �RGB}src@seZdZdefdefgZdS)�FILETIMEZ dwLowDateTimeZdwHighDateTimeN)rrr�DWORDrrrrr r�src@s4eZdZdefdefdefdefdefdefgZ dS)�MSGZhWnd�messageZwParamZlParamZtimeZptN) rrr�HWND�UINT�WPARAM�LPARAMr rrrrrr r!�sr!ic@sTeZdZdefdefdefdefdefdefdefdefd eefd edfg ZdS) �WIN32_FIND_DATAA�dwFileAttributes�ftCreationTime�ftLastAccessTime�ftLastWriteTime� nFileSizeHigh�nFileSizeLow�dwReserved0�dwReserved1� cFileName�cAlternateFileName�N)rrrr r�CHAR�MAX_PATHrrrrr r'�s r'c@sTeZdZdefdefdefdefdefdefdefdefd eefd edfg ZdS) �WIN32_FIND_DATAWr(r)r*r+r,r-r.r/r0r1r2N)rrrr r�WCHARr4rrrrr r5�s r5)�ZctypesZc_byteZBYTEZc_ushortZWORDZc_ulongr Zc_charr3Zc_wcharr6Zc_uintr$Zc_intZINTZc_doubleZDOUBLEZc_floatZFLOATZBOOLEANZc_longZBOOLZ_SimpleCDatarZULONGrZUSHORTZc_shortrZ c_longlongZ_LARGE_INTEGERZ LARGE_INTEGERZc_ulonglongZ_ULARGE_INTEGERZULARGE_INTEGERZ c_wchar_pZ LPCOLESTRZLPOLESTRZOLESTRZLPCWSTRZLPWSTRZc_char_pZLPCSTRZLPSTRZc_void_pZLPCVOIDZLPVOIDZsizeofr%r&ZATOMZLANGIDZCOLORREFZLGRPIDZLCTYPEZLCIDZHANDLEZHACCELZHBITMAPZHBRUSHZHCOLORSPACEZHDCZHDESKZHDWPZHENHMETAFILEZHFONTZHGDIOBJZHGLOBALZHHOOKZHICONZ HINSTANCEZHKEYZHKLZHLOCALZHMENUZ HMETAFILEZHMODULEZHMONITORZHPALETTEZHPENZHRGNZHRSRCZHSTRZHTASKZHWINSTAr#Z SC_HANDLEZSERVICE_STATUS_HANDLEZ Structurer ZtagRECTZ_RECTLZRECTLrZ SMALL_RECTrrZtagPOINTZ_POINTLZPOINTLrZtagSIZEZSIZELrrZ _FILETIMEr!ZtagMSGr4r'r5ZPOINTERZLPBOOLZPBOOLZPBOOLEANZLPBYTEZPBYTEZPCHARZ LPCOLORREFZLPDWORDZPDWORDZ LPFILETIMEZ PFILETIMEZPFLOATZLPHANDLEZPHANDLEZPHKEYZLPHKLZLPINTZPINTZPLARGE_INTEGERZPLCIDZLPLONGZPLONGZLPMSGZPMSGZLPPOINTZPPOINTZPPOINTLZLPRECTZPRECTZLPRECTLZPRECTLZLPSC_HANDLEZPSHORTZLPSIZEZPSIZEZLPSIZELZPSIZELZPSMALL_RECTZLPUINTZPUINTZPULARGE_INTEGERZPULONGZPUSHORTZPWCHARZLPWIN32_FIND_DATAAZPWIN32_FIND_DATAAZLPWIN32_FIND_DATAWZPWIN32_FIND_DATAWZLPWORDZPWORDrrrr �<module>s� PKW}�\m^hz%%2macholib/__pycache__/__init__.cpython-36.opt-1.pycnu�[���3 \��@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�0/usr/lib64/python3.6/ctypes/macholib/__init__.py�<module>sPKW}�\M�����2macholib/__pycache__/__init__.cpython-36.opt-2.pycnu�[���3 \��@sdZdS)z1.0N)�__version__�rr�0/usr/lib64/python3.6/ctypes/macholib/__init__.py�<module> sPKW}�\m^hz%%,macholib/__pycache__/__init__.cpython-36.pycnu�[���3 \��@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�0/usr/lib64/python3.6/ctypes/macholib/__init__.py�<module>sPKW}�\��AA.macholib/__pycache__/dyld.cpython-36.opt-1.pycnu�[���3 \E�@s�dZddlZddlmZddlmZddlTdddd gZejj d �ddd gZ ejj d�dddgZdd�Zd+dd�Z d,dd�Zd-dd�Zd.dd�Zd/dd�Zd0dd�Zd1d d!�Zd2d"d#�Zd3d$d%�Zd4d&d�Zd5d'd�Zd(d)�Zed*k�r�e�dS)6z dyld emulation �N)�framework_info)� dylib_info)�*� dyld_find�framework_findrrz~/Library/Frameworksz/Library/Frameworksz/Network/Library/Frameworksz/System/Library/Frameworksz~/libz/usr/local/libz/libz/usr/libcCs.|dkrtj}|j|�}|dkr$gS|jd�S)N�:)�os�environ�get�split)�env�varZrval�r�,/usr/lib64/python3.6/ctypes/macholib/dyld.py�dyld_envs rcCs|dkrtj}|jd�S)NZDYLD_IMAGE_SUFFIX)rr r )rrrr�dyld_image_suffix'srcCs t|d�S)NZDYLD_FRAMEWORK_PATH)r)rrrr�dyld_framework_path,srcCs t|d�S)NZDYLD_LIBRARY_PATH)r)rrrr�dyld_library_path/srcCs t|d�S)NZDYLD_FALLBACK_FRAMEWORK_PATH)r)rrrr�dyld_fallback_framework_path2srcCs t|d�S)NZDYLD_FALLBACK_LIBRARY_PATH)r)rrrr�dyld_fallback_library_path5srcCs(t|�}|dkr|S||fdd�}|�S)z>For a potential path iterator, add DYLD_IMAGE_SUFFIX semanticsNcssJxD|D]<}|jd�r2|dtd��|dVn ||V|VqWdS)Nz.dylib)�endswith�len)�iterator�suffix�pathrrr�_inject=s z)dyld_image_suffix_search.<locals>._inject)r)rrrrrrr�dyld_image_suffix_search8s rccsdt|�}|dk r6x$t|�D]}tjj||d�VqWx(t|�D]}tjj|tjj|��Vq@WdS)N�name)rrrr�joinr�basename)rr� frameworkrrrr�dyld_override_searchFsr!ccs2|jd�r.|dk r.tjj||td�d��VdS)Nz@executable_path/)� startswithrrrr)r�executable_pathrrr�dyld_executable_path_searchWsr$ccs�|Vt|�}|dk r@t|�}x |D]}tjj||d�Vq$Wt|�}x$|D]}tjj|tjj|��VqNW|dk r�|r�x tD]}tjj||d�Vq�W|s�x$tD]}tjj|tjj|��Vq�WdS)Nr) rrrrrrr�DEFAULT_FRAMEWORK_FALLBACK�DEFAULT_LIBRARY_FALLBACK)rrr Zfallback_framework_pathrZfallback_library_pathrrr�dyld_default_search^s r'cCsPx<ttt||�t||�t||��|�D]}tjj|�r&|Sq&Wtd|f��dS)z: Find a library or framework using dyld semantics zdylib %s could not be foundN) r�chainr!r$r'rr�isfile� ValueError)rr#rrrrrrts cCs�d}yt|||d�Stk r8}z |}WYdd}~XnX|jd�}|dkr\t|�}|d7}tjj|tjj|d|���}yt|||d�Stk 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 N)r#rz .framework����)rr*�rfindrrrrr)�fnr#r�error�eZ fmwk_indexrrrr�s cCsi}dS)Nr)rrrr�test_dyld_find�sr1�__main__)N)N)N)N)N)N)N)N)N)NN)NN)�__doc__rZctypes.macholib.frameworkrZctypes.macholib.dylibr� itertools�__all__r� expanduserr%r&rrrrrrrr!r$r'rrr1�__name__rrrr�<module>s: PKW}�\����.macholib/__pycache__/dyld.cpython-36.opt-2.pycnu�[���3 \E�@s�ddlZddlmZddlmZddlTddddgZejjd �d ddgZ ejjd �dddgZ dd�Zd*dd�Zd+dd�Z d,dd�Zd-dd�Zd.dd�Zd/dd�Zd0dd �Zd1d!d"�Zd2d#d$�Zd3d%d�Zd4d&d�Zd'd(�Zed)k�r�e�dS)5�N)�framework_info)� dylib_info)�*� dyld_find�framework_findrrz~/Library/Frameworksz/Library/Frameworksz/Network/Library/Frameworksz/System/Library/Frameworksz~/libz/usr/local/libz/libz/usr/libcCs.|dkrtj}|j|�}|dkr$gS|jd�S)N�:)�os�environ�get�split)�env�varZrval�r�,/usr/lib64/python3.6/ctypes/macholib/dyld.py�dyld_envs rcCs|dkrtj}|jd�S)NZDYLD_IMAGE_SUFFIX)rr r )rrrr�dyld_image_suffix'srcCs t|d�S)NZDYLD_FRAMEWORK_PATH)r)rrrr�dyld_framework_path,srcCs t|d�S)NZDYLD_LIBRARY_PATH)r)rrrr�dyld_library_path/srcCs t|d�S)NZDYLD_FALLBACK_FRAMEWORK_PATH)r)rrrr�dyld_fallback_framework_path2srcCs t|d�S)NZDYLD_FALLBACK_LIBRARY_PATH)r)rrrr�dyld_fallback_library_path5srcCs(t|�}|dkr|S||fdd�}|�S)NcssJxD|D]<}|jd�r2|dtd��|dVn ||V|VqWdS)Nz.dylib)�endswith�len)�iterator�suffix�pathrrr�_inject=s z)dyld_image_suffix_search.<locals>._inject)r)rrrrrrr�dyld_image_suffix_search8s rccsdt|�}|dk r6x$t|�D]}tjj||d�VqWx(t|�D]}tjj|tjj|��Vq@WdS)N�name)rrrr�joinr�basename)rr� frameworkrrrr�dyld_override_searchFsr!ccs2|jd�r.|dk r.tjj||td�d��VdS)Nz@executable_path/)� startswithrrrr)r�executable_pathrrr�dyld_executable_path_searchWsr$ccs�|Vt|�}|dk r@t|�}x |D]}tjj||d�Vq$Wt|�}x$|D]}tjj|tjj|��VqNW|dk r�|r�x tD]}tjj||d�Vq�W|s�x$tD]}tjj|tjj|��Vq�WdS)Nr) rrrrrrr�DEFAULT_FRAMEWORK_FALLBACK�DEFAULT_LIBRARY_FALLBACK)rrr Zfallback_framework_pathrZfallback_library_pathrrr�dyld_default_search^s r'cCsPx<ttt||�t||�t||��|�D]}tjj|�r&|Sq&Wtd|f��dS)Nzdylib %s could not be found) r�chainr!r$r'rr�isfile� ValueError)rr#rrrrrrts cCs�d}yt|||d�Stk r8}z |}WYdd}~XnX|jd�}|dkr\t|�}|d7}tjj|tjj|d|���}yt|||d�Stk r�|�YnXdS)N)r#rz .framework����)rr*�rfindrrrrr)�fnr#r�error�eZ fmwk_indexrrrr�s cCsi}dS)Nr)rrrr�test_dyld_find�sr1�__main__)N)N)N)N)N)N)N)N)N)NN)NN)rZctypes.macholib.frameworkrZctypes.macholib.dylibr� itertools�__all__r� expanduserr%r&rrrrrrrr!r$r'rrr1�__name__rrrr�<module>s8 PKW}�\���"��(macholib/__pycache__/dyld.cpython-36.pycnu�[���3 \E�@s�dZddlZddlmZddlmZddlTdddd gZejj d �ddd gZ ejj d�dddgZdd�Zd+dd�Z d,dd�Zd-dd�Zd.dd�Zd/dd�Zd0dd�Zd1d d!�Zd2d"d#�Zd3d$d%�Zd4d&d�Zd5d'd�Zd(d)�Zed*k�r�e�dS)6z dyld emulation �N)�framework_info)� dylib_info)�*� dyld_find�framework_findrrz~/Library/Frameworksz/Library/Frameworksz/Network/Library/Frameworksz/System/Library/Frameworksz~/libz/usr/local/libz/libz/usr/libcCs.|dkrtj}|j|�}|dkr$gS|jd�S)N�:)�os�environ�get�split)�env�varZrval�r�,/usr/lib64/python3.6/ctypes/macholib/dyld.py�dyld_envs rcCs|dkrtj}|jd�S)NZDYLD_IMAGE_SUFFIX)rr r )rrrr�dyld_image_suffix'srcCs t|d�S)NZDYLD_FRAMEWORK_PATH)r)rrrr�dyld_framework_path,srcCs t|d�S)NZDYLD_LIBRARY_PATH)r)rrrr�dyld_library_path/srcCs t|d�S)NZDYLD_FALLBACK_FRAMEWORK_PATH)r)rrrr�dyld_fallback_framework_path2srcCs t|d�S)NZDYLD_FALLBACK_LIBRARY_PATH)r)rrrr�dyld_fallback_library_path5srcCs(t|�}|dkr|S||fdd�}|�S)z>For a potential path iterator, add DYLD_IMAGE_SUFFIX semanticsNcssJxD|D]<}|jd�r2|dtd��|dVn ||V|VqWdS)Nz.dylib)�endswith�len)�iterator�suffix�pathrrr�_inject=s z)dyld_image_suffix_search.<locals>._inject)r)rrrrrrr�dyld_image_suffix_search8s rccsdt|�}|dk r6x$t|�D]}tjj||d�VqWx(t|�D]}tjj|tjj|��Vq@WdS)N�name)rrrr�joinr�basename)rr� frameworkrrrr�dyld_override_searchFsr!ccs2|jd�r.|dk r.tjj||td�d��VdS)Nz@executable_path/)� startswithrrrr)r�executable_pathrrr�dyld_executable_path_searchWsr$ccs�|Vt|�}|dk r@t|�}x |D]}tjj||d�Vq$Wt|�}x$|D]}tjj|tjj|��VqNW|dk r�|r�x tD]}tjj||d�Vq�W|s�x$tD]}tjj|tjj|��Vq�WdS)Nr) rrrrrrr�DEFAULT_FRAMEWORK_FALLBACK�DEFAULT_LIBRARY_FALLBACK)rrr Zfallback_framework_pathrZfallback_library_pathrrr�dyld_default_search^s r'cCsPx<ttt||�t||�t||��|�D]}tjj|�r&|Sq&Wtd|f��dS)z: Find a library or framework using dyld semantics zdylib %s could not be foundN) r�chainr!r$r'rr�isfile� ValueError)rr#rrrrrrts cCs�d}yt|||d�Stk r8}z |}WYdd}~XnX|jd�}|dkr\t|�}|d7}tjj|tjj|d|���}yt|||d�Stk 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 N)r#rz .framework����)rr*�rfindrrrrr)�fnr#r�error�eZ fmwk_indexrrrr�s cCs(i}td�dkst�td�dks$t�dS)NzlibSystem.dylibz/usr/lib/libSystem.dylibzSystem.framework/Systemz2/System/Library/Frameworks/System.framework/System)r�AssertionError)rrrr�test_dyld_find�sr2�__main__)N)N)N)N)N)N)N)N)N)NN)NN)�__doc__rZctypes.macholib.frameworkrZctypes.macholib.dylibr� itertools�__all__r� expanduserr%r&rrrrrrrr!r$r'rrr2�__name__rrrr�<module>s: PKW}�\��.��/macholib/__pycache__/dylib.cpython-36.opt-1.pycnu�[���3 \$�@s>dZddlZdgZejd�Zdd�Zdd�Zedkr:e�dS) z! Generic dylib path manipulation �N� dylib_infoz�(?x) (?P<location>^.*)(?:^|/) (?P<name> (?P<shortname>\w+?) (?:\.(?P<version>[^._]+))? (?:_(?P<suffix>[^._]+))? \.dylib$ ) cCstj|�}|sdS|j�S)a1 A dylib name can take one of the following four forms: Location/Name.SomeVersion_Suffix.dylib Location/Name.SomeVersion.dylib Location/Name_Suffix.dylib Location/Name.dylib returns None if not found or a mapping equivalent to: dict( location='Location', name='Name.SomeVersion_Suffix.dylib', shortname='Name', version='SomeVersion', suffix='Suffix', ) Note that SomeVersion and Suffix are optional and may be None if not present. N)�DYLIB_RE�match� groupdict)�filenameZis_dylib�r�-/usr/lib64/python3.6/ctypes/macholib/dylib.pyrs cCsddd�}dS)NcSst|||||d�S)N)�location�name� shortname�version�suffix)�dict)r r rrr rrr�d.sztest_dylib_info.<locals>.d)NNNNNr)rrrr�test_dylib_info-s r�__main__)�__doc__�re�__all__�compilerrr�__name__rrrr�<module>sPKW}�\Η14[[/macholib/__pycache__/dylib.cpython-36.opt-2.pycnu�[���3 \$�@s:ddlZdgZejd�Zdd�Zdd�Zedkr6e�dS)�N� dylib_infoz�(?x) (?P<location>^.*)(?:^|/) (?P<name> (?P<shortname>\w+?) (?:\.(?P<version>[^._]+))? (?:_(?P<suffix>[^._]+))? \.dylib$ ) cCstj|�}|sdS|j�S)N)�DYLIB_RE�match� groupdict)�filenameZis_dylib�r�-/usr/lib64/python3.6/ctypes/macholib/dylib.pyrs cCsddd�}dS)NcSst|||||d�S)N)�location�name� shortname�version�suffix)�dict)r r rrr rrr�d.sztest_dylib_info.<locals>.d)NNNNNr)rrrr�test_dylib_info-s r�__main__)�re�__all__�compilerrr�__name__rrrr�<module>sPKW}�\*S+��)macholib/__pycache__/dylib.cpython-36.pycnu�[���3 \$�@s>dZddlZdgZejd�Zdd�Zdd�Zedkr:e�dS) z! Generic dylib path manipulation �N� dylib_infoz�(?x) (?P<location>^.*)(?:^|/) (?P<name> (?P<shortname>\w+?) (?:\.(?P<version>[^._]+))? (?:_(?P<suffix>[^._]+))? \.dylib$ ) cCstj|�}|sdS|j�S)a1 A dylib name can take one of the following four forms: Location/Name.SomeVersion_Suffix.dylib Location/Name.SomeVersion.dylib Location/Name_Suffix.dylib Location/Name.dylib returns None if not found or a mapping equivalent to: dict( location='Location', name='Name.SomeVersion_Suffix.dylib', shortname='Name', version='SomeVersion', suffix='Suffix', ) Note that SomeVersion and Suffix are optional and may be None if not present. N)�DYLIB_RE�match� groupdict)�filenameZis_dylib�r�-/usr/lib64/python3.6/ctypes/macholib/dylib.pyrs cCs�ddd�}td�dkst�td�dks*t�td�|ddd�ksBt�td �|dd ddd�ks^t�td �|dddd�ksxt�td�|dddd�ks�t�td�|ddddd�ks�t�dS)NcSst|||||d�S)N)�location�name� shortname�version�suffix)�dict)r r rrr rrr�d.sztest_dylib_info.<locals>.dzcompletely/invalidzcompletely/invalide_debugzP/Foo.dylib�Pz Foo.dylibZFoozP/Foo_debug.dylibzFoo_debug.dylib�debug)r z P/Foo.A.dylibzFoo.A.dylib�AzP/Foo_debug.A.dylibzFoo_debug.A.dylibZ Foo_debugzP/Foo.A_debug.dylibzFoo.A_debug.dylib)NNNNN)r�AssertionError)rrrr�test_dylib_info-s r�__main__)�__doc__�re�__all__�compilerrr�__name__rrrr�<module>sPKW}�\ �9rII3macholib/__pycache__/framework.cpython-36.opt-1.pycnu�[���3 \��@s>dZddlZdgZejd�Zdd�Zdd�Zedkr:e�dS) z% Generic framework path manipulation �N�framework_infoz�(?x) (?P<location>^.*)(?:^|/) (?P<name> (?P<shortname>\w+).framework/ (?:Versions/(?P<version>[^/]+)/)? (?P=shortname) (?:_(?P<suffix>[^_]+))? )$ cCstj|�}|sdS|j�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_RE�match� groupdict)�filenameZis_framework�r�1/usr/lib64/python3.6/ctypes/macholib/framework.pyrs cCsddd�}dS)NcSst|||||d�S)N)�location�name� shortname�version�suffix)�dict)r r rrr rrr�d-sztest_framework_info.<locals>.d)NNNNNr)rrrr�test_framework_info,s r�__main__)�__doc__�re�__all__�compilerrr�__name__rrrr�<module>sPKW}�\K�W��3macholib/__pycache__/framework.cpython-36.opt-2.pycnu�[���3 \��@s:ddlZdgZejd�Zdd�Zdd�Zedkr6e�dS)�N�framework_infoz�(?x) (?P<location>^.*)(?:^|/) (?P<name> (?P<shortname>\w+).framework/ (?:Versions/(?P<version>[^/]+)/)? (?P=shortname) (?:_(?P<suffix>[^_]+))? )$ cCstj|�}|sdS|j�S)N)�STRICT_FRAMEWORK_RE�match� groupdict)�filenameZis_framework�r�1/usr/lib64/python3.6/ctypes/macholib/framework.pyrs cCsddd�}dS)NcSst|||||d�S)N)�location�name� shortname�version�suffix)�dict)r r rrr rrr�d-sztest_framework_info.<locals>.d)NNNNNr)rrrr�test_framework_info,s r�__main__)�re�__all__�compilerrr�__name__rrrr�<module>sPKW}�\>5ʘ�-macholib/__pycache__/framework.cpython-36.pycnu�[���3 \��@s>dZddlZdgZejd�Zdd�Zdd�Zedkr:e�dS) z% Generic framework path manipulation �N�framework_infoz�(?x) (?P<location>^.*)(?:^|/) (?P<name> (?P<shortname>\w+).framework/ (?:Versions/(?P<version>[^/]+)/)? (?P=shortname) (?:_(?P<suffix>[^_]+))? )$ cCstj|�}|sdS|j�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_RE�match� groupdict)�filenameZis_framework�r�1/usr/lib64/python3.6/ctypes/macholib/framework.pyrs cCs�ddd�}td�dkst�td�dks*t�td�dks:t�td�dksJt�td�|dd d �ksbt�td�|ddd d d�ks~t�td�dks�t�td�dks�t�td�|ddd d�ks�t�td�|ddd dd �ks�t�dS)NcSst|||||d�S)N)�location�name� shortname�version�suffix)�dict)r r rrr rrr�d-sztest_framework_info.<locals>.dzcompletely/invalidzcompletely/invalid/_debugz P/F.frameworkzP/F.framework/_debugzP/F.framework/F�Pz F.framework/F�FzP/F.framework/F_debugzF.framework/F_debug�debug)r zP/F.framework/VersionszP/F.framework/Versions/AzP/F.framework/Versions/A/FzF.framework/Versions/A/F�Az P/F.framework/Versions/A/F_debugzF.framework/Versions/A/F_debug)NNNNN)r�AssertionError)rrrr�test_framework_info,s r�__main__)�__doc__�re�__all__�compilerrr�__name__rrrr�<module>sPK(��\J���((macholib/README.ctypesnu�[���PK(��\t7y���nmacholib/__init__.pynu�[���PK(��\}�`�<<Lmacholib/__init__.pycnu�[���PK(��\}�`�<<�macholib/__init__.pyonu�[���PK(��\�;�kEENmacholib/dyld.pynu�[���PK(��\ʆ�W���macholib/dyld.pycnu�[���PK(��\d/����/macholib/dyld.pyonu�[���PK(��\6z�$$�Emacholib/dylib.pynu�[���PK(��\� @� "Mmacholib/dylib.pycnu�[���PK(��\������oVmacholib/dylib.pyonu�[���PK(��\K CTTv]macholib/fetch_macholibnuȯ��PK(��\� Hd��^macholib/framework.pynu�[���PK(��\�7�|A A �fmacholib/framework.pycnu�[���PK(��\"�SSvqmacholib/framework.pyonu�[���PK(��\l�q�1@1@y__init__.pynu�[���PK(��\�����N�N{�__init__.pycnu�[���PK(��\�����N�N�__init__.pyonu�[���PK(��\Gƻ7�� �W_endian.pynu�[���PK(��\�� � �__endian.pycnu�[���PK(��\�� � i_endian.pyonu�[���PK(��\S+�]�-�-Arutil.pynu�[���PK(��\�wV� ) )]�util.py.binutils-no-depnu�[���PK(��\=�*0g!g!��util.pycnu�[���PK(��\=�*0g!g!c�util.pyonu�[���PK(��\��� wintypes.pynu�[���PK(��\H�CC9#wintypes.pycnu�[���PK(��\H�CC�:wintypes.pyonu�[���PKW}�\�-V�5>5>)7R__pycache__/__init__.cpython-36.opt-1.pycnu�[���PKW}�\D��Y5Y5)Ő__pycache__/__init__.cpython-36.opt-2.pycnu�[���PKW}�\�-V�5>5>#w�__pycache__/__init__.cpython-36.pycnu�[���PKW}�\��pY��(�__pycache__/_endian.cpython-36.opt-1.pycnu�[���PKW}�\��.,,(�__pycache__/_endian.cpython-36.opt-2.pycnu�[���PKW}�\��pY��"a__pycache__/_endian.cpython-36.pycnu�[���PKW}�\�<<%9__pycache__/util.cpython-36.opt-1.pycnu�[���PKW}�\exB[DD%�7__pycache__/util.cpython-36.opt-2.pycnu�[���PKW}�\�<<cS__pycache__/util.cpython-36.pycnu�[���PKW}�\�����)�o__pycache__/wintypes.cpython-36.opt-1.pycnu�[���PKW}�\�����)0�__pycache__/wintypes.cpython-36.opt-2.pycnu�[���PKW}�\�����#r�__pycache__/wintypes.cpython-36.pycnu�[���PKW}�\m^hz%%2��macholib/__pycache__/__init__.cpython-36.opt-1.pycnu�[���PKW}�\M�����25�macholib/__pycache__/__init__.cpython-36.opt-2.pycnu�[���PKW}�\m^hz%%,-�macholib/__pycache__/__init__.cpython-36.pycnu�[���PKW}�\��AA.��macholib/__pycache__/dyld.cpython-36.opt-1.pycnu�[���PKW}�\����.M�macholib/__pycache__/dyld.cpython-36.opt-2.pycnu�[���PKW}�\���"��(��macholib/__pycache__/dyld.cpython-36.pycnu�[���PKW}�\��.��/��macholib/__pycache__/dylib.cpython-36.opt-1.pycnu�[���PKW}�\Η14[[/��macholib/__pycache__/dylib.cpython-36.opt-2.pycnu�[���PKW}�\*S+��)��macholib/__pycache__/dylib.cpython-36.pycnu�[���PKW}�\ �9rII3��macholib/__pycache__/framework.cpython-36.opt-1.pycnu�[���PKW}�\K�W��3<�macholib/__pycache__/framework.cpython-36.opt-2.pycnu�[���PKW}�\>5ʘ�-0�macholib/__pycache__/framework.cpython-36.pycnu�[���PK33Z%
/home/emeraadmin/www/node_modules/liftup/../map-cache/../../4d695/ctypes.zip