Re: Book Review - Practical Python
Magnus Lie Hetland <[email protected]> Sun, 26 Jan 2003 14:10:16 +0100
| Newsgroups | gmane.comp.python.anygui.devel |
|---|---|
| Message-ID | <[email protected]> |
[email protected] <[email protected]>: > > Hi Magnus. Currently doing a review of the above for ACM. Cool :) > Small problem with examples in AnyGUI Chapter - using > anygui0.1.1-1.noarch.rpm for > RedHat 8.0 - as shown below. Any suggestions? It seems that your installation of PyGTK doesn't have the GtkLabel class, for some reason. As far as I can tell, that has nothing to do with Anygui -- perhaps it's a version question. I'm cc'ing this to the Anygui development list, in the hope that the GTK people there may have a clue. (Pleace cc answers to Graham :) To check whether this is the case, you might try the following in an interactive Python interpreter: >>> from gtk import GtkLabel Also, you might want to try to run Anygui with some other back-end. For example, if you have Tkinter installed, you could do ANYGUI_WISHLIST='tk' python 12-01.py Note that since Anygui 0.2 is still not out (in the tradition of open source software, it has been delayed quite a bit), you will have to edit the event handlers to use the form def handler(*args, **kwds): ... rather than def handler(event): ... (This is described in the Anygui chapter of the book.) Good luck! > Graham Jenkins, IBM Global Services Australia python 12-01.py Traceback (most recent call last): File "12-01.py", line 1, in ? from anygui import * File "/usr/lib/python2.2/site-packages/anygui/__init__.py", line 87, in ? _backend_passthrough() File "/usr/lib/python2.2/site-packages/anygui/__init__.py", line 59, in _backend_passthrough mod = _dotted_import('anygui.backends.%sgui' % name,) File "/usr/lib/python2.2/site-packages/anygui/__init__.py", line 41, in _dotted_import mod = __import__(name, globals(), locals(), []) File "/usr/lib/python2.2/site-packages/anygui/backends/gtkgui.py", line 64, in ? class Label(ComponentMixin, AbstractLabel): File "/usr/lib/python2.2/site-packages/anygui/backends/gtkgui.py", line 65, in Label _gtk_class = GtkLabel NameError: name 'GtkLabel' is not defined -- Magnus Lie Hetland http://hetland.org ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com