TSMasterAPI 2.2.12__tar.gz → 2.2.13__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,8 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: TSMasterAPI
3
- Version: 2.2.12
3
+ Version: 2.2.13
4
4
  Summary: Use TSMaster hardware
5
+ Home-page: UNKNOWN
5
6
  Author: seven
6
7
  Author-email: 865762826@qq.com
7
8
  License: BSD License
@@ -29,3 +30,5 @@ Can only be used by WIN32 Python
29
30
  [联系作者](865762826@qq.com)
30
31
 
31
32
  to write your content.
33
+
34
+
@@ -7,21 +7,29 @@ LastEditTime: 2023-11-22 10:26:17
7
7
  from ctypes import WinDLL
8
8
  import os
9
9
  import winreg
10
-
10
+ import platform
11
11
 
12
12
  TSMaster_location = r"Software\TOSUN\TSMaster"
13
13
 
14
14
  key = winreg.OpenKey(winreg.HKEY_CURRENT_USER, TSMaster_location)
15
15
 
16
+ _arch, _os = platform.architecture()
17
+
16
18
  i = 0
17
19
  dll_path = ''
18
20
  while True:
19
21
  try:
22
+ if _arch == '32bit':
20
23
  # 获取注册表对应位置的键和值
21
- if winreg.EnumValue(key, i)[0] == 'libTSMaster_x86':
22
- dll_path = winreg.EnumValue(key, i)[1]
23
- winreg.CloseKey(key)
24
- break
24
+ if winreg.EnumValue(key, i)[0] == 'libTSMaster_x86':
25
+ dll_path = winreg.EnumValue(key, i)[1]
26
+ winreg.CloseKey(key)
27
+ break
28
+ else:
29
+ if winreg.EnumValue(key, i)[0] == 'libTSMaster_x64':
30
+ dll_path = winreg.EnumValue(key, i)[1]
31
+ winreg.CloseKey(key)
32
+ break
25
33
  i += 1
26
34
  except OSError as error:
27
35
  # 一定要关闭这个键
@@ -1,7 +1,8 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: TSMasterAPI
3
- Version: 2.2.12
3
+ Version: 2.2.13
4
4
  Summary: Use TSMaster hardware
5
+ Home-page: UNKNOWN
5
6
  Author: seven
6
7
  Author-email: 865762826@qq.com
7
8
  License: BSD License
@@ -29,3 +30,5 @@ Can only be used by WIN32 Python
29
30
  [联系作者](865762826@qq.com)
30
31
 
31
32
  to write your content.
33
+
34
+
@@ -13,7 +13,7 @@ with open("README.rst", "r",encoding="utf-8") as f:
13
13
 
14
14
  #
15
15
  setup(name='TSMasterAPI', # 包名
16
- version='2.2.12', # 版本号
16
+ version='2.2.13', # 版本号
17
17
  description='Use TSMaster hardware',
18
18
  long_description=long_description,
19
19
  author='seven',
File without changes
File without changes
File without changes