init
This commit is contained in:
@ -33,12 +33,12 @@ class ClassCh341:
|
||||
|
||||
def init(self):
|
||||
if os.name == 'nt': # Windows 环境
|
||||
libPath = os.path.dirname(sys.argv[0]) + r'/lib/ch341/CH341DLLA64.DLL'
|
||||
libPath = os.path.join(os.path.dirname(__file__), 'lib/ch341/CH341DLLA64.DLL')
|
||||
elif os.name == 'posix':
|
||||
libPath = './lib/ch341/libch347.so'
|
||||
libPath = os.path.join(os.path.dirname(__file__), 'lib/ch341/libch347.so')
|
||||
dllExist = os.path.exists(libPath)
|
||||
if not dllExist:
|
||||
print('未找到库文件')
|
||||
print('未找到库文件:', libPath)
|
||||
return False
|
||||
else:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user