示例#1
0
 def __init__(self):
  self.is_32bit = platform.architecture()[0] == "32bit"
  if self.lib32 and self.is_32bit:
   self.lib = load_library(self.lib32, cdll=self.cdll)
  elif self.lib64:
   self.lib = load_library(self.lib64, cdll=self.cdll)
  else:
   self.lib = None
示例#2
0
文件: base.py 项目: TWBlueQS/TWBlueQS
 def __init__(self):
  self.is_32bit = platform.architecture()[0] == "32bit"
  if self.lib32 and self.is_32bit:
   self.lib = load_library(self.lib32, cdll=self.cdll)
  elif self.lib64:
   self.lib = load_library(self.lib64, cdll=self.cdll)
  else:
   self.lib = None
  if self.lib is not None:
   for func in self.argtypes:
    try:
     getattr(self.lib, func).argtypes = self.argtypes[func]
    except AttributeError:
     pass
示例#3
0
 def __init__(self):
     self.is_32bit = platform.architecture()[0] == "32bit"
     if self.lib32 and self.is_32bit:
         self.lib = load_library(self.lib32, cdll=self.cdll)
     elif self.lib64:
         self.lib = load_library(self.lib64, cdll=self.cdll)
     else:
         self.lib = None
     if self.lib is not None:
         for func in self.argtypes:
             try:
                 getattr(self.lib, func).argtypes = self.argtypes[func]
             except AttributeError:
                 pass
示例#4
0
 def __init__(self):
  is_32bit = platform.architecture()[0] == "32bit"
  if self.lib32 and is_32bit:
   self.lib = load_library(self.lib32)
  elif self.lib64:
   self.lib = load_library(self.lib64)