Ronald Oussoren ronaldousso...@mac.com added the comment:
yufun, you better ask on python-list or the pythonmac-sig e-mail list
(http://www.python.org/community/sigs/current/pythonmac-sig/). The added
bonus is that you'll get into contact with other users of Python on OSX.
The ctypes API is
Ned Deily n...@acm.org added the comment:
On OS X 10.6, the code segment segfaults for me in 64-bit mode but not in
32-bit mode. If you are using a 64-bit/32-bit Python 3.2, try running your
failing code in 32-bit mode:
arch -i386 python3.2
The 3.1.3 Python is most likely a 32-bit-only
Ronald Oussoren ronaldousso...@mac.com added the comment:
This is almost certainly not a bug in Python, but in the code in this issue.
CGEventGetLocation() is a function that returns a CGPoint, while ctypes assumes
that function returns value of C type int. The effect of this is that ctypes
yufun heyt1...@gmail.com added the comment:
thanks Ned and Ronald, I totally agree with you, I think it's a 32/64 issue.
But, I'm not clear about the 32 and 64 bit in Python and don't know how to do
let my code works, could you please explain more detail about that?
--
New submission from yufun heyt1...@gmail.com:
appsLib =cdll.LoadLibrary(util.find_library('ApplicationServices'))
event = appsLib.CGEventCreate(None);
pt = appsLib.CGEventGetLocation(event);
Crash after execute above python code. But these code works well in python3.13.
--
assignee: