Little Bugs -- WIndowisms, an ommision and Pmw.

Hi All,

First off, I want to say I am jaw-droppingly stunned by what panda3d can
do under python!

I am running panda3d on linux, slackware 10.1, and as I have
been working with it today, I have found some (I think) cross-platform
issues and small bugs that linux users and the developers might need to
be aware of…

“System” Colors:

My copy of “Practical Progrmming in Tcl and Tk” talks about Windows
System Colors in chapter 41. It seems that Windows and Mac users of
TCL\TK have some predefined colors that are not available on Unix and
GNU\Linux platforms. These colors have names listed in the book like,
“systemButtonFace” and “systemWindow”.

On my linux box, these colors are undefined, and so produce errors when
one’s program calls “” or “” in the direct/tkwidgets
directory. Judging from a google search, this a common cross platform
error, but I didn’t really see any solutions that inspired me.

This problem also occurs in the “” file under the
direct/tkpanel directory, but this file seems only to be used by one
of the sample programs (i.e.,

Case (In)Sensitivity:

Some of the sample programs, call for “direct.gui.DirectGUI” but
my build produced “direct.gui.DirectGui”. Most of the sample programs
call the latter, but two call the former. It breaks on GNU\Linux. I
remember that PC-DOS wasn’t case sensitive, don’t know about windows though.

A Simple Ommision:

One of the coolest demos,, wants to have teapot.egg in it’s model
directory. This is too bad, cause it one of the more well done samples!

Python Mega Widgets:

If prior to installing Panda3d, you install Pmw, it comes with a little
script to make a python Pmw module,( I installed Pmw_1_2 and it comes with
“”). This makes a python module which gets installed in your
“PYTHONPATH”. The code in “” seems to expect a package instead.
I am probably wrong, but I seem to remember reading that the difference
between a package and a module was the name thingie. Haven’t solved this
to my satisfaction, but I think this is what breaks under
GNU\Linux, if you previously installed Python Mega Widgets.

Honestly, if Pmw used distutils, I don’t think this would be
an issue. All I can say for sure, if a python package comes with “”
I don’t have these kind of problems, when it doesn’t I do.

… None of this stuff is not terribly difficult to figure out. But it
might give newbies and young people fits. It seems like a lot of the
posts on this forum come from people having trouble reading debugging
messages. One would hope that at least the sample programs would work
without errors, “Out of the box”, cross-platform. Hey, at least its a
goal to strive for.

Personally, my history runs from Radio Shack TRS-DOS, to OS/9, to PCDOS,
to OS/2 to Gnu\Linux which I run today. I kinda skipped the whole MS-Windows
thing. I really can’t give any patches that would work on Windows and
GNU\linux. However, I have attached the notes I made while getting things to
run today. Someone with some cross-platform expertise could probably make
quick work of these issues.

Hope this is of some help!



  • PROBLEMS WITH ‘SystemWindow’ AND ‘SystemButtonFace’ in TK.
  • As a temporary work-around change the following occurances of
  • ‘SystemWindow’ to ‘gray’.


cp ./lib/direct/tkpanels/ ./lib/direct/tkpanels/


In ./lib/direct/tkpanels/ – Line 1606

self.rendererSpriteTextureEntry[‘background’] = ‘SystemWindow’

Change to…

self.rendererSpriteTextureEntry[‘background’] = ‘gray’

In ./lib/direct/tkpanels/ – Line 1614

self.rendererSpriteFileEntry[‘background’] = ‘SystemWindow’

Change to…

self.rendererSpriteFileEntry[‘background’] = ‘gray’

In ./lib/direct/tkpanels/ – Line 1615

self.rendererSpriteNodeEntry[‘background’] = ‘SystemWindow’

Change to …

self.rendererSpriteNodeEntry[‘background’] = ‘gray’

  • As a temporary work-around change the following occurances of
  • “SystemButtonFace” to “gray85”.


cp ./lib/direct/tkwidgets/ ./lib/direct/tkwidgets/
cp ./lib/direct/tkwidgets/ ./lib/direct/tkwidgets/

Then …

In ./lib/direct/tkwidgets/ – Line 55

(‘background’, ‘SystemButtonFace’, self.setbackground),

Change to…

(‘background’, ‘gray85’, self.setbackground),

In ./lib/direct/tkwidgets/ – Line 92

(‘background’, ‘SystemButtonFace’, self.setbackground),

Change to…

(‘background’, 'gray85, self.setbackground),

  • As a temporary work-around change the following instances of
  • “direct.gui.DirectGUI” to “direct.gui.DirectGui”.


cp ./samples/Feature-Tutorials–Collision-Detection/ ./samples/Feature-Tutorials–Collison-Detection/


In ./samples/Feature-Tutorials–Collision-Detection/
– Line 13

from direct.gui.DirectGUI import *

Change to …

from direct.gui.DirectGui import *

  • As a temporary work-around run the following command from the
  • installation directory.

ln -s ./models/teapot.egg …/…/…/samples/Feature-Tutorials–Joint-Manipulation/models/teapot.egg

            (Cause every virtual girl should have an
              OPENGL teapot, or at least a symlink to one!)

  • (Admittedly a crude hack, but it gets going,
  • blowing huge chunks of handled Tk exceptions all the way!)
  • As a temporary work-around change the following instance of"_Pmw" to “Pmw”

First …

cp ./lib/direct/showbase/ ./lib/direct/showbase/

Then …

In ./lib/direct/showbase/ – Line 6

sys.modules.[’_Pmw]’.name = ‘_Pmw’

Change to …

sys.modules.[‘Pwm’].name = ‘_Pmw’

Just so you know, I’ve already started fixing some of these for 1.0.5

  • Josh