Forráskód Böngészése

fixed exception printing problems

Joe Shochet 22 éve
szülő
commit
a526a3908e
2 módosított fájl, 3 hozzáadás és 16 törlés
  1. 3 11
      direct/src/directnotify/Notifier.py
  2. 0 5
      direct/src/showbase/ShowBase.py

+ 3 - 11
direct/src/directnotify/Notifier.py

@@ -178,15 +178,7 @@ class Notifier:
     def __print(self, string):
         """__print(self, string)
         Prints the string to standard output followed by a newline.
+        If we ever need to do something else than Python print, you
+        could put it here.
         """
-        # We could use the print command, but that seems to stop
-        # working when Python is in the program-level exception
-        # handler for some reason (!).  So we use C++-level output
-        # instead, as soon as we have the DirectNotify level
-        # streamWriter available.
-
-        import DirectNotifyGlobal
-        if DirectNotifyGlobal.directNotify.streamWriter:
-            DirectNotifyGlobal.directNotify.streamWriter.appendData(string + '\n')
-        else:
-            print string
+        print string

+ 0 - 5
direct/src/showbase/ShowBase.py

@@ -190,11 +190,6 @@ class ShowBase(DirectObject.DirectObject):
         __builtins__["globalClock"] = ClockObject.getGlobalClock()
         __builtins__["vfs"] = vfs
 
-        # Route all of our DirectNotify output through the Panda level
-        # ostream object from now on.
-        # This is causing problems - Joe
-        # directNotify.streamWriter = StreamWriter(ostream)
-
         # Now hang a hook on the window-event from Panda.  This allows
         # us to detect when the user resizes, minimizes, or closes the
         # main window.