[EMAIL PROTECTED] wrote:
print version
I'm getting the following output:
<_FuncPtr object at 0x00A1EB70>
<__main__.c_long_Array_4 object at 0x00A86300>
But I'm not getting the desired output which I expect as : 2.1.5.0
expecting that Python/ctypes should be able to figure out that you
want an array of 4 integers printed as a dot-separated string is a
bit optimistic, perhaps. but nothing that a little explicit string
formatting cannot fix:
>>> from ctypes import *
>>> versionArr = c_long * 4
>>> version = versionArr(1, 2, 3, 4)
>>> "%d.%d.%d.%d" % tuple(version)
'1.2.3.4'
</F>
--
http://mail.python.org/mailman/listinfo/python-list