TSMasterAPI 2024.8.19.1167__tar.gz → 2024.8.21.1168__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.
Files changed (20) hide show
  1. {TSMasterAPI-2024.8.19.1167 → TSMasterAPI-2024.8.21.1168}/PKG-INFO +1 -1
  2. {TSMasterAPI-2024.8.19.1167 → TSMasterAPI-2024.8.21.1168}/TSMasterAPI/TSDirver.py +10 -1
  3. TSMasterAPI-2024.8.21.1168/TSMasterAPI/__init__.py +2 -0
  4. {TSMasterAPI-2024.8.19.1167 → TSMasterAPI-2024.8.21.1168}/TSMasterAPI.egg-info/PKG-INFO +1 -1
  5. {TSMasterAPI-2024.8.19.1167 → TSMasterAPI-2024.8.21.1168}/setup.py +5 -4
  6. TSMasterAPI-2024.8.19.1167/TSMasterAPI/__init__.py +0 -2
  7. {TSMasterAPI-2024.8.19.1167 → TSMasterAPI-2024.8.21.1168}/README.rst +0 -0
  8. {TSMasterAPI-2024.8.19.1167 → TSMasterAPI-2024.8.21.1168}/TSMasterAPI/TSAPI.py +0 -0
  9. {TSMasterAPI-2024.8.19.1167 → TSMasterAPI-2024.8.21.1168}/TSMasterAPI/TSCallback.py +0 -0
  10. {TSMasterAPI-2024.8.19.1167 → TSMasterAPI-2024.8.21.1168}/TSMasterAPI/TSEnum.py +0 -0
  11. {TSMasterAPI-2024.8.19.1167 → TSMasterAPI-2024.8.21.1168}/TSMasterAPI/TSFibex_parse.py +0 -0
  12. {TSMasterAPI-2024.8.19.1167 → TSMasterAPI-2024.8.21.1168}/TSMasterAPI/TSMasterAPI.py +0 -0
  13. {TSMasterAPI-2024.8.19.1167 → TSMasterAPI-2024.8.21.1168}/TSMasterAPI/TSStruct.py +0 -0
  14. {TSMasterAPI-2024.8.19.1167 → TSMasterAPI-2024.8.21.1168}/TSMasterAPI/windows/bin/TSMaster.dll +0 -0
  15. {TSMasterAPI-2024.8.19.1167 → TSMasterAPI-2024.8.21.1168}/TSMasterAPI/windows/bin64/TSMaster.dll +0 -0
  16. {TSMasterAPI-2024.8.19.1167 → TSMasterAPI-2024.8.21.1168}/TSMasterAPI.egg-info/SOURCES.txt +0 -0
  17. {TSMasterAPI-2024.8.19.1167 → TSMasterAPI-2024.8.21.1168}/TSMasterAPI.egg-info/dependency_links.txt +0 -0
  18. {TSMasterAPI-2024.8.19.1167 → TSMasterAPI-2024.8.21.1168}/TSMasterAPI.egg-info/top_level.txt +0 -0
  19. {TSMasterAPI-2024.8.19.1167 → TSMasterAPI-2024.8.21.1168}/license.txt +0 -0
  20. {TSMasterAPI-2024.8.19.1167 → TSMasterAPI-2024.8.21.1168}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: TSMasterAPI
3
- Version: 2024.8.19.1167
3
+ Version: 2024.8.21.1168
4
4
  Summary: Use TSMaster hardware
5
5
  Home-page: UNKNOWN
6
6
  Author: seven
@@ -11,6 +11,8 @@ import platform
11
11
 
12
12
  TSMaster_location = r"Software\TOSUN\TSMaster"
13
13
 
14
+ _curr_path = os.path.dirname(__file__)
15
+
14
16
  key = winreg.OpenKey(winreg.HKEY_CURRENT_USER, TSMaster_location)
15
17
 
16
18
  _arch, _os = platform.architecture()
@@ -42,6 +44,13 @@ if dll_path != '':
42
44
  dllPath = os.path.split(dll_path)[0]
43
45
  dll = WinDLL(dll_path)
44
46
  except Exception as r:
45
- print(r"Could not load the TOSUN DLL from '%s'. Error: %s" % (dll_path, r))
47
+ try:
48
+ if _arch == '32bit':
49
+ dll_path = _curr_path + "\\windows\\bin\\TSMaster.dll"
50
+ else:
51
+ dll_path = _curr_path + "\\windows\\bin64\\TSMaster.dll"
52
+ dll = WinDLL(dll_path)
53
+ except Exception as r:
54
+ print(r"Could not load the TOSUN DLL from '%s'. Error: %s" % (dll_path, r))
46
55
  else:
47
56
  print(r"Could not load the TOSUN DLL Error: Registry not found")
@@ -0,0 +1,2 @@
1
+ from .TSAPI import *
2
+ __version__ = 'v2024.8.21.1168'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: TSMasterAPI
3
- Version: 2024.8.19.1167
3
+ Version: 2024.8.21.1168
4
4
  Summary: Use TSMaster hardware
5
5
  Home-page: UNKNOWN
6
6
  Author: seven
@@ -29,10 +29,11 @@ setup(name='TSMasterAPI', # 包名
29
29
  install_requires=[],
30
30
  license='Apache License',
31
31
  packages=find_packages(),
32
- data_files=[
33
- ('./TSMasterAPI/windows/bin', ['./TSMasterAPI/windows/bin/TSMaster.dll']),
34
- ('./TSMasterAPI/windows/bin64', ['./TSMasterAPI/windows/bin64/TSMaster.dll'])
35
- ],
32
+ include_package_data=True,
33
+ # data_files=[
34
+ # ('./TSMasterAPI/windows/bin', ['./TSMasterAPI/windows/bin/TSMaster.dll']),
35
+ # ('./TSMasterAPI/windows/bin64', ['./TSMasterAPI/windows/bin64/TSMaster.dll'])
36
+ # ],
36
37
  platforms=["WINDOWS"],
37
38
  classifiers=[
38
39
  'Intended Audience :: Developers',
@@ -1,2 +0,0 @@
1
- from .TSAPI import *
2
- __version__ = 'v2024.8.19.1167'