wxPython support?

17 views
Skip to first unread message

werner

unread,
Mar 10, 2011, 8:12:36 AM3/10/11
to sqlkit
Just noticed your 0.9.3 announcment and got curious:) Very much like
the way one can define ui's both the table and the mask stuff look
very intuitive/easy.

Ever considered doing a wxPython based version of sqlkit?

I have done a shareware in wxPython and use SQLAlchemy, but I am not
too happy with my work on the sa/db interaction stuff (just not that
well structured .....).

Looking/evaluating at Dabo but I would prefere a SA based toolkit as
am getting pretty confortable with SA, including its support and its
development.

Is all the GTK related stuff well isolated? Would you think it a big
job to create a wxPython based version?

Werner

Alessandro Dentella

unread,
Mar 10, 2011, 11:21:18 AM3/10/11
to sql...@googlegroups.com
On Thu, Mar 10, 2011 at 05:12:36AM -0800, werner wrote:
> Just noticed your 0.9.3 announcment and got curious:) Very much like
> the way one can define ui's both the table and the mask stuff look
> very intuitive/easy.

thanks, I'm glad you like it.

> Ever considered doing a wxPython based version of sqlkit?

no, honestly. I was asked for a Qt porting a year ago but I don't have any
real personal advantage so I just decided I wouldn't do it.

> Is all the GTK related stuff well isolated?

not really/not always.

all sql interaction is definitely segregated from gtk. That means that the
layer that grants a django_like syntax over sqlalchemy and the filtering is
a totally gtk independent.

But all my widgets (i.d.: SqlMask, SqlTable but also many other subsidiary
widgets) derive from gobject as a mean to propagate signals.

Since the last release even each SA object inglobe via AttributeExtension a
gobject that emits signals in order to inform observers of changes in the
model. (That will change in the future to the new signal frawework of SA 0.7)

Fields are totally independent from GTK, they talk to miniwidgets that are a
gtk display of a field value. SqlTable has an implementation that strongly
depends on gtk.TreeView/gtk/TreeStore.

> Would you think it a big
> job to create a wxPython based version?

I think it would be a big effort, If anybody feels like doing it, it can
surely be a good occasion to furtherly cleanup user interface the rest. But
would not be simple...

sandro
*:-)

--
Sandro Dentella *:-)
http://www.reteisi.org Soluzioni libere per le scuole
http://sqlkit.argolinux.org SQLkit home page - PyGTK/python/sqlalchemy

werner

unread,
Mar 10, 2011, 11:35:55 AM3/10/11
to sqlkit
Sandro,

On Mar 10, 5:21 pm, Alessandro Dentella <san...@e-den.it> wrote:
> On Thu, Mar 10, 2011 at 05:12:36AM -0800, werner wrote:
> > Just noticed your 0.9.3 announcment and got curious:)  Very much like
> > the way one can define ui's both the table and the mask stuff look
> > very intuitive/easy.
>
> thanks, I'm glad you like it.
>
> > Ever considered doing a wxPython based version of sqlkit?
>
> no, honestly. I was asked for a Qt porting a year ago but I don't have any
> real personal advantage so I just decided I wouldn't do it.
>
> > Is all the GTK related stuff well isolated?  
>
> not really/not always.
>
> all sql interaction is definitely segregated from gtk. That means that the
> layer that grants a django_like syntax over sqlalchemy and the filtering is
> a totally gtk independent.
>
> But all my widgets (i.d.: SqlMask, SqlTable but also many other subsidiary
> widgets) derive from gobject as a mean to propagate signals.
Wondered what "gobject" was about when I had a very very quick look at
the code.
>
> Since the last release even each SA object inglobe via AttributeExtension a
> gobject that emits signals in order to inform observers of changes in the
> model. (That will change in the future to the new signal frawework of SA 0.7)
>
> Fields are totally independent from GTK, they talk to miniwidgets that are a
> gtk display of a field value. SqlTable has an implementation that strongly
> depends on gtk.TreeView/gtk/TreeStore.
Wondered what you were using for this stuff.
>
> > Would you think it a big
> > job to create a wxPython based version?
>
> I think it would be a big effort, If anybody feels like doing it, it can
> surely be a good occasion to furtherly cleanup user interface the rest. But
> would not be simple...
>
Thanks for the quick reply.

I guess I will have to look at GTK then.

What version of GTK is the recommended one (I am on Windows) and what
is a good IDE for it, or is the Windows Package Manager you mention on
the Windows Install page going to give me all I need. I guess I just
have to try it.

BTW, on the web site I would suggest to move the things like support/
list, how to install to a page different then "Download", nearly
didn't look there.

Werner

Alessandro Dentella

unread,
Mar 10, 2011, 1:18:09 PM3/10/11
to sql...@googlegroups.com
On Thu, Mar 10, 2011 at 08:35:55AM -0800, werner wrote:
> >
> > But all my widgets (i.d.: SqlMask, SqlTable but also many other subsidiary
> > widgets) derive from gobject as a mean to propagate signals.

> Wondered what "gobject" was about when I had a very very quick look at
> the code.

gobject is now separate from GTK, so you can use it independently. I found
it extremly useful. A good introduction is here:

http://www.pygtk.org/articles/subclassing-gobject/sub-classing-gobject-in-python.htm


> > Since the last release even each SA object inglobe via AttributeExtension a
> > gobject that emits signals in order to inform observers of changes in the
> > model. (That will change in the future to the new signal frawework of SA 0.7)
> >
> > Fields are totally independent from GTK, they talk to miniwidgets that are a
> > gtk display of a field value. SqlTable has an implementation that strongly
> > depends on gtk.TreeView/gtk/TreeStore.

> Wondered what you were using for this stuff.

A TreeView is the GTK Widget, TreeStore is the model. Then I instruct the
widget how to represent data in the model (sqlkit.widgets.table.columns).

In the model I place all the records returned by SA. Each data-type has a
different renderer.

> I guess I will have to look at GTK then.

That's surely good and needed to create a complete application. The best way
to approach sqlkit is anyhow to browse the 80+ examples in the demo dir. A
very 'cheap' and simple approach is to copy samples and start them from the
demo listing. You can change the example and restart it from the demo
listing w/o restarting the demo.

> What version of GTK is the recommended one (I am on Windows) and what
> is a good IDE for it, or is the Windows Package Manager you mention on
> the Windows Install page going to give me all I need. I guess I just
> have to try it.

WPM is a *very* simple way to install everything under windows, I wanted it
expecially for those people that wnt sqlkit for the application and don't
even know waht a 'python setup.py install' would be. If you already have
python installed and are familiar with installing modules -as I guess you
are-, you can just install using the pygtk-all installer and standard
donelowd + python setup.py install.

> BTW, on the web site I would suggest to move the things like support/
> list, how to install to a page different then "Download", nearly
> didn't look there.

Ok, I have changed a little in that direction now. And all documentation
page have the link to the mailing list on the right.

sandro
*:-)

PS: if you feel like contributing the french localization, I can help you
setting it up (basically: poedit/virtaal sqlkit.pot)

werner

unread,
Mar 10, 2011, 2:21:28 PM3/10/11
to sqlkit
Sandro,

On Mar 10, 7:18 pm, Alessandro Dentella <san...@e-den.it> wrote:
> On Thu, Mar 10, 2011 at 08:35:55AM -0800, werner wrote:
>
> > > But all my widgets (i.d.: SqlMask, SqlTable but also many other subsidiary
> > > widgets) derive from gobject as a mean to propagate signals.
> > Wondered what "gobject" was about when I had a very very quick look at
> > the code.
>
> gobject is now separate from GTK, so you can use it independently. I found
> it extremly useful. A good introduction  is here:
>
>  http://www.pygtk.org/articles/subclassing-gobject/sub-classing-gobjec...

So, I could use that without GTK?

>
> > > Since the last release even each SA object inglobe via AttributeExtension a
> > > gobject that emits signals in order to inform observers of changes in the
> > > model. (That will change in the future to the new signal frawework of SA 0.7)
>
> > > Fields are totally independent from GTK, they talk to miniwidgets that are a
> > > gtk display of a field value. SqlTable has an implementation that strongly
> > > depends on gtk.TreeView/gtk/TreeStore.
> > Wondered what you were using for this stuff.
Just tried it against my own database using my SA model and it just
works. Amazing!
BTW, can't see how does it figure out which column information to
display for relationship columns? In my cases it shows the right
column (name) but looking at "Info" for that column it doesn't give
any indication which column it uses.
>
> A TreeView is the GTK Widget, TreeStore is the model. Then I instruct the
> widget how to represent data in the model (sqlkit.widgets.table.columns).
>
> In the model I place all the records returned by SA. Each data-type has a
> different renderer.
We have a similar widget in wxPython (objectlistview) - not out of the
box so.
>
> > I guess I will have to look at GTK then.
>
> That's surely good and needed to create a complete application. The best way
> to approach sqlkit is anyhow to browse the 80+ examples in the demo dir.  A
> very 'cheap' and simple approach is to copy samples and start them from the
> demo listing. You can change the example and restart it from the demo
> listing w/o restarting the demo.
>
> > What version of GTK is the recommended one (I am on Windows) and what
> > is a good IDE for it, or is the Windows Package Manager you mention on
> > the Windows Install page going to give me all I need.  I guess I just
> > have to try it.
>
> WPM is a *very* simple way to install everything under windows, I wanted it
> expecially for those people that wnt sqlkit for the application and don't
> even know waht a 'python setup.py install' would be. If you already have
> python installed and are familiar with installing modules -as I guess you
> are-, you can just install using the pygtk-all installer and standard
> donelowd + python setup.py install.
Tried WPM but couldn't figure out how to get kinterbasdb (Firebird SQL
driver), with it, so just deinstalled it all and used the pyGTK all in
one and easy_install for sqlkit. Worked without any problems:)
>
> > BTW, on the web site I would suggest to move the things like support/
> > list, how to install to a page different then "Download", nearly
> > didn't look there.
>
> Ok, I have changed a little in that direction now. And all documentation
> page have the link to the mailing list on the right.
>
> sandro
> *:-)
>
> PS: if you feel like contributing the french localization, I can help you
>     setting it up (basically: poedit/virtaal sqlkit.pot)
I already use poedit for my own stuff. So, send me the sqlkit.pot and
I have a look. Might do you the German (I am Swiss German, "just"
living in France) one even if I decide against GTK as looking at
sqlkit has given me lots of ideas and I am still thinking about a "wx"
version. I can't do it alone as I am not that technical, but maybe
can convience some others - will see.......

Have a nice evening
Werner

Pietro Battiston

unread,
Mar 10, 2011, 2:30:51 PM3/10/11
to sql...@googlegroups.com
Il giorno gio, 10/03/2011 alle 11.21 -0800, werner ha scritto:
> I am still thinking about a "wx"
> version. I can't do it alone as I am not that technical, but maybe
> can convience some others - will see.......

Just curious: what would be the benefits?!

Pietro

Alessandro Dentella

unread,
Mar 10, 2011, 4:56:57 PM3/10/11
to sql...@googlegroups.com
On Thu, Mar 10, 2011 at 11:21:28AM -0800, werner wrote:
> Sandro,
>
> On Mar 10, 7:18�pm, Alessandro Dentella <san...@e-den.it> wrote:
> > On Thu, Mar 10, 2011 at 08:35:55AM -0800, werner wrote:
> >
> > > > But all my widgets (i.d.: SqlMask, SqlTable but also many other subsidiary
> > > > widgets) derive from gobject as a mean to propagate signals.
> > > Wondered what "gobject" was about when I had a very very quick look at
> > > the code.
> >
> > gobject is now separate from GTK, so you can use it independently. I found
> > it extremly useful. A good introduction �is here:
> >
> > �http://www.pygtk.org/articles/subclassing-gobject/sub-classing-gobjec...
>
> So, I could use that without GTK?


yes!

>
> >
> > > > Since the last release even each SA object inglobe via AttributeExtension a
> > > > gobject that emits signals in order to inform observers of changes in the
> > > > model. (That will change in the future to the new signal frawework of SA 0.7)
> >
> > > > Fields are totally independent from GTK, they talk to miniwidgets that are a
> > > > gtk display of a field value. SqlTable has an implementation that strongly
> > > > depends on gtk.TreeView/gtk/TreeStore.
> > > Wondered what you were using for this stuff.
> Just tried it against my own database using my SA model and it just
> works. Amazing!

:-)

I think that sqlkit/sqledit can be very handy not only for those that
develop an application based on databases *with* sqlkit but also for those
that just want to debug theyre application using sqledit (customized as
suggested in in [2])


> BTW, can't see how does it figure out which column information to
> display for relationship columns? In my cases it shows the right
> column (name) but looking at "Info" for that column it doesn't give
> any indication which column it uses.

Well, you should read the 'completion' documentation [1] at least up to
"foreign key description & search field". The default way is to guess that
the first string field of a table will do. That cannot be always correct so
you can configure it in a table, so that it will work also w/o need of any
programming skill (You edit that from sqledit).

The nice thing is that you can also use as description a mixture of other
columns by just setting e.g.: '%(last_name)s %(first_name)s -
%(city)s'.


[1] http://sqlkit.argolinux.org/sqlkit/completion.html
[2] http://sqlkit.argolinux.org/misc/sqledit.html

> > > What version of GTK is the recommended one (I am on Windows) and what

I forgot to answer at this. I suggest at least 2.16, but it works also with
older ones. The older I use is 2.12.

> > > is a good IDE for it

I use emacs. I do consider it an IDE... ;-)

> Tried WPM but couldn't figure out how to get kinterbasdb (Firebird SQL
> driver), with it, so just deinstalled it all and used the pyGTK all in
> one and easy_install for sqlkit. Worked without any problems:)

> older ones. The older I use is 2.12

You could have lft WPM and just add kinterbasdb for the python interpreter
older ones. The one in c:\Programs\WPM\org.python....

> I already use poedit for my own stuff. So, send me the sqlkit.pot and
> I have a look. Might do you the German (I am Swiss German, "just"
> living in France) one even if I decide against GTK as looking at
> sqlkit has given me lots of ideas and I am still thinking about a "wx"
> version. I can't do it alone as I am not that technical, but maybe
> can convience some others - will see.......

here it is:

http://hg.argolinux.org/py/sqlkit/raw-file/tip/sqlkit/locale/sqlkit.pot


good night
sandro
*:-)

werner

unread,
Mar 10, 2011, 6:01:59 PM3/10/11
to sqlkit
Pietro,
No benefits for sqlkit.

Some people prefere wxPython (or whatever other reason they have to
use it) and currently there is no equivalent.

I have a wxPython based shareware but I want to rework the database
stuff, as it is already SQLAlchemy based it would be a lot easier/
quicker if something like sqlkit existed with support for wxPython.

Werner

Pietro Battiston

unread,
Mar 11, 2011, 3:15:58 AM3/11/11
to sql...@googlegroups.com
Il giorno gio, 10/03/2011 alle 15.01 -0800, werner ha scritto:
> Pietro,
>
> On Mar 10, 8:30 pm, Pietro Battiston <m...@pietrobattiston.it> wrote:
> > Il giorno gio, 10/03/2011 alle 11.21 -0800, werner ha scritto:
> >
> > > I am still thinking about a "wx"
> > > version. I can't do it alone as I am not that technical, but maybe
> > > can convience some others - will see.......
> >
> > Just curious: what would be the benefits?!
> >
> No benefits for sqlkit.
>
> Some people prefere wxPython (or whatever other reason they have to
> use it) and currently there is no equivalent.

Tastes are tastes, I was just curious because while KDE users/developers
for instance may say "for consistency, I would like sqlkit to use QT -
native libraries of my preferred DE", wx adds a non-native layer
wherever it is used... but maybe it is easier to install, for instance,
on Mac than pygtk, and that was what I was wondering.

Pietro

werner

unread,
Mar 11, 2011, 5:55:31 AM3/11/11
to sqlkit
Don't want to start a big discussion/argument on this, but I have a
problem with

"wx adds a non-native layer"???

Looking at the pygtk "File dialog" on Windows it is definitely not
native looking,
my understanding of wx is that it uses native widgets were ever
possible and I think
on *nix this is actually GTK based - but I am no expert on this.

Anyhow pyGTK on Windows is still not quit as native looking as
wxPython - at least
not out of the box.

Werner

Pietro Battiston

unread,
Mar 11, 2011, 6:59:40 AM3/11/11
to sql...@googlegroups.com
Il giorno ven, 11/03/2011 alle 02.55 -0800, werner ha scritto:
> On Mar 11, 9:15 am, Pietro Battiston <m...@pietrobattiston.it> wrote:
> > Il giorno gio, 10/03/2011 alle 15.01 -0800, werner ha scritto:
> >
> > > Pietro,
> >
> > > On Mar 10, 8:30 pm, Pietro Battiston <m...@pietrobattiston.it> wrote:
> > > > Il giorno gio, 10/03/2011 alle 11.21 -0800, werner ha scritto:
> >
> > > > > I am still thinking about a "wx"
> > > > > version. I can't do it alone as I am not that technical, but maybe
> > > > > can convience some others - will see.......
> >
> > > > Just curious: what would be the benefits?!
> >
> > > No benefits for sqlkit.
> >
> > > Some people prefere wxPython (or whatever other reason they have to
> > > use it) and currently there is no equivalent.
> >
> > Tastes are tastes, I was just curious because while KDE users/developers
> > for instance may say "for consistency, I would like sqlkit to use QT -
> > native libraries of my preferred DE", wx adds a non-native layer
> > wherever it is used... but maybe it is easier to install, for instance,
> > on Mac than pygtk, and that was what I was wondering.
> >
> Don't want to start a big discussion/argument on this, but I have a
> problem with
>
> "wx adds a non-native layer"???

"wherever it is used" - pygtk for instance does on Windows but not under
GNOME.

>
> Looking at the pygtk "File dialog" on Windows it is definitely not
> native looking,
> my understanding of wx is that it uses native widgets were ever
> possible and I think
> on *nix this is actually GTK based - but I am no expert on this.

It depends on which frontend you install (there is also QT, and maybe
others) - but yes, GTK frontend is tipically used for instance in GNOME.

>
> Anyhow pyGTK on Windows is still not quit as native looking as
> wxPython - at least
> not out of the box.

OK, that totally makes sense to me, even more so because I ignore the
details.

Pietro

Reply all
Reply to author
Forward
0 new messages