Hi all. I'm using storm with python2.5 and I have a problem with the sqlite3 extension api. In order to enable the extension loading, I need to call this library function : sqlite3_enable_load_extension . Unfortunately, this is not supported in python 2.5 (it will in python 2.6).
To get aroudn this problem I'm trying to build a small python binding
around this C call. I'm using swig to make my life a bit easier. However
I'm a bit stuck when I try to invoke my function passing a storm
connection object. I've attached the code in a tgz to this email.
Briefly, if sqlitext is my module, I'd like to call my function as :
storm.create_database(db_url)
store = storm.Store(database)
sqlitext.enable_extension(store,1)
where enable_extension looks like :
#include "sqlitext.h"
int enable_extension(Connection* self, int onoff) {
return sqlite3_enable_load_extension(self->db, onoff);
}
and Connection is the struct as defined in _sqlite3/connection.h in the
python 2.5 source code. The result os storm.Store(database) should be
the result of the lower level python library ...
Is anybody able to help me ?
:)
p
ps: to compile the code you need swig and python-dev of course ...
sqlitext.tgz
Description: GNU Unix tar archive
-- storm mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/storm
