Can't get sqlkit examples to display anything at all

21 views
Skip to first unread message

Chris Green

unread,
Mar 11, 2013, 12:22:38 PM3/11/13
to sql...@googlegroups.com
I'm trying to get sqlkit to work for me and I'm having very little success at the moment.

I am running the following few lines of code:-

#!/usr/bin/python

from sqlkit.widgets import SqlTable, SqlMask
from sqlkit import DbProxy

db = DbProxy(engine='sqlite:////home/chris/.sqledit/money.db')
t = SqlMask('jessica', dbproxy=db)
t.reload()


But altought it runs error free (well, actually the same warnings as sqledit) I don't get any sort of window popping up, just nothing.

If I run 'sqledit jessica' with the following in nicks then it works and a table display appears:-

[jessica]
URL = sqlite:////home/chris/.sqledit/money.db
table = jessica
load = True


So what am I missing from
my code, or what's broken, or what else am I doing wrong??

Chris Green

unread,
Mar 13, 2013, 7:26:06 AM3/13/13
to sql...@googlegroups.com
Well, I have sort of found the answer, you need to call gtk.main() to
get the window to appear. So the minimal code is:-

#!/usr/bin/python

from sqlkit.widgets import SqlTable, SqlMask
from sqlkit import DbProxy

import gtk

db = DbProxy(engine='sqlite:////home/chris/.sqledit/money.db')
t = SqlMask('jessica', dbproxy=db)

gtk.main()


It's nothing like the display format I want but at least I can see
something now! :-)

--
Chris Green
Reply all
Reply to author
Forward
0 new messages