[Tutor] a question on the BLT plotting library
Marco Scodeggio
marcos@ifctr.mi.cnr.it
Mon, 4 Sep 2000 15:37:10 +0200 (MET DST)
Hallo everybody.
I'm still completely new to Python, and I'm trying to figure out a =
relatively
simple method to produce some "decent looking" (scientific) plots.
Looking around on the web I have found Python megawidgets, that provide =
an=20
interface to the BLT plotting library.
I have installed the current verison of BLT (version 2.4u), to go along =
with the=20
tcl/tk installation that is standard on my workstation (version 8.2), =
and I did=20
put in the lib/python1.5/site-packages/ directory the Pmw installation.
I'm working on a Sun worstation using Solaris 2.5.1, and I have =
installed both=20
Python and the BLT library in my private directories.
Now, I can use the BLT library (which means I can run succesfully the =
self-test=20
program provided with it), and the Pmw widgets (again, the self-test =
works), but=20
when I try to run any simple demo using the Pmw.Blt class I get error =
messages=20
like this one:
>>> from Tkinter import *=20
>>> import Pmw
>>> root =3D Tk()
>>> g =3D Pmw.Blt.Graph(root)
Traceback (innermost last):
File "<pyshell#3>", line 1, in ?
g =3D Pmw.Blt.Graph(root)
File=20
"/hestia/marcos/software/Python-1.5.2/lib/python1.5/site-packages/Pmw/Pmw=
_0_8_4/
lib/PmwBlt.py", line 260, in __init__
Tkinter.Widget.__init__(self, master, _graphCommand, cnf, kw)
File =
"/hestia/marcos/software/Python-1.5.2/lib/python1.5/lib-tk/Tkinter.py",=20
line 1084, in __init__
self.tk.call(
TclError: invalid command name "::blt::graph"
>>>=20
Also the initialisation suggested by the Pmw folks
( >>> import Pmw
>>> root =3D Pmw.initialise() )
produces the same identical error message.
Along the same lines, when I run the Pmw demos program, if I try the BLT =
related=20
tests, I get the message=20
"Sorry, the BLT package has not been installed on this system. Please =
install it=20
and try again"
Does anyone have any idea on what is happening ??? I presume Python =
cannot find=20
the BLT installation, but how do I let it know about it ??
Your help on this would be much appreciated. Thanks a lot.
Marco Scodeggio