ANN: GUI wrapper for pygtk, pyqt and wxpython

  • Thread starter Stelios Xanthakis
  • Start date
S

Stelios Xanthakis

Hi.

I'd like to announce the availability of a high-level GUI wrapper
for pygtk, pyqt and wxpython.

Check out the screenshot at

http://students.ceid.upatras.gr/~sxanth/twgui/

I wanted to write a *simple* app with a GUI that didn't look as horrible
as Tk and without having to ask from the users to install this or that.
All three (pygtk, pyqt and wxpython) have serious drawbacks for one to
invest their time learning them.

Any feedback or help from toolkit gurus is most welcome.

Thanks,

Stelios
 
D

Dan Perl

It sounds like a great idea. I assume that this is a wrapper around the
objects that are common in all of those GUI libraries. Can you post a list
of the objects that you support in Twilight? It can be just the list from
Twilight (with short descriptions), without the equivalents in all the 3
libraries.

I have to point out though that there seems to be a bug from what is shown
in the screenshot. The titles of the windows don't match the radio buttons
on the right side. Or just clicking one of those buttons doesn't trigger
the change and you have to click also on 'Run it!'?

Dan
 
T

Torsten Marek

Stelios said:
Hi.

I'd like to announce the availability of a high-level GUI wrapper
for pygtk, pyqt and wxpython.

Check out the screenshot at

http://students.ceid.upatras.gr/~sxanth/twgui/

I wanted to write a *simple* app with a GUI that didn't look as horrible
as Tk and without having to ask from the users to install this or that.
All three (pygtk, pyqt and wxpython) have serious drawbacks for one to
invest their time learning them.
Having had just a short peek at your code (I come from a PyQt background), I'd
suggest that you use properties for stuff like enabled (any widget) and text
(line edits), which saves you a lot of functions. It should also be possible to
define the shadow classes automatically (either dynamically or with a script
that generates them from an input file), because the simple widgets (at least
for PyQt) look pretty much the same.

greetings

Torsten
 
T

Torsten Marek

Stelios said:
Hi.

I'd like to announce the availability of a high-level GUI wrapper
for pygtk, pyqt and wxpython.

Check out the screenshot at

http://students.ceid.upatras.gr/~sxanth/twgui/

I wanted to write a *simple* app with a GUI that didn't look as horrible
as Tk and without having to ask from the users to install this or that.
All three (pygtk, pyqt and wxpython) have serious drawbacks for one to
invest their time learning them.
Having had just a short peek at your code (I come from a PyQt background), I'd
suggest that you use properties for stuff like enabled (any widget) and text
(line edits), which saves you a lot of functions. It should also be possible to
define the shadow classes automatically (either dynamically or with a script
that generates them from an input file), because the simple widgets (at least
for PyQt) look pretty much the same.

greetings

Torsten
 
S

Stelios Xanthakis

Dan said:
It sounds like a great idea. I assume that this is a wrapper around the
objects that are common in all of those GUI libraries. Can you post a list
of the objects that you support in Twilight? It can be just the list from
Twilight (with short descriptions), without the equivalents in all the 3
libraries.

I should really post some online docs.
However there is still a lot that can be done. For now we have
button, checkbutton, label, radiobutton, togglebutton, textentry
editor/viewer, list, tree, popup, dialog, tabs/MDI, openFile, saveFile
image viewer.
I have to point out though that there seems to be a bug from what is shown
in the screenshot. The titles of the windows don't match the radio buttons
on the right side. Or just clicking one of those buttons doesn't trigger
the change and you have to click also on 'Run it!'?

Yes. For example the first window is opened in pygtk. From it I rerun
its code in wx by selecting 'wx' and clicking "Run it!". From the wx I
select pyqt and that results in the qt window. However the library is
not meant to use all 3 toolkits at the same time! There are problems.
QApplication usually freezes the other exec_loops. So the screenshot
is actually fake. Because of the qt window (which was opened last) the
other two don't respond!


Stelios
 
B

Bats

Stelios Xanthakis had this to say:
Hi.

I'd like to announce the availability of a high-level GUI wrapper
for pygtk, pyqt and wxpython.

Check out the screenshot at

http://students.ceid.upatras.gr/~sxanth/twgui/

I wanted to write a *simple* app with a GUI that didn't look as horrible
as Tk and without having to ask from the users to install this or that.
All three (pygtk, pyqt and wxpython) have serious drawbacks for one to
invest their time learning them.

Any feedback or help from toolkit gurus is most welcome.

Thanks,

Stelios
Sounds great.
I'm on Fedora 1, installed Python 2.33 which is causing headaches, but I
tried:
1. Moved all examples to same folder as your wrap_*.py files so that import
would find them.
2. python run2.py
and I get this:

Traceback (most recent call last):
File "run2.py", line 40, in ?
GUI=wrap_pygtk
NameError: name 'wrap_pygtk' is not defined
 
B

Bats

Stelios Xanthakis had this to say:
Maybe copy the wrap_*.py files into examples/
and ./run2.py from in there?

Regards,

Stelios
It doesn't help.

I am sure its a problem on my system with two versions of Python installed.
I get all kinds of sh*t because of that.
Lemme know if you make sense of that error.

PS - Love the wrapper idea; high time it was done. I don't know much about
(read nothing) Curses, but could that not also sneak into the wrappers?

Cheers.
 
B

Bats

Stelios Xanthakis had this to say:
Bats wrote:



I don't know. Sounds like a python bug.
Can't we say:

import foo
bar = foo

anymore?

Maybe copy the wrap_*.py files into examples/
and ./run2.py from in there?

Regards,

Stelios
I did some tinkering.
With python 2.2 it finally runs ok (I had PYTHONPATH issues)
With python 2.3 it chokes on:
GUI=wrap_pygtk
But, if you change that to GUI=wrap_pyqt, it runs fine.

HTH
 
S

Stelios Xanthakis

Bats wrote:

Traceback (most recent call last):
File "run2.py", line 40, in ?
GUI=wrap_pygtk
NameError: name 'wrap_pygtk' is not defined

I don't know. Sounds like a python bug.
Can't we say:

import foo
bar = foo

anymore?

Maybe copy the wrap_*.py files into examples/
and ./run2.py from in there?

Regards,

Stelios
 
M

Magnus Lie Hetland

Stelios Xanthakis had this to say:

It doesn't help.

I am sure its a problem on my system with two versions of Python installed.
I get all kinds of sh*t because of that.
Lemme know if you make sense of that error.

PS - Love the wrapper idea; high time it was done. I don't know much about
(read nothing) Curses, but could that not also sneak into the wrappers?

You might want to take a look at Anygui (anygui.sf.net). Not really
actively developed at the moment, but perhaps a source of inspiration.
It also has support for curses.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top