Chris, Thanks for responding to my email. I apologize for the remark about python only being developed for windows. I got the impression when I was looking at the ActivePython web site and saw that the version of python that they had available was not supported on very many unix systems. I should not make general statement based on only one web site. After reading your email I decided to see for myself what the issue was about compiling python on AIX 5.3.
This is the error I saw the first time I tried to use ctypes. Python 2.4.3 (#1, Jul 17 2006, 20:00:23) [C] on aix5 Type "help", "copyright", "credits" or "license" for more information. >>> import ctypes Traceback (most recent call last): File "<stdin>", line 1, in ? ImportError: No module named ctypes This version of python was downloaded and installed from ActivePython and when I checked their webpage it states that ctypes is not available on AIX. I then figured I would get a new copy of python and install it on AIX. I downloaded python.2.5.5c2 from http://www.python.org. I did the configure and make which posted many errors in the ctypes function which I guess is the reason that is does not get include in the final make. an example of the build error I get when doing the make is: xlc_r -q64 -DNDEBUG -O -I. -I/s/users/cz030a/xferjunk/python/Python-2.5.5c2/./Include -Ibuild/temp.aix-5.3-2.5/libffi/inclu de -Ibuild/temp.aix-5.3-2.5/libffi -I/s/users/cz030a/xferjunk/python/Python-2.5.5c2/Modules/_ctypes/libffi/src -I/s/users/c z030a/xferjunk/ots/python2.5/include -I. -IInclude -I./Include -I/s/users/cz030a/xferjunk/python/Python-2.5.5c2/Include -I/ s/users/cz030a/xferjunk/python/Python-2.5.5c2 -c /s/users/cz030a/xferjunk/python/Python-2.5.5c2/Modules/_ctypes/_ctypes.c - o build/temp.aix-5.3-2.5/s/users/cz030a/xferjunk/python/Python-2.5.5c2/Modules/_ctypes/_ctypes.o "/s/users/cz030a/xferjunk/python/Python-2.5.5c2/Modules/_ctypes/_ctypes.c", line 2820.31: 1506-068 (W) Operation between ty pes "void*" and "int(*)(void)" is not allowed. "/s/users/cz030a/xferjunk/python/Python-2.5.5c2/Modules/_ctypes/_ctypes.c", line 3363.28: 1506-280 (W) Function argument as signment between types "int(*)(void)" and "void*" is not allowed. "/s/users/cz030a/xferjunk/python/Python-2.5.5c2/Modules/_ctypes/_ctypes.c", line 4768.67: 1506-280 (W) Function argument as signment between types "void*" and "void*(*)(void*,const void*,unsigned long)" is not allowed. "/s/users/cz030a/xferjunk/python/Python-2.5.5c2/Modules/_ctypes/_ctypes.c", line 4769.66: 1506-280 (W) Function argument as signment between types "void*" and "void*(*)(void*,int,unsigned long)" is not allowed. I do not have sufficient knowledge to know how to fix this. I would think that this error somehow is related to compiling on aix. If you have any suggestions on how to correct this problem , I would appreciate it Jim Waddle KIT-D 425-785-5194 -----Original Message----- From: ch...@rebertia.com [mailto:ch...@rebertia.com] On Behalf Of Chris Rebert Sent: Sunday, January 24, 2010 7:31 AM To: Waddle, Jim Cc: python-list@python.org Subject: Re: ctypes for AIX On Sun, Jan 24, 2010 at 5:54 AM, Waddle, Jim <jim.wad...@boeing.com> wrote: > I need to use ctypes with python running on AIX. According to the ctypes readme, ctypes is based on libffi, which according to its website, supports AIX for PowerPC64. So, perhaps you could state what the actual error or problem you're encountering is? It is theoretically possible the ctypes-bundled libffi is either outdated or had the AIX-specific bits removed; I don't know, I'm not a CPython dev. > It appears that python is being developed mostly for windows. No, not really; your statement is especially ironic considering one of Python's primary areas of use is for web applications as part of a LAMP stack. > Is there a policy concerning getting functions like ctypes working on AIX. No idea. Someone will probably chime in though. Cheers, Chris -- http://blog.rebertia.com -- http://mail.python.org/mailman/listinfo/python-list