mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-17 12:12:10 -04:00
fixed exception printing problems
This commit is contained in:
parent
c43178944d
commit
a526a3908e
@ -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
|
||||
|
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user