Change the three color statements like this:
self.rr = string.atoi(rstr)/100.0 should be self.rr = int(rstr)/100.0
I think this is a Python 2.5 vs Python 2.4 issue.
However, I'll comment that we've removed Tk-Visual.py from the example
set because we could not figure out a way for this program to work on
the Mac. With the new native-mode version for the Mac (no X11, no Fink),
there is a clash between the Mac interact loop and that of Tk.
Bruce Sherwood
Symion wrote:
> running V5.0
> Ran the example program Tk-Visual.py and IDLE recorded the following
> error.
>
> VPython WARNING: errors in shader program:
> Fragment shader(s) failed to link, vertex shader(s) linked. r
> Exception in Tkinter callback
> Traceback (most recent call last):
> File "C:\Python25\lib\lib-tk\Tkinter.py", line 1403, in __call__
> return self.func(*args)
> File "C:\Python25\Lib\site-packages\visual\examples\Tk-Visual.py",
> line 64, in <lambda>
> scalebb =
> Scale(tkr,orient=VERTICAL,from_=100,to=0,label="B",command=lambda str:
> pp.set_blue(str))
> File "C:\Python25\Lib\site-packages\visual\examples\Tk-Visual.py",
> line 45, in set_blue
> self.bb = string.atoi(bstr)/100.0
> NameError: global name 'string' is not defined
>
> This type of error was repeated every time the RGB sliders were used.
>
> Symion
>
|