[GRASS-user] Question with Python-SWIG example

AhmadKhaled vbkhp at yahoo.com
Wed Apr 14 20:39:44 EDT 2010


Hi,

I was trying to run the example given on the "Grass and Python wiki" for
interface between Python-SWIG-GRASS. I ran the raster example, and I got the
following error: 

TypeError: 'int' object is unsubscriptable

Which kinds of make sense, because presumably the G_get_raster_row function
returns an integer, to show if the reading was successful or not. So we can
not iterate on that to get the row.
I think that the function returns the result in the "intrast" variable here,
but I can not access it, because it says that it is a "Swig Object of type
'void *'". Any idea on how I can read the rows of the map?

Thanks in advance,
Ahmad 
-- 
View this message in context: http://n2.nabble.com/Question-with-Python-SWIG-example-tp4904954p4904954.html
Sent from the Grass - Users mailing list archive at Nabble.com.


More information about the grass-user mailing list