This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sys import platform | |
from ctypes import cdll, CDLL | |
from ctypes import sizeof, c_void_p | |
def loadlibrary(name): | |
'''loads library "name[32/64/...][.dll/.so]" depending on platform''' | |
return CDLL((name+"{}{}").format(sizeof(c_void_p)*8, "" if platform=="win32" else ".so")) |
NewerOlder