On Fri 10 Jun 2005 (22:13 +0200), Jim Segrave wrote: > > I;ve been trying to help out someone in getting sqlite set up with > gnubg. Since I don't have Windows myself, it's kind of hard to be too > useful. > > Here was my original advice and the results - gathered by googling for > Python, db2api and sqlite: > > > 1. dl & inst. the last gnubg setup > > 2. dl & inst. sqlite-2_8_15.zip > > 3. dl & inst. Python 234 for windows > > 4. dl & inst. pysqlite-2.0.3.win32-py2.3.exe > > change database.py to have: > > DB_TYPE = DB_SQLITE > > and > if DB_TYPE == DB_SQLITE: > DBFILE = "data.db" > import sqlite > changed to > if DB_TYPE == DB_SQLITE: > DBFILE = "data.db" > from pysqlite2 import dbapi2 as sqlite > > In a DOS window run the command: > > C:\gnubg> sqlite data.db < gnubg.sql > > After doing this, the report is that the relational database test runs > successfully, but that when he attempts to add a match to the database > nothing appears to happen and, as far as he can tell, no data has been > actually added to the database (data.db hasn't changed size). When he > closes gnubg he gets a popyp with an message something like 'error > query' > > Is anyone using gnubg and sqlite under windows? Any advice for him? > He reads the mailing list but felt reluctant to query any further > since he realises how much work the Windows developers are already > doing.
I've just tried buildig sqlite3 on my FreeBSD platform and istallig pysqlite2 from source. Having done that and making the above two changes to database.py, I was able to store a few hundred matches in the sqlite databae. I must say, the database is compact 600K vs the 50 oddMb of postgres for the same data. With gnubg from 1 Jue source, none of the access methods work with sqlite - Analyse->Relational->Show Records gives 'unknown type' and attempting to select one core dumps gnubg. The same problem more or less applies to postgres, show records gives player nicks, selecting one is a core dump. None of these commands appear to be disabled in text mode. But the better news is that it appears that with the above changes in database.py, I can save data and using the sqlite command line application, I can retrieve data - for example: [EMAIL PROTECTED]:/usr/home/jes% cat getall.sqlite3 .separator ' ' .mode list .output /tmp/all select match_id,error_based_fibs_rating,chequer_error_per_move_normalised,cube_error_per_move_normalised from matchstat where nick_id=1 order by match_id; .quit produces a list of relevant errors for all my games (it happens my nick_id is set to 1 in every saved match). [EMAIL PROTECTED]:/usr/home/jes% tail /tmp/all 448 1749.817343 0.024656 0.03192 449 1759.269602 0.027108 0.022999 450 1767.992987 0.022378 0.026898 451 1760.070716 0.027255 0.02029 452 1752.520048 0.025934 0.030401 453 1796.008155 0.020074 0.025393 454 1786.171645 0.023991 0.028146 455 1719.643595 0.030284 0.032336 456 1798.229054 0.022397 0.032808 457 1863.557721 0.017182 0.017166 458 1759.08818 0.02745 0.019131 Gives me the match number, my fibs rating estimat, and my chequer and cube errors. Gnuplot is good at displaying this sort of data (it's also easy to pass these through a script which gives a running average over say the last 10 matches, then plot them) -- Jim Segrave [EMAIL PROTECTED] _______________________________________________ Bug-gnubg mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-gnubg
