ctypes: return a pointer to a struct

sturlamolden sturlamolden at yahoo.no
Fri Apr 25 05:47:25 CEST 2008

On Apr 25, 5:39 am, "Jack" <nos... at invalid.com> wrote:

> AttributeError: 'LP_IP2LocationRecord' object has no attribute
> 'country_short'

As it says, LP_IP2LocationRecord has no attribute called
'country_short'. IP2LocationRecord does.

Use the 'contents' attribute to dereference the pointer. That is:


More information about the Python-list mailing list