From a526a3908efb6db75ea9c0a990a1396c7d440dc1 Mon Sep 17 00:00:00 2001 From: Joe Shochet Date: Wed, 28 May 2003 23:33:12 +0000 Subject: [PATCH] fixed exception printing problems --- direct/src/directnotify/Notifier.py | 14 +++----------- direct/src/showbase/ShowBase.py | 5 ----- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/direct/src/directnotify/Notifier.py b/direct/src/directnotify/Notifier.py index a40129a77e..d8907deb22 100644 --- a/direct/src/directnotify/Notifier.py +++ b/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 diff --git a/direct/src/showbase/ShowBase.py b/direct/src/showbase/ShowBase.py index 35f5add5cf..f561e23797 100644 --- a/direct/src/showbase/ShowBase.py +++ b/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.