Ciao: 2009/10/11 [email protected] <[email protected]>: > Ciao ho installato da snv i nuovi sorgenti, ... > > anche io ho il medesimo errore "TypeError: 'int' object is > unsubscriptable"
Viene discussiono nella grass-dev mailing list, ecco una risposta spero utile: On Mon, Oct 12, 2009 at 9:34 PM, Glynn Clements <[email protected]> wrote: > Try: > import array > inrast = array.array('i') > inrast.extend([0] * gis.G_window_cols()) > > This is a good example of one of SWIG's main limitations. The only > thing it knows about Rast_allocate_buf() is that it returns a void*; > there's no way that it can generate a usable Python object from that > (it doesn't know the actual element type or the number of elements). > > In general, it's easier to create objects in Python and pass them to C > than the other way around. > > The only real solution is to code wrappers by hand; a C prototype > simply doesn't contain enough information to create a wrapper in > anything beyond the simplest cases. > > -- > Glynn Clements <[email protected]> > _______________________________________________ > grass-dev mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/grass-dev > ciao Markus _______________________________________________ Iscriviti all'associazione GFOSS.it: http://www.gfoss.it/drupal/iscrizione [email protected] http://lists.faunalia.it/cgi-bin/mailman/listinfo/gfoss Questa e' una lista di discussione pubblica aperta a tutti. I messaggi di questa lista non rispecchiano necessariamente le posizioni dell'Associazione GFOSS.it.
