PyGUI 2.5.3 is available:
http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/
Clipboard access now implemented on MacOSX, plus a few
bug fixes.
What is PyGUI?
--
PyGUI is a cross-platform GUI toolkit designed to be lightweight
and have a highly Pythonic API.
--
Gregory
geoff wrote:
Greg, I had to solve this problem in another application and ended up
using the array module and the with the slice syntax.
import array
input = rgbaRGBA1234
ba = array.array('c', input)
ba[0::4], ba[2::4] = ba[2::4], ba[0::4]
Yep, I was thinking the same thing myself. I'll
Colin Brown wrote:
Macintosh:PyGUI-2.5 colin$ python setup.py install
Traceback (most recent call last):
File setup.py, line 12, in module
from distutils_extensions import pygui_build_py
ImportError: No module named distutils_extensions
Sorry about that! The missing file is attached, and
PyGUI 2.5 is available:
http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/
Lots of new stuff in this version. Highlights include:
- Improved facilities for customising the standard menus.
- Functions for creating PyGUI Images from PIL images and numpy arrays.
- ListButton - a
Pango seems to have a creative notion of what the point
size of a font means.
On most systems, the size of a font is taken to be the
total height, including ascent and descent. However,
Pango seems to think it means the ascent only.
For example, using Cocoa on MacOSX, if I ask for
48 point
Can anyone think of an efficient way to convert a string
full of RGBA image data to BGRA, using only what's available
in the standard library?
I'm trying to add a function to PyGUI for creating an Image
object from arbitrary data. The problem I'm having is that
GDI+ on Windows expects BGRA,
It turns out that the currently released version of Pango
is not quite up to snuff -- it's missing some annotations
on method arguments that leads gobject introspection astray.
It looks like these have been fixed in the git repository,
so I tried to check it out and compile it, and discovered
John Stowers wrote:
Is this on Linux?
No, it's MacOSX 10.6.4 (Snow Leopard). So I can't rely on
any of the standard Linux packages or dependency management
mechanisms.
/etc/xml/catalog
Okay, I could try putting the dtd in there.
However, I've decided to sidestep the issue for now and
Has anyone successfully used the override_font() method
in Gtk 3 via pygobject introspection?
I can't seem to get it to do anything on MacOSX 10.6.4.
Thanks,
Greg
___
pygtk mailing list pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
With Gtk 2 I was using the following technique to find out
the default foreground and background colours for a selection:
from gtk import Style
s = Style()
foreground = s.fg[3]
background = s.bg[3]
However, with Gtk 3 via gi, s.fg is coming up as an empty
list.
Can anyone suggest an
How are you supposed to call the PangoLayout.get_pixel_size()
method using gobject introspection?
The C signature is
void pango_layout_get_pixel_size(
PangoLayout *layout, int *width, int *height);
Using the old Python bindings, you called it with no parameters
and it returned a 2-tuple.
John Stowers wrote:
In Gtk-3 GtkStyle was replaced with GtkStyleContext
http://library.gnome.org/devel/gtk/stable/GtkStyle.html
Okay, so which style properties best correspond to the
old fg[3] and bg[3] entries in GtkStyle? Nothing obvious
seems to spring out of the docs.
--
Greg
Tomeu Vizoso wrote:
I think you are finding this bug:
https://bugzilla.gnome.org/show_bug.cgi?id=631507
Have added some comments that should help if someone is willing to
look at this issue.
Thanks.
It seems to be a non-fatal error, so I decided to press on
and see what would happen. I
I'm trying to compile gobject-introspection-0.10.4 on
MacOSX 10.6.4 and getting the following errors:
/usr/include/libkern/i386/_OSByteOrder.h:49: syntax error, unexpected '{',
expecting ',' or ';' in '{' at '{'
/usr/include/libkern/i386/_OSByteOrder.h:58: syntax error, unexpected '{',
PyGUI 2.4 is available:
http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/
Highlights of this release:
* Python 3 Compatible on MacOSX and Windows.
* ScrollableView has been overhauled on Windows and should now
work with all builds of pywin32 as far as I know.
What is PyGUI?
jors wrote:
There won't. You will have to use Python GObject Introspection instead.
Does this exist in a usable form yet?
The web site says At this point we need documentation, stability
and users! which sounds like it's not ready for prime time yet.
--
Greg
PyGUI 2.3.2 is available:
http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/
This version fixes a problem in Cocoa whereby the coordinate
system for drawing in a Pixmap was upside down, and corrects
a slight mistake in the Canvas documentation.
What is PyGUI?
--
PyGUI is a
PyGUI 2.3.1 is available:
http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/
This version incorporates a modification that I hope will
improve the behaviour of ScrollableViews on Windows with
pywin32 builds later than 212.
(There are still problems with it, though. If the Scrollable
Thomas Heller wrote:
Is the list available on gmane?
I have received a reply from gmane saying that a subscription
request has been sent and that the gmane group would be
created when the first message arrives.
I'm not a gmane user myself, so someone may want to take a
look over there and see
Thomas Heller wrote:
Is the list available on gmane?
I have received a reply from gmane saying that a subscription
request has been sent and that the gmane group would be
created when the first message arrives.
I'm not a gmane user myself, so someone may want to take a
look over there and see
PyGUI 2.1.1 is available:
http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/
This is an emergency bugfix release to repair some major
breakage in the gtk version. Also corrects some other
problems.
What is PyGUI?
--
PyGUI is a cross-platform GUI toolkit designed to be
Pietro Battiston wrote:
And I promise I won't come there just saying that PyGUI API sucks
Okay, that particular remark was a bit rude, and I
apologise for it.
Let me rephrase: One of the reasons I created PyGUI
is that none of the existing cross-platform GUI APIs,
including pygtk, are entirely
John Finlay wrote:
Start your own list for the community that is interested in your project.
That's not going to reach anyone who doesn't already
know about it.
It's probably a good idea for ongoing discussion,
though. Any suggestions on the best way of going
about it? I could start a Google
John Finlay wrote:
Greg,
Why do you post to mailing lists that are unrelated to your project? I
would appreciate it if in future you didn't post a message about your
project ot the PyGTK mailing list.
I posted the announcement to the pyobjc, pygtk and pywin32
lists because PyGUI uses all
Luis A. Bastiao Silva wrote:
But it just works for application wroted from stratch, otherwise
application wroted in pygtk need to be ported to work cross-platform.
It's already possible to run pygtk programs on all three
platforms, if you're willing to install the required
libraries. API
PyGUI 2.1 is available:
http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/
Highlights of this version:
* Win32:
Fixed bug preventing PyGUI apps from working under pythonw
Fixed incorrect mouse coordinates in ScrollableView
Added more standard cursors
* MacOSX:
Kim Adil wrote:
Would you advise implementing the database
query using gobject.idle_add() or just create a separate thread
(gtk.threads_enter(), gtk.threads_leave(),etc)?
I would recommend using gobject.idle_add() if at all
possible. Best to avoid the hassles of dealing with
threads in a GUI
Tobias Weber wrote:
according to the docs gtk.TreeModelRow.iterchildren should return None
if there are no children. Instead I'm getting an iterator that raises
StopIteration the first time I call next().
Looks like the docs are wrong -- what they describe is not
sane behaviour for a
Walter Leibbrandt wrote:
For some inexplicable reason I've always believed that
get_size_request() and size_request() are the same.
I don't think it's all that inexplicable -- it's a
pretty confusing piece of API design!
--
Greg
___
pygtk mailing
PyGUI 2.0.5 is available:
http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/
More bug fixes for various platforms.
Still no idea what's causing the object has been destroyed
error on Windows XP, though. Does this happen for everyone?
Is there anyone who *has* got 12-scroll.py working
Randy Syring wrote:
Could you tell me briefly how this project differs from something like
wxPython?
It wraps platform-specific libraries directly, rather than
being a wrapper around another cross-platform library. This
means less bloat and less dependencies. Chances are you
already have the
PyGUI 2.0.4 is available:
http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/
Fixes a few more bugs and hopefully improves things
on Windows, although I can't be sure it will fix all
the Windows problems people are having, because I
haven't been able to reproduce some of them.
What is
PyGUI 2.0.2 is available:
http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/
Fixes problem on Windows causing This file should not
be imported error.
What is PyGUI?
--
PyGUI is a cross-platform GUI toolkit designed to be lightweight
and have a highly Pythonic API.
--
PyGUI 2.0.1 is available:
http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/
Fixes some problems in setup.py affecting installation
on Linux and Windows.
What is PyGUI?
--
PyGUI is a cross-platform GUI toolkit designed to be lightweight
and have a highly Pythonic API.
--
PyGUI 2.0 is available:
http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/
Highlights of this release:
* Native Windows implementation, based on pywin32 and ctypes.
* Full set of Postscript-style path construction operators
available on all platforms.
* Mouse and keyboard events
france...@promotux.it wrote:
error: package directory 'Gtk' does not exist
Smeg, there's a bug in the installer. I'll release
a fix soon. In the meantime, try replacing the
following line in setup.py:
packages.append(Gtk)
with
packages.append(GUI.Gtk)
I've also noticed another problem
Joel Hedlund wrote:
So don't draw concentric circles on your test widgets, kids!
Yeah. And if you've seen some of the wilder optical illusions
around, you'll know that if you choose just the wrong pattern
it'll twitch all by itself, without you having to write any
code at all!
--
Greg
Frédéric wrote:
In several places, instead of having my application name, I get '-c'.
This could be a result of the app having got launched
via 'python -c' somewhere along the way:
% python -c 'import sys; print sys.argv[0]'
-c
Not sure whether to regard this as a bug or not. It's
not clear
Jeffrey Drake wrote:
Is there a font that I can guarantee looks the same across all
platforms, or could I actually distribute a font with the application to
be loaded by cairo
The Bitstream Vera fonts are freely redistributable.
--
Greg
___
pygtk
Andrej wrote:
I have read the FAQ and attempted to use jhbuild to build gtk and pygtk.
I've managed to get gtk working on MacOSX, but I didn't use jhbuild.
I just kept on downloading dependencies and doing configure/make/install
on them manually. The process did eventually terminate, and I
[EMAIL PROTECTED] wrote:
def g():
while True:
do_something_useful()
yield True
Does it make sense to call it like this?
gobject.idle_add(g)
No, but it might make sense to use it like this:
gobject.idle_add(g().next)
--
Greg
Nikolaus Rath wrote:
How can I force the window to redraw itself after
I have updated the state variables?
Look at the queue_draw() and queue_draw_area() methods
of class Widget. These cause all or part of the widget
to be redrawn next time round the event loop.
--
Greg
Filip Van Raemdonck wrote:
I used to always get annoyed at MDI applications in the past
You're not the only one. I believe that even Microsoft
discourage the use of MDI these days.
--
Greg Ewing, Computer Science Dept, +--+
University of Canterbury
or attribute lookups that aren't satisfied
by your class will be automatically redirected to the
Entry widget.
--
Greg Ewing, Computer Science Dept, +--+
University of Canterbury, | Carpe post meridiem! |
Christchurch, New Zealand
krishnakant Mane wrote:
my main purpose is to have a main window with menu and every item in
the dropdown menu would open a new window while keeping the main
window with the menu intact.
Is there any reason the new window can't just be an
ordinary top-level window, instead of being inside the
krishnakant Mane wrote:
the manual on pygtk2 states that item factory is an easy way.
now since I am finding it difficult, there must be some thing I am
seriously missing.
It probably is easier if you're programming in C, but that
isn't necessarily true in Python.
Last time I was using pygtk,
Caleb Marcus wrote:
One question I have is, what's
the difference between iters and paths?
At a guess, I'd say that iters are likely to be more
efficient, as they can hook directly into the underlying
data structure, whereas a path requires some sort of
lookup operation each time it's used.
Thomas Dybdahl Ahle wrote:
You want to know when the mose moves?
What I want is:
* No mouse cursor is visible.
* All mouse movements reported as relative movements,
with no restrictions from hitting the edges of the
screen.
* No danger of accidentally clicking on something
outside of
Johan Dahlin wrote:
Greg Ewing wrote:
* All mouse movements reported as relative movements,
with no restrictions from hitting the edges of the
screen.
X will only report mouse absolute mouse positions, you can emulate this
by calculating it yourself though.
Yes, but then you stop
I've been working on a game that is controlled by relative
mouse movements in the style of Oxyd. I started out using
pygame in grab_input mode, which works very well, but
for various reasons I want to migrate the whole thing
over to an environment with better GUI support.
Does anyone have any
Nathaniel Smith wrote:
gtk.gdk.Display.warp_pointer. (As is not too
uncommon for quirky low-level stuff like this, that last is not
documented in the pygtk manual
That sounds interesting, thanks.
I did play around with the grabbing functions, but it
seems they're not true X-level grabs, and
Donn wrote:
you have to do background work like this one, you need some kind of
multithreading.
Blimey. I have managed to get this far in life without ever looking at
threads. I suppose it's high time ...
That's not the only way. You can use gobject.timeout_add()
to arrange for a function
Donn wrote:
#How to put them at x,y? And later, drag them?
Use the move() method of the Layout widget to position them.
Dragging them is going to be tricky. Before trying to do
that, I would be asking myself whether they really *need*
to be widgets, or just something that you draw
Donn wrote:
I
want to put custom widgets (drawn by cairo calls) onto a vast, endless, plane
at arbitrary x,y positions.
You want a gtk.Layout. It lets you place widgets at explicit
positions in a 32-bit coordinate system and can be scrolled.
--
Greg
[EMAIL PROTECTED] wrote:
How am I supposed to view this file (Mac OS X)?
Samuel http://debain.org/blog/calendar2.ogg
^^^
Obviously it's an audio calendar. :-)
--
Greg
___
pygtk mailing list
Pascal Duchatelle wrote:
I am trying to re-use children widgets of which I destroyed (maybe not
the right choice) the parent in another parent.
You may need to detach the child widgets before destroying
the parent, if you want to re-use the children. Otherwise
they get recursively destroyed
Mario Beauchamp wrote:
Hi folks.
On 4/11/07, Tony Nelson [EMAIL PROTECTED] wrote:
Python will collect objects as soon as they become unreferenced.
Immediately.
Well, it turns out it's not immediate. Someone told me that Python 2.4
does a collect every 700 deallocations
Both of these are
Miki wrote:
Hi again,
I wrote a simple C program:
#define PYTHON /home/mikib/t.py
main(argc, argv)
char **argv;
{
setreuid(0,0);
setregid(0,0);
execvp(PYTHON, argv);
}
But after I compiled the C program and run it the Pyton program did not
run as 'root' user,
Of course it won't -- in
Miki wrote:
How can I run pygtk application in root (setuid) mode
It would be very dangerous to run the whole application
setuid, since what a Python program does depends a lot
on the environment (via PYTHONPATH, etc).
The usual advice in situations like this is to write
a small C program
Funky Fred wrote:
Basically, I wanted to view the hex of some files (and others in
different ways)
I think your users will appreciate it as well if
you insert some newlines. Viewing multiple kilobytes
of hex all on one line isn't a pleasant experience...
--
Greg
Fredrik Corneliusson wrote:
It seems GTK's message dialog (gtk.MessageDialog) does not work as
expected on win32 as it does not stay on top if it's parent window
(but it's still modal and locks the parent).
I've seen the same behaviour in some non-Gtk applications
on Windows, too, so it seems
shawn bright wrote:
My question is, can this be done ? will a pygtk app run on windows if
they install gtk libs and python ?
Yes, I'm doing this, and it works. It can be a bit tricky
tracking down a binary installer for gtk and getting paths,
etc. set up right.
The best thing would be to use
Paul Borghese wrote:
I have a need to stall my program for about 10 seconds before
continuing.
Are you sure that's *really* what you need to do?
If you're waiting for something else to finish,
it's better to truly wait until it's finished
rather than guess how long it's going to take.
--
David Hirschfield wrote:
Will all objects created while the garbage collector was off now
be un-collectable?
No, they'll be collected the next time the garbage
collector becomes enabled and runs again.
Also note that disabling gc only affects objects
that are being kept alive by cycles.
into a
pygtk drawing area.
--
Greg Ewing, Computer Science Dept, +--+
University of Canterbury, | Carpe post meridiem! |
Christchurch, New Zealand | (I'm not a morning person.) |
[EMAIL PROTECTED
Felix Rabe (public) wrote:
I use Thunderbird and there's the small difference between Ctrl-R
(reply; private, wrong) and Ctrl-Shift-R (reply all; to list, right)
Sounds like there are two user interface problems here:
(1) Too-similar keyboard shortcuts for things you
would prefer not to
Tony Nelson wrote:
It would have to be a circular reference (with a __del__() method?).
Without a __del__ method, otherwise the gc would just put
it on the uncollectable garbage list, which wouldn't help.
I'd look for places where you're inadvertently creating
a cycle.
--
Greg
Brian wrote:
But I can't find out any more about the StopIteration. ie. where is it
defined, where do you import it from.
Its a builtin. You don't have to import it.
--
Greg
___
pygtk mailing list pygtk@daa.com.au
JUAN ERNESTO FLORES BELTRAN wrote:
i just not like the color/shape/etc of the default pygtk installation i
want to improve it and keep it consistent independently of the
system/installation my code is running on...no matter the system i run
the code on or the theme is installed, i want the
somewhat. The Style
object attached to a widget has methods for drawing
lines, boxes, etc. in a way that matches the current
style.
--
Greg Ewing, Computer Science Dept, +--+
University of Canterbury, | Carpe post meridiam! |
Christchurch
Wildemar Wildenburger wrote:
normal widgets in a
toplevel window that can be freely moved, arranged and (very
importantly) drawn between.
I've looked at the Layout widget ... but I'm not nearly versed enough in
pygtk yet , so I dont know if thats the way to go.
It sounds like Layout is
Is it possible to have coloured cursors in Gtk?
If I pass a coloured Pixbuf to gdk.Cursor(),
it gets turned into black and white.
This is not a big problem, but if it's possible
to have coloured cursors somehow, I'd like to
support it in PyGUI.
--
Greg Ewing, Computer Science Dept,
University
72 matches
Mail list logo