[Ironpython-users] IronPython SQLite interface
jdhardy at gmail.com
Fri May 9 10:42:52 CEST 2014
On Thu, May 8, 2014 at 5:32 PM, Doug Blank <doug.blank at gmail.com> wrote:
> Just getting back to attempting to use sqlite3 on computers other than
> Windows, and it looks like this C# library has other problems on other OSes.
> The first issue is that it appears that all activity must happen in the same
> thread (connection, cursor, execution). That can mitigated against if that
> is the way that it has to be. (A wrapper could be supplied to run everything
> in a specific thread).
> The next problem is a show stopper:
> import sqlite3
> conn = sqlite3.connect("test.db")
> cur = conn.cursor()
> cur.execute("select * from tables;")
> This works on Windows, but gives a SystemError: LockFileEx on Linux. I
> suspect that the information that Ivan pointed to (below) indicates that
> these patches screwed up sqlite port so that it no longer will work on Linux
> and Mac.
> Anyone have ideas, on either a fix, or using a different library, different
Right now, I don't know if there's much that can be done. The C#
SQLite port it uses is pretty Windows-specific, and I doubt it's worth
the effort to fix it since it's no longer maintained anyway. I've been
pondering replacing the guts of the SQLite module with
https://github.com/ericsink/SQLitePCL.raw, which wraps the *actual*
SQLite library instead of the C# port.
The module implementation shouldn't have to change that much, since
most of the function names should be the same. I don't yet know if
SQLitePCL works on Unix/Mac but it does support Android and iOS so
it's probably going to be a lot easier to fix it than it would be for
I hadn't planned on this until IronPython 3, but I'd be very happy to
include it in 2.7.5 (or a possible 2.7.6) if someone else does the
More information about the Ironpython-users