Using sqlite with BF2 in Windows

"Einar S. Idsø" esi at
Fri Mar 31 08:52:08 EST 2006


For several months we have been using pysqlite with some of our BF2
Python scripts to store banlists and implement an IP-based
countryfilter. Pysqlite is not included with BF2's Python engine, and
therefore has to be installed separately. On our Linux-hosts, this is
quite easy: Simply place a copy of sqlite and into bf2/admin
and import sqlite in any script that needs it.

The problem I am facing now is that the same doesn't work for Windows!
I've tried both pysqlite2 and version 1, but I keep getting the
following error when the BF2 engine tries to import sqlite:

[2006-03-31 15:20:24] Traceback (most recent call last):
[2006-03-31 15:20:24]   File "admin\", line 462, in init
[2006-03-31 15:20:24]     [2006-03-31 15:20:24] import standard_admin
[2006-03-31 15:20:24]   File "admin\standard_admin\", line
15, in ?
[2006-03-31 15:20:24]     [2006-03-31 15:20:24] import countryfilter
[2006-03-31 15:20:24]   File "admin\standard_admin\",
line 5, in ?
[2006-03-31 15:20:24]     [2006-03-31 15:20:24] import sqlite
[2006-03-31 15:20:24]   File "admin\sqlite\", line 1, in ?
[2006-03-31 15:20:24]     [2006-03-31 15:20:24] import _sqlite
[2006-03-31 15:20:24] ImportError[2006-03-31 15:20:24] : [2006-03-31
15:20:24] Don't know how to import _sqlite (type code 3)

Just typing "import sqlite" in IDLE (Python shell in Windows) works fine.

Does anyone have any idea how to include external Python modules for
Windows BF2?


More information about the Bf1942 mailing list