[bf1942] Using sqlite with BF2 in Windows

"Einar S. Idsø" esi at itk.ntnu.no
Fri Apr 7 07:53:15 EDT 2006


I understand from the lack of replies that noone else uses external
Python modules with BF2 in Windows? I already knew we're hitech at
Battlefield.no, but I thought other people/ocmmunities/companies were a
bit on the cutting-edge of things as well ;)

Anyone?

Einar

Einar S. Idsø wrote:
> Hi,
> 
> 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 _sqlite.so 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\bfno.py", 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\__init__.py", 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\countryfilter.py",
> 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\__init__.py", 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?
> 
> Cheers,
> Einar
> 



More information about the Bf1942 mailing list