Found a very nice, small, cross-platform GUI toolkit for Python.

L

laplacian42

I think I just found the GUI toolkit for Python I've been searching
for. It seems to meet all of the following requirements:

* free software
* small (I don't need batteries -- Python already comes with those.)
* easy to use
* actively maintained
* cross-platform
* easy to install
* based on a stable and actively-maintained C library
* does not depend on an external scripting language (for example,
Tcl)
* well-documented
* not too many dependencies
* can easily integrate with PyOpenGL
* support for accessibility

and it's also written in Python.

I have no idea how it's stayed under the radar in the Python community
for this long, yet here it is: [OcempGUI](http://ocemp.sourceforge.net/
gui.html). The C library it depends upon? [SDL](http://
www.libsdl.org/) (via [PyGame](http://www.pygame.org/news.html)).

The sf project page is <http://sourceforge.net/projects/ocemp/>.

Installation only requires getting SDL installed, then PyGame, and
then a `sudo python setup.py install` for OcempGUI. `cd` into its `doc/
examples` directory and run a few of the examples (ex. `python
hello_world.py`).

The part of [the manual](http://ocemp.sourceforge.net/manual/ocempgui-
manual.html) that seems most like a beginner tutorial is <http://
ocemp.sourceforge.net/manual/gui_applications.html>.
 
P

Python Nutter

Had a look and it is still under my radar unfortunately because of
TkInter. OceanGUI has a lot of large decencies (Pygame, SDL libraries,
PyObjC, etc.) to install on my system to just to get a GUI thats no
better loking than TkInter which comes pre-installed (no dependencies)
on most every major platform.

If I was writing a game I might be interested, but I'd want to do some
serious skinning of that GUI to make it look better.

For applications installing the full wxWidgets or Qt toolkits would be
less disk space and dependcies than OceanGUI and performance would
probably be higher. TkInter also has many skins/themes you can add
that makes it rather, although not 100% native looking on target
systems.

For example, check out
http://tclmacbag.autons.net/screenshots.phtml

For 86K download/dependencies I can get a rather Mac looking GUI.

Cheers,
PN
 
L

laplacian42

Had a look and it is still under my radar unfortunately because of
TkInter. OceanGUI

Note: spelling is "OcempGUI". Also, since google broke some of the
links,
here's that main link again:

http://ocemp.sourceforge.net/gui.html
has a lot of large decencies (Pygame, SDL libraries,
PyObjC, etc.) to install on my system

Well, to be fair, SDL is pretty commonly-used software and they offer
binary downloads for Mac OS X and MS Windows. Pygame seems to provide
the same. So, installation should be a breeze.
to just to get a GUI thats no
better loking than TkInter which comes pre-installed (no dependencies)
on most every major platform.

Well, of course, there *is* a dependency: you need Tcl/Tk installed.
If I was writing a game I might be interested, but I'd want to do some
serious skinning of that GUI to make it look better.

I suppose so, but the point of my post was that by default it makes
quite a nice GUI toolkit.
For applications installing the full wxWidgets or Qt toolkits would be
less disk space and dependcies than OceanGUI

What? Qt and wX are *huge* compared to OcempGUI.
and performance would
probably be higher.

Probably, but wX and Qt are written in C++. OcempGUI is pure Python,
which would make it easier for the Python community to help extend,
optimize, and maintain.
TkInter also has many skins/themes you can add
that makes it rather, although not 100% native looking on target
systems.

OcempGUI can also be "themed" as well. Though I'm not sure how much is
out there yet.
 
B

Bruno Desthuilliers

(e-mail address removed) a écrit :
Well, yes. KDE users will already have Qt installed (and maybe PyQt)
but may groan at the prospect of having to install GTK+ and PyGTK.
Gnome users will already have GTK+ installed (and maybe PyGTK), but
may groan at having to install Qt and PyQt. However, both will likely
have no qualms about installing SDL and Pygame (which are pretty small
and also allow them to play various games as well).

FWIW (and servers set aside, of course), I can hardly remember of any of
linux box I worked one not having both GTK and KDE installed.
 
L

laplacian42

Don't forget that many people will already have Qt already installed,
such as KDE users, or those who use Skype, Google Earth, or Opera.
Though KDE's Qt will likely be accessibily installed in a convinient
place, though, I'm not so sure about those other examples.

Well, yes. KDE users will already have Qt installed (and maybe PyQt)
but may groan at the prospect of having to install GTK+ and PyGTK.
Gnome users will already have GTK+ installed (and maybe PyGTK), but
may groan at having to install Qt and PyQt. However, both will likely
have no qualms about installing SDL and Pygame (which are pretty small
and also allow them to play various games as well).
 
L

laplacian42

Interesting!  One of the commercial apps I'm involved (C++ not python)
in uses SDL as its GUI with windows etc built on top of it.  It means
that it looks exactly the same on all supported platforms and since it
usually runs full screen that is fine.  I imagine this GUI toolkit
fits the same niche.

Presumably since it uses SDL then all the GUI will appear in one
window?  So windows within windows in the MDI style?

There is a `window.py` example that comes with the distribution. It
has modal and non-modal windows within the main window.

I haven't yet seen any examples where OcempGUI runs full-screen.

The relevant portion of the manual re. subwindows is:
http://ocemp.sourceforge.net/manual/windows_and_dialogs.html
 
P

Python Nutter

Note: spelling is "OcempGUI". Also, since google broke some of the
links,
here's that main link again:

Thats my bad or more to the point my iPhone bad, typing fast with
spellcheck changes words to real dictionary words.

Well, to be fair, SDL is pretty commonly-used software and they offer
binary downloads for Mac OS X and MS Windows. Pygame seems to provide
the same. So, installation should be a breeze.

Not on Mac. To get SDL, PyObjC, PyGame and other dependencies
installed on the platform you are talking on downloading and
installing close to 50MB+ of packages before you get to the point
where you install the OcempGUI package.

Thats a lot to ask of a user just to run my one program on their
system. If it was just myself and I wanted to go through the process
for educational/self-benefit I wouldn't mind.

But TkInter is already installed (0 dependencies) and on every Mac out
there so when I said 87Kbytes for a widget set that looks rather Mac
like I was saying compare 87Kbytes to 50+Megabytes to get a GUI for my
python application.

Along the same lines on my Linux boxes, GDK+/KDE are normally already
installed, nothing for the entire user base to install additional or
very little (additional) dependencies to install to get a wxWidget or
Qt interface going on those systems. Python wrappers are small but the
"additional" dependency installs above and beyond the base system is
what I am pointing at as killing off any interest in OcempGUI.

I also have this sneaking suspicion that the BDFL is secretly on the
sidelines waiting for the Tk tile theming engine to mature as if it
does and becomes standard in Python distributions I would say the
justification for learning wx and qt would be diminished by an unknown
quantity.
 
L

laplacian42

Thats my bad or more to the point my iPhone bad, typing fast with
spellcheck changes words to real dictionary words.


Not on Mac. To get SDL, PyObjC, PyGame and other dependencies
installed on the platform you are talking on downloading and
installing close to 50MB+ of packages before you get to the point
where you install the OcempGUI package.

Funny you should mention this. I'd just been getting it installed on a
Mac I have access to. Here's what it took:

1. Install a Python from python.org. Something about the Pygame
installer not wanting to use the system Python. Also, it wants v2.5.
Ok. (As an aside, that's about 19 MB.) This is a mpkg file in a dmg,
so the install is trivial.

2. Now SDL. This one is just a drag-and-drop to your `/Library/
Frameworks` folder. Easy, but the user will have to look into the
README to know what to do. (1 MB)

3. Now PyObjC. Another mpkg file. It's available at the pygame site.
(6 MB)

4. Pygame. An mpkg in a zip file. (9 MB)

5. Whoops. Surprise. NumPy is required. mpkg in a dmg. (3 MB)

6. Finally, OcempGUI. This is a `sudo python setup.py install`. (4 MB)

That's 42 MB all told, admin rights required, and the examples are
running. Pretty neat.
Thats a lot to ask of a user

[sigh] Probably. Unless maybe all the prereq's were gathered together
with a script to run through and install them all one after another.
just to run my one program on their
system.

Well, it will allow them to run *any* OcempGUI program thereafter, but
I see your point.
If it was just myself and I wanted to go through the process
for educational/self-benefit I wouldn't mind. But TkInter is already installed (0 dependencies) and on every Mac out
there

Just tried that. Didn't know it was all installed (Tcl/Tk too) and
ready to go. Wow that's pretty darn convenient.
I also have this sneaking suspicion that the BDFL is secretly on the
sidelines waiting for the Tk tile theming engine to mature as if it
does and becomes standard in Python distributions I would say the
justification for learning wx and qt would be diminished by an unknown
quantity.

Aye.
 

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,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top