Browse Source

check to make sure _Pmw is loaded before doing stuff with it

Chris Brunner 15 years ago
parent
commit
fe4531054d
1 changed files with 3 additions and 1 deletions
  1. 3 1
      direct/src/showbase/TkGlobal.py

+ 3 - 1
direct/src/showbase/TkGlobal.py

@@ -10,8 +10,10 @@ import sys
 
 # This is required by the ihooks.py module used by Squeeze (used by
 # pandaSqueezer.py) so that Pmw initializes properly
-sys.modules['_Pmw'].__name__ = '_Pmw'
+if '_Pmw' in sys.modules:
+    sys.modules['_Pmw'].__name__ = '_Pmw'
 
+if 
 __builtins__["tkroot"] = Pmw.initialise()
 
 def tkLoop(self):