fixed exception printing problems

This commit is contained in:
Joe Shochet 2003-05-28 23:33:12 +00:00
parent c43178944d
commit a526a3908e
2 changed files with 3 additions and 16 deletions

View File

@ -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

View File

@ -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.