Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > looking for a light weighted library/tool to write simple GUI abovethe text based application

Reply
Thread Tools

looking for a light weighted library/tool to write simple GUI abovethe text based application

 
 
petr.jakes.tpc@gmail.com
Guest
Posts: n/a
 
      01-25-2008
Hi,
I am working with the Python 2.5 running on the command line version
of Linux Ubuntu 7.04. This means NO X-windows, NO GTK/Gnome, NO
computer mouse, on my machine (AMD Geode 500MHz CPU, VGA output).

I would like to write some really light weighted GU interface. My
concept is to have just few user screens (about 10) controlled via 4
or 5 HW buttons connected to the GPIO pins they are available on the
motherboard (the HW design and the SW concept of reading this buttons
is already solved).

After some googling, I have found below mentioned can be usable, but
first, I would like to ask here for your opinions/experiences/advices.

Best regards

Petr Jakes

http://www.libsdl.org/
http://pyfltk.sourceforge.net/
http://www.pygame.org/news.html
http://pyui.sourceforge.net/
http://pyglet.org/
 
Reply With Quote
 
 
 
 
rndblnch
Guest
Posts: n/a
 
      01-25-2008
On Jan 25, 8:43 pm, (E-Mail Removed) wrote:
> This means NO X-windows, NO GTK/Gnome, NO
> computer mouse, on my machine (AMD Geode 500MHz CPU, VGA output).
>
> I would like to write some really light weighted GU interface. My
> concept is to have just few user screens (about 10) controlled via 4
> or 5 HW buttons connected to the GPIO pins they are available on the
> motherboard (the HW design and the SW concept of reading this buttons
> is already solved).


what you are looking for is curse
http://docs.python.org/lib/module-curses.html
http://www.ibm.com/developerworks/li...l-python6.html

renaud
 
Reply With Quote
 
 
 
 
petr.jakes.tpc@gmail.com
Guest
Posts: n/a
 
      01-25-2008
> > is already solved).
>
> what you are looking for is curse
> http://docs.python.org/lib/module-curses.html
> http://www.ibm.com/developerworks/li...l-python6.html
>
> renaud


Renaud, thanks for your reply.

I think I was not specific/clear enough in my first posting. I know
the curses library ( http://pyncurses.sourceforge.net ). It AFIK
provides TUI (short for: Text User Interface or Textual User
Interface). My needs are GUI, I mean "a nice VGA pictures" on the VGA
LCD 10" display.

Petr
 
Reply With Quote
 
Lorenzo E. Danielsson
Guest
Posts: n/a
 
      01-25-2008
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
>>> is already solved).

>> what you are looking for is curse
>> http://docs.python.org/lib/module-curses.html
>> http://www.ibm.com/developerworks/li...l-python6.html
>>
>> renaud

>
> Renaud, thanks for your reply.
>
> I think I was not specific/clear enough in my first posting. I know
> the curses library ( http://pyncurses.sourceforge.net ). It AFIK
> provides TUI (short for: Text User Interface or Textual User
> Interface). My needs are GUI, I mean "a nice VGA pictures" on the VGA
> LCD 10" display.
>
> Petr


What you need then is something like SVGAlib (http;//svgalib.org). Only
really old people like myself know that it exists. I've never heard of
any Python bindings for it, but that might be where you come in. I
haven't looked at SVGAlib for years, and I'm not sure about the state of
the video drivers. I suggest you look at that first.

You could also look at GGI (http://ggi-project.org). GGI has different
output targets. IIRC, one of them is directfb. To tell you the truth
I've never really used GGI. There seems to be a python wrapper for GGI,
although it is fairly old. Maybe you could look at the code for some ideas.

You should also be able to compile SDL to be able to use directfb as a
target. If your libSDL handles it, then that should apply to wrapper
libraries as well, including pygame. I've never tried running SDL apps
this way, but if it works well, that would probably be your 'best' option.

Lorenzo

 
Reply With Quote
 
Hexamorph
Guest
Posts: n/a
 
      01-25-2008
Lorenzo E. Danielsson wrote:
> (E-Mail Removed) wrote:


>> I think I was not specific/clear enough in my first posting. I know
>> the curses library ( http://pyncurses.sourceforge.net ). It AFIK
>> provides TUI (short for: Text User Interface or Textual User
>> Interface). My needs are GUI, I mean "a nice VGA pictures" on the VGA
>> LCD 10" display.
>>
>> Petr

>
> What you need then is something like SVGAlib (http;//svgalib.org). Only
> really old people like myself know that it exists. I've never heard of
> any Python bindings for it, but that might be where you come in. I
> haven't looked at SVGAlib for years, and I'm not sure about the state of
> the video drivers.


I don't think that there's a Python binding for it. Svgalib never
has gained enough popularity for anybody to write such bindings.
However, as long as the video card supports VGA or VESA it should work.

Another possibility might be using Xvesa (KDrive) which is a really
tiny self-containing X server for VGA/SVGA/FBdev. With this you can
atleast use simple GUI toolkits like Athena or TK or even use Xlib
directly (if you don't fear that adventure)

See:
http://www.xfree86.org/current/Xvesa.1.html
http://www.pps.jussieu.fr/~jch/software/kdrive.html


HTH
 
Reply With Quote
 
Diez B. Roggisch
Guest
Posts: n/a
 
      01-25-2008
(E-Mail Removed) schrieb:
> Hi,
> I am working with the Python 2.5 running on the command line version
> of Linux Ubuntu 7.04. This means NO X-windows, NO GTK/Gnome, NO
> computer mouse, on my machine (AMD Geode 500MHz CPU, VGA output).
>
> I would like to write some really light weighted GU interface. My
> concept is to have just few user screens (about 10) controlled via 4
> or 5 HW buttons connected to the GPIO pins they are available on the
> motherboard (the HW design and the SW concept of reading this buttons
> is already solved).
>
> After some googling, I have found below mentioned can be usable, but
> first, I would like to ask here for your opinions/experiences/advices.
>
> Best regards
>
> Petr Jakes
>
> http://www.libsdl.org/
> http://pyfltk.sourceforge.net/
> http://www.pygame.org/news.html
> http://pyui.sourceforge.net/
> http://pyglet.org/



pygame is based on sdl, pyui can render to pygame. So if you use that
stack, it's a question of SDL being capable of directly rendering to
something like SVGALib.

Pyglet is OpenGL, and fltk seems to need X.

But WHY aren't you just installing X? You don't need to run a
full-fledged Desktop like gnome or kde on top of it - just use ratpoison
or anything else as desktop manager & be happy.

After all, my first PC had 16MB of RAM and 133MHz - and ran X w/o any
problems.

Diez
 
Reply With Quote
 
Paul Boddie
Guest
Posts: n/a
 
      01-25-2008
On 25 Jan, 22:06, "Lorenzo E. Danielsson"
<(E-Mail Removed)> wrote:
>
> What you need then is something like SVGAlib (http;//svgalib.org). Only
> really old people like myself know that it exists. I've never heard of
> any Python bindings for it, but that might be where you come in. I
> haven't looked at SVGAlib for years, and I'm not sure about the state of
> the video drivers. I suggest you look at that first.


I believe that SVGAlib was superseded by GGI and other projects, and I
recall that SVGAlib was considered to be something of a nightware with
respect to how it handles various resources. Certainly, I haven't been
very impressed by the behaviour of software using it.

> You could also look at GGI (http://ggi-project.org). GGI has different
> output targets. IIRC, one of them is directfb. To tell you the truth
> I've never really used GGI. There seems to be a python wrapper for GGI,
> although it is fairly old. Maybe you could look at the code for some ideas.


I've had to build software using GGI, and the biggest problem has been
getting packages for it. That said, it seemed to work fairly
acceptably once built and installed. Meanwhile, some people favour
Allegro [1] for this kind of work, and I've been confronted with newly
developed software which uses Allegro, so it's arguably in a different
maintenance state than something like SVGAlib or GGI.

> You should also be able to compile SDL to be able to use directfb as a
> target. If your libSDL handles it, then that should apply to wrapper
> libraries as well, including pygame. I've never tried running SDL apps
> this way, but if it works well, that would probably be your 'best' option.


I'd agree with these sentiments; SDL seems to be the best supported
technology of this kind in the Python universe, and one of the most
widely deployed in general; I've felt quite comfortable building
software against it. It would be very interesting to see whether a
framebuffer-based SDL could support Pygame, and I imagine that the
Pygame mailing list might already have some answers in its archives on
this topic.

Paul

[1] http://www.talula.demon.co.uk/allegro/
 
Reply With Quote
 
Chris Mellon
Guest
Posts: n/a
 
      01-26-2008
On Jan 25, 2008 5:17 PM, Paul Boddie <(E-Mail Removed)> wrote:
> On 25 Jan, 22:06, "Lorenzo E. Danielsson"
> <(E-Mail Removed)> wrote:
> >
> > What you need then is something like SVGAlib (http;//svgalib.org). Only
> > really old people like myself know that it exists. I've never heard of
> > any Python bindings for it, but that might be where you come in. I
> > haven't looked at SVGAlib for years, and I'm not sure about the state of
> > the video drivers. I suggest you look at that first.

>
> I believe that SVGAlib was superseded by GGI and other projects, and I
> recall that SVGAlib was considered to be something of a nightware with
> respect to how it handles various resources. Certainly, I haven't been
> very impressed by the behaviour of software using it.
>
> > You could also look at GGI (http://ggi-project.org). GGI has different
> > output targets. IIRC, one of them is directfb. To tell you the truth
> > I've never really used GGI. There seems to be a python wrapper for GGI,
> > although it is fairly old. Maybe you could look at the code for some ideas.

>
> I've had to build software using GGI, and the biggest problem has been
> getting packages for it. That said, it seemed to work fairly
> acceptably once built and installed. Meanwhile, some people favour
> Allegro [1] for this kind of work, and I've been confronted with newly
> developed software which uses Allegro, so it's arguably in a different
> maintenance state than something like SVGAlib or GGI.
>
> > You should also be able to compile SDL to be able to use directfb as a
> > target. If your libSDL handles it, then that should apply to wrapper
> > libraries as well, including pygame. I've never tried running SDL apps
> > this way, but if it works well, that would probably be your 'best' option.

>
> I'd agree with these sentiments; SDL seems to be the best supported
> technology of this kind in the Python universe, and one of the most
> widely deployed in general; I've felt quite comfortable building
> software against it. It would be very interesting to see whether a
> framebuffer-based SDL could support Pygame, and I imagine that the
> Pygame mailing list might already have some answers in its archives on
> this topic.
>



I agree that SDL is probably the best choice but for the sake of
completeness, Gtk can (at least in theory - I've never tried it) be
built against directfb and run without X.
 
Reply With Quote
 
petr.jakes.tpc@gmail.com
Guest
Posts: n/a
 
      01-26-2008

> I agree that SDL is probably the best choice but for the sake of
> completeness, Gtk can (at least in theory - I've never tried it) be
> built against directfb and run without X.


from the Pygame Introduction: Pygame is a Python extension library
that wraps the SDL library and it's helpers. So you mean, Pygame can
run without X?

BTW I have nothing against X, I just have not experiences on the GUI
field, so my feeling was it can run faster without X on the 500MHz AMD
Geode CPU.

Petr


 
Reply With Quote
 
Tim Rau
Guest
Posts: n/a
 
      01-26-2008
On Jan 25, 10:25 pm, (E-Mail Removed) wrote:
> > I agree that SDL is probably the best choice but for the sake of
> > completeness, Gtk can (at least in theory - I've never tried it) be
> > built against directfb and run without X.

>
> from the Pygame Introduction: Pygame is a Python extension library
> that wraps the SDL library and it's helpers. So you mean, Pygame can
> run without X?
>
> BTW I have nothing against X, I just have not experiences on the GUI
> field, so my feeling was it can run faster without X on the 500MHz AMD
> Geode CPU.
>
> Petr


The problem is not with x: you should be able to run x just fine with
only 133MHZ and a few megs of ram. The performance issues on such a
machine come from things like kde and gnome. use one of the simpler
window managers.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
weighted mean; weighted standard error of the mean (sem) C Barrington-Leigh Python 1 09-10-2010 02:03 AM
choosing random item from set with weighted probability Digital Puer Java 5 11-29-2004 05:57 AM
need help with weighted two static routes and NAT Jog Dial Cisco 2 11-17-2004 11:30 AM
Weighted Fair-Queuing Martin Bilgrav Cisco 8 11-03-2003 09:08 PM
Maximum Weighted Matching Algorithm Dan Peder Eriksen Java 3 08-17-2003 09:35 PM



Advertisments