OK :-)
can i changing setup.cfg to :
[build_ext]
#define=
include_dirs=/Library/Frameworks/SQLite3.framework/Versions/3/Headers
library_dirs=//Library/Frameworks/SQLite3.framework/Versions/3/unix/lib
libraries=sqlite3
#define=SQLITE_OMIT_LOAD_EXTENSION
done the job :-D
file test.py :
from pysqlite2 import dbapi2 as sqlite
DB = sqlite.connect('/Users/sasha/Documents/test-2.3.sqlite');
DB.enable_load_extension(True);
DB.execute('SELECT load_extension("/Users/Shared/source/spatialite/lib/
libspatialite.dylib")');
DBCursor = DB.cursor()
strSQL = 'SELECT Name, GeometryType(geometry), area(geometry) ';
strSQL += 'FROM regions ORDER BY Area(geometry) DESC';
DBCursor.execute( strSQL );
for row in DBCursor:
print row[0] + ' ' + row[1] + ' ' + str(row[2])
DBCursor.close();
DB.close();
macbook-pro-15-di-sasha:~ sasha$ python /Users/sasha/Documents/
spatialite.py
SpatiaLite version ..: 2.2 Supported Extensions:
- 'VirtualShape' [direct Shapefile access]
- 'VirtualText' [direct CSV/TXT access]
- 'RTree' [Spatial Index - R*Tree]
- 'MbrCache' [Spatial Index - MBR cache]
- 'SpatiaLite' [Spatial SQL - OGC]
PROJ.4 Rel. 4.6.1, 21 August 2008
GEOS version 3.0.3-CAPI-1.4.2
SICILIA MULTIPOLYGON 26074081211.3
PIEMONTE POLYGON 25391974998.1
SARDEGNA MULTIPOLYGON 24125601024.3
LOMBARDIA POLYGON 24069782849.5
TOSCANA MULTIPOLYGON 22971611856.6
EMILIA-ROMAGNA MULTIPOLYGON 22112626674.3
PUGLIA MULTIPOLYGON 19535533607.9
VENETO MULTIPOLYGON 18091146695.8
LAZIO MULTIPOLYGON 17075567463.4
CALABRIA POLYGON 15357477642.6
CAMPANIA MULTIPOLYGON 13671884537.6
TRENTINO-ALTO ADIGE POLYGON 13636192197.0
ABRUZZI POLYGON 10921890033.0
BASILICATA POLYGON 10082620411.6
MARCHE POLYGON 9801006025.43
UMBRIA POLYGON 8511757763 POLYGON.65
FRIULI-VENEZIA GIULIA MULTIPOLYGON 7571067911.64
LIGURIA MULTIPOLYGON 5451586208.43
MOLISE POLYGON 4534700124.13
VALLE D'AOSTA 3309252833.27
SAN MARINO POLYGON 60108921.7828
macbook-pro-15-di-sasha:~ sasha$
thanks to All !!!
Massimo Di Stefano
massimodisa...@yahoo.it
epifanio on irc.freenode.net /join gfoss
Chiacchiera con i tuoi amici in tempo reale!
http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com
_______________________________________________
Pythonmac-SIG maillist - Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig