What is Togl???

T

Tobias Pfeiffer

Hi!

On my Debian Linux System, I installed the python-opengl package and
all that had a direct dependency. Then I wanted to look at the samples
that are shipped with that package (at /usr/share/doc/python-
opengl/Demo/). But every script I run in one of the subfolders gives
me:

Traceback (most recent call last):
File "text.py", line 4, in ?
from OpenGL.Tk import *
File "/usr/lib/python2.2/site-packages/OpenGL/Tk/__init__.py", line
39, in ?
_default_root.tk.call('package', 'require', 'Togl')
_tkinter.TclError: can't find package Togl

So what is Togl??? I apt-cache searched for it and it gives me
liblablgl-ocaml and liblablgl-ocaml-dev but nothing changes when they
are installed. So I googled for that error message but found only very
few pages that led me to the thought that I need to install some
additional Tk-packages. As an appendix I give you the output of dpkg -l
| grep tk (A) and dpkg -l | grep gl (B).
Thanks in advance!

Bye
Tobias

(A):
ii gdk-imlib1 1.9.14-13 imaging library for use with gtk
ii gtkglarea5 1.2.3-2 Gimp Toolkit OpenGL area widget
ii libatk1.0-0 1.2.4-1 The ATK accessibility toolkit
ii libgdk-pixbuf2 0.22.0-2.0.1 The GdkPixBuf image library, gtk+ 1.2
ii libgnorbagtk0 1.4.2-14 GNOME CORBA services (Gtk bindings)
ii libgtk1.2 1.2.10-16 The GIMP Toolkit set of widgets for X
ii libgtk1.2-comm 1.2.10-16 Common files for the GTK+ library
ii libgtk2.0-0 2.2.1-6 The GTK+ graphical user interface
ii libgtk2.0-comm 2.2.1-6 Common files for the GTK+ graphical
ii libgtkgl2.0-1 1.99.0-2 Gimp Toolkit OpenGL area widget
ii libwxgtk2.4 2.4.0.8 wxWindows Cross-platform C++ GUI
ii libwxgtk2.4-py 2.4.0.8 wxWindows Cross-platform C++ GUI
ii netkit-inetd 0.10-9 The Internet Superserver
ii perl-tk 800.024-1.1 Perl module providing the Tk graphics
ii python-gtk 0.6.11-8 GTK support module for Python.
ii python-tk 2.2.3-3 Tkinter - Writing Tk applications
ii python2.2-gtk2 1.99.16-2 Python bindings for the GTK+ widget
ii python2.2-tk 2.2.3-3 Tkinter - Writing Tk applications
ii tk8.3 8.3.5-3 Tk toolkit for Tcl and X11, v8.3 -
ii tk8.4 8.4.3-3 Tk toolkit for Tcl and X11, v8.4 -

(B):
ii gtkglarea5 1.2.3-2 Gimp Toolkit OpenGL area widget
ii libdb1-compat 2.1.3-7 The Berkeley database routines [glibc
ii libglade-gnome 0.17-2.7 Library to load .glade files at
ii libglade0 0.17-2.7 Library to load .glade files at
ii libglib1.2 1.2.10-9 The GLib library of C routines
ii libglib2.0-0 2.2.2-1 The GLib library of C routines
ii libglut3 3.7-20 the OpenGL Utility Toolkit
ii libgtkgl2.0-1 1.99.0-2 Gimp Toolkit OpenGL area widget
ii liblablgl-ocam 0.99-15 Runtime libraries for lablgl
ii python-opengl 1.5.7-5.4 Python binding to OpenGL
ii trans-de-en 1.2-2 A German-English translation
ii xlibmesa3-gl 4.2.1-6 Mesa 3D graphics library [XFree86]
ii xlibmesa3-glu 4.2.1-6 Mesa OpenGL utility library [XFree86]
 
M

Mike C. Fletcher

Tobias said:
Hi!

On my Debian Linux System, I installed the python-opengl package and
all that had a direct dependency. Then I wanted to look at the samples
that are shipped with that package (at /usr/share/doc/python-
opengl/Demo/). But every script I run in one of the subfolders gives
me:

Traceback (most recent call last):
File "text.py", line 4, in ?
from OpenGL.Tk import *
File "/usr/lib/python2.2/site-packages/OpenGL/Tk/__init__.py", line
39, in ?
_default_root.tk.call('package', 'require', 'Togl')
_tkinter.TclError: can't find package Togl

So what is Togl???
Togl is the Tkinter widget for OpenGL display. Togl refuses to compile
with the version of Tk distributed with Python 2.3 and above (it should
compile for 2.2, though I haven't checked that in a while), and so it's
being dropped from PyOpenGL. I've got rewriting the Tk-based samples to
use GLUT and/or PyGame on my todo list, btw.

You can rebuild PyOpenGL 2.0.1 with Togl support on Unix, but unless you
really need to run old scripts which used it, it's probably not worth
the effort (of setting the flag to true).

In theory, if you can compile (or find compiled) Togl for Tk 8.4 (and
then install it in the Python Tk instance), it should run fine. I,
however, have burned far too much PyOpenGL development time on it (given
that Tk is hardly the cutting edge in GUIs these days), so I'm not
likely to work on it any more.

Enjoy yourself,
Mike

_______________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://members.rogers.com/mcfletch/
 

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,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top