<s> """<STR_LIT>""" <EOL> __version__ = "<STR_LIT>" <EOL> import os . path <EOL> import platform <EOL> import sys , imp , os <EOL> import ctypes <EOL> def platform_specific_functions ( ) : <EOL> d = { '<STR_LIT>' : ctypes . cdll <EOL> , '<STR_LIT>' : ctypes . CFUNCTYPE <EOL> } <EOL> if platform . system ( ) in ( '<STR_LIT>' , '<STR_LIT>' ) : <EOL> pass <EOL> return d <EOL> def load_library ( libname , debug_lib = True ) : <EOL> s = platform . system ( ) <EOL> arch = str ( ctypes . sizeof ( ctypes . c_voidp ) * <NUM_LIT:8> ) <EOL> path = os . path . dirname ( os . path . abspath ( __file__ ) ) <EOL> try : <EOL> if hasattr ( sys , "<STR_LIT>" ) or hasattr ( sys , "<STR_LIT>" ) or hasattr ( imp , "<STR_LIT>" ) and imp . is_forzen ( "<STR_LIT:__main__>" ) : <EOL> if '<STR_LIT>' in __file__ : <EOL> path = os . path . join ( os . path . dirname ( os . getcwd ( ) ) , '<STR_LIT>' ) <EOL> else : <EOL> path = os . path . dirname ( os . path . abspath ( sys . executable ) ) <EOL> except : <EOL> pass <EOL> if arch == "<STR_LIT>" : <EOL> arch_param = "<STR_LIT>" <EOL> else : <EOL> arch_param = "<STR_LIT>" <EOL> if s in ( '<STR_LIT>' , '<STR_LIT>' ) : <EOL> libfn = "<STR_LIT>" % ( libname , arch_param ) <EOL> elif s in ( '<STR_LIT>' , '<STR_LIT>' ) : <EOL> if arch == "<STR_LIT>" and debug_lib : <EOL> print ( """<STR_LIT>""" ) <EOL> libfn = "<STR_LIT>" % ( libname , arch_param ) <EOL> elif s == '<STR_LIT>' : <EOL> libfn = "<STR_LIT>" % libname <EOL> else : <EOL> libfn = "<STR_LIT>" % libname <EOL> libfn = os . path . join ( path , libfn ) <EOL> if debug_lib : <EOL> print ( "<STR_LIT>" % ( s , arch , libfn ) ) <EOL> try : <EOL> lib = platform_specific_functions ( ) [ '<STR_LIT>' ] . LoadLibrary ( libfn ) <EOL> except OSError : <EOL> print ( """<STR_LIT>""" ) <EOL> raise <EOL> return lib </s>
