Re: What is Togl???

From: Mike C. Fletcher (
Date: 11/20/03

Date: Thu, 20 Nov 2003 16:45:06 -0500
To: Tobias Pfeiffer <>

Tobias Pfeiffer wrote:

>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
>Traceback (most recent call last):
> File "", line 4, in ?
> from OpenGL.Tk import *
> File "/usr/lib/python2.2/site-packages/OpenGL/Tk/", line
>39, in ?
>'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 C. Fletcher
  Designer, VR Plumber, Coder