Closed saifeiLee closed 1 year ago
Hi! Thank you for your feedback!
I think the problem of wintypes crashing in other OSs apart from Windows is solved in Python 3.10 so, just updating your Python version it should work ok. I might be wrong, never the less. Ayway, it will be fixed in next PyMonCtl version.
Just curious: which OS (and Desktop Manager in case of Linux) are you using?
Thank you again!
Hi! Thank you for your feedback!
I think the problem of wintypes crashing in other OSs apart from Windows is solved in Python 3.10 so, just updating your Python version it should work ok. I might be wrong, never the less. Ayway, it will be fixed in next PyMonCtl version.
Just curious: which OS (and Desktop Manager in case of Linux) are you using?
Thank you again!
Thanks for reply. My Linux OS is ubuntu 22.04. And It is indeed that python 3.10 has fix this problem. By the way, how will you fix it? I am curious.
Great!
To avoid crashing in previous versions, you only have to ask for the platform you are in before importing and using it, like this:
if sys.platform == "win32":
import ctypes.wintypes
class _POINTL(ctypes.Structure):
_fields_ = [
('x', ctypes.wintypes.LONG),
('y', ctypes.wintypes.LONG)
]
Cool
Environment
python 3.8.2
Operation
Run tests with:
The output