473,414 Members | 1,716 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

A GUI toolkit for Python that is NOT x-windows dependent

I need a script to draw a keyboard to the screen and animate the
marking each key when the key is pressed (among other things like
being able to draw menus). This script is for testing keyboards and
needs to be run by people who may never have touched a computer before
so it needs to have an easy to follow GUI interface. But the Linux
boxes these will be runned on are very low-end, 'diskless' terminals
where running a full X-Windows system would be very slow. Does anybody
know of a GUI toolkit (or a way to draw to the screen) that can be
used from Python script in Linux without having to run X-Windows?
Jul 18 '05 #1
4 1765
Andre Brightway <an****@warpmail.net> wrote:
I need a script to draw a keyboard to the screen and animate the
marking each key when the key is pressed (among other things like
being able to draw menus). This script is for testing keyboards and
needs to be run by people who may never have touched a computer before
so it needs to have an easy to follow GUI interface. But the Linux
boxes these will be runned on are very low-end, 'diskless' terminals
where running a full X-Windows system would be very slow. Does anybody
know of a GUI toolkit (or a way to draw to the screen) that can be
used from Python script in Linux without having to run X-Windows?


pygame, of course
it runs nicely on framebuffer, and seems to be ideal for the task
you describe

--
-----------------------------------------------------------
| Radovan GarabÃ*k http://melkor.dnp.fmph.uniba.sk/~garabik/ |
| __..--^^^--..__ garabik @ kassiopeia.juls.savba.sk |
-----------------------------------------------------------
Antivirus alert: file .signature infected by signature virus.
Hi! I'm a signature virus! Copy me into your signature file to help me spread!
Jul 18 '05 #2
Andre Brightway wrote in message
<88**************************@posting.google.com>. ..
I need a script to draw a keyboard to the screen and animate the
marking each key when the key is pressed (among other things like
being able to draw menus). This script is for testing keyboards and
needs to be run by people who may never have touched a computer before
so it needs to have an easy to follow GUI interface. But the Linux
boxes these will be runned on are very low-end, 'diskless' terminals
where running a full X-Windows system would be very slow. Does anybody
know of a GUI toolkit (or a way to draw to the screen) that can be
used from Python script in Linux without having to run X-Windows?


You may want to try PicoGUI (least mature), nano-x, or qt/embedded. They
all seem to claim Python bindings, although I'm only absolutely sure about
the first. PicoGUI is also network transparent; don't know about the other
two.

There's also pygame, which draws to a framebuffer using SDL, but I don't
know that it provides any gui-toolkit-like abstraction layer (also I think
SDL is a bit heavy). You could also use ncurses (in standard library) for a
character-based gui, instead. If things are really tight, I don't see that
there's any other way.
However, I'm suspicious of your statement that running a full X-Windows
system would be very slow. (Well, maybe a *full* system, but I assume you
just mean the server, not the 500+ MB of X stuff that usually gets installed
along with it.) If it's too slow for X, it's too slow for just about any
GUI, and it's certainly too slow for running Python locally *plus* all the
other not-X gui stuff you'd need to run because you gave up on being network
transparent.

All you need on the client side is the X server, and all the X server does
is *draw*. This doesn't take very much. The bloat usually associated (I
think falsely) with X is X clients and their libraries, and a diskless
terminal doesn't need to host any of that stuff. I've personally run setups
like this with 16mb 486s, and it was still perfectly usable, and in the past
X servers were run on custom hardware much less powerful even than that.
There are projects like ltsp.org and pxes (a bit heaver) which can make
diskless X terminal setups painless to put together.

If your terminals are in a very narrow grey zone where X is still too big
(because of ram starvation, perhaps) but running a gui is just about
possible, you might want to look at vnc, which is even *simpler* than an X
server: it's a remote framebuffer. At least one variant uses DirectFB for
display: directvnc. A terminal runs a vnc client, which connects to your
server, which starts an X server for that client, then echos the (virtual)
display to the vnc client. Now your server is running several copies of X,
you're passing through another abstraction layer, and your latencies are
higher, so it may end up *feeling* slower than just running X on the
terminals in the first place. I'd only use this approach if running X were
absolutely impossible.
--
Francis Avila

Jul 18 '05 #3
an****@warpmail.net (Andre Brightway) wrote in message news:<88**************************@posting.google. com>...
Does anybody know of a GUI toolkit (or a way to draw to the screen) that can be
used from Python script in Linux without having to run X-Windows?


If SDL has good enough support for framebuffers, you might be able to
use Pygame to do what you want. See http://www.pygame.org and
http://www.libsdl.org for details.

Paul
Jul 18 '05 #4
Andre Brightway <an****@warpmail.net> wrote:
I need a script to draw a keyboard to the screen and animate the
marking each key when the key is pressed (among other things like
being able to draw menus). This script is for testing keyboards and
needs to be run by people who may never have touched a computer before
so it needs to have an easy to follow GUI interface. But the Linux
boxes these will be runned on are very low-end, 'diskless' terminals
where running a full X-Windows system would be very slow. Does anybody
know of a GUI toolkit (or a way to draw to the screen) that can be
used from Python script in Linux without having to run X-Windows?


PyQt binds against Qt/Embedded which runs directly on the framebuffer.
We're using this on PDAs and WebPads.
Jul 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Simon Roses Femerling | last post by:
Hey all :) I'm looking for a good crypto toolkit (that should be multiplatform, work on python 2.3, etc..) What I have found looks old and too complex (installing 3 party libs, etc.) I just want...
10
by: Matthew Bell | last post by:
Hi, I'm looking for a high-performance SNMP manager toolkit (SNMPv1 / v2, GET / GETNEXT / GETBULK) I can use with Python on Windows2K/XP. I wonder if anyone has got any suggestions? Commercial...
6
by: Mike C. Fletcher | last post by:
I've put together a page describing how to build Python 2.4 extensions with the free (as in beer, not libre) Microsoft Visual C++ Toolkit compiler. So far I've been able to build Numpy 23.1,...
13
by: Alessandro Pinto | last post by:
Dear All, I'm looking for C++ GUI toolkit which is free and standard. I'm currently using the Fox toolkit. The features I'm looking for are: -Platform independence -Reasonable users support...
2
by: Junpei | last post by:
I need recommendations for a scientific app I'm making, here's what i need, in order of importance 1) Strong/Complete 2d/3d plotting widgets for both data and functions 2) Realtime 2d-plotting 3)...
36
by: Alex Martelli | last post by:
So, I thought I'd tool up to let me build and test Python extensions on Windows (as well as Mac and Linux) -- I'm trying out Parallels Workstation beta on my new Macbook Pro (and so far it seems to...
2
by: vasudevram | last post by:
Hi all, I had created this open source project - xtopdf - http://sourceforge.net/projects/xtopdf - some time ago. It's a toolkit to help with conversion of other file formats to PDF. The...
161
by: Dan Lenski | last post by:
Hi all, I'm a recent, belated convert from Perl. I work in a physics lab and have been using Python to automate a lot of measurement equipment lately. It works fabulously for this purpose. ...
4
by: eefacm | last post by:
I'd like to inform the Python community that the powerful and popular Template Toolkit system, previously available only in its original Perl implementation, is now also available in a beta Python...
12
by: default | last post by:
what would be the best python GUI toolkit, it must be cross platform. i have tried gtk, but it interface are real bad and its coding was difficult so i dropped it, the only remaining are qt4...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.