Skip to content

Commit 2eff2fc

Browse files
committed
Remove check for Windows CE.
Python 3.6 removed support for Windows CE (whatever little support there was). This means that `os.name` no longer returns the value of 'ce' and to identify Windows is enough to check for the value of 'nt'. See also https://bugs.python.org/issue27355 for the original CPython issue about removing this. Since we are dependent on Python 3.7, support for this was removed in Python 3.6, and according to the comments on the CPython issue tracker Windows didn't actually work on any Python 3 version, we can just remove the checks for Windows CE.
1 parent e837dfc commit 2eff2fc

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

microscope/_wrappers/BMC.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
from ctypes import c_char, c_char_p, c_double, c_int, c_uint, c_uint32
2626

2727

28-
if os.name in ("nt", "ce"):
28+
if os.name == "nt": # is windows
2929
# Not actually tested yet
3030
SDK = ctypes.WinDLL("BMC2")
3131
else:

microscope/_wrappers/asdk.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
from ctypes import c_char_p, c_double, c_int, c_size_t, c_uint32
2626

2727

28-
if os.name in ("nt", "ce"):
28+
if os.name == "nt": # is windows
2929
_libname = "ASDK"
3030
else:
3131
_libname = "libasdk.so" # Not actually tested yet

microscope/cameras/_SDK3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
_stdcall_libraries = {}
3535

36-
if os.name in ("nt", "ce"):
36+
if os.name == "nt": # is windows
3737
_stdcall_libraries["ATCORE"] = ctypes.WinDLL("atcore")
3838
_stdcall_libraries["ATUTIL"] = ctypes.WinDLL("atutility")
3939
CALLBACKTYPE = ctypes.WINFUNCTYPE(c_int, AT_H, POINTER(AT_WC), c_void_p)

microscope/cameras/atmcd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
_dllName = "atmcd32d"
8888
else:
8989
_dllName = "atmcd64d"
90-
if os.name in ("nt", "ce"):
90+
if os.name == "nt": # is windows
9191
_dll = ctypes.WinDLL(_dllName)
9292
else:
9393
_dll = ctypes.CDLL(_dllName + ".so")

microscope/cameras/pvcam.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ class md_frame(ctypes.Structure):
674674
]
675675

676676

677-
if os.name in ("nt", "ce"):
677+
if os.name == "nt": # is windows
678678
if platform.architecture()[0] == "32bit":
679679
_lib = ctypes.WinDLL("pvcam32")
680680
else:

0 commit comments

Comments
 (0)