mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 19:08:55 -04:00
added assertable setTrace
This commit is contained in:
parent
ef5b2fe57e
commit
2ac571f424
@ -2240,13 +2240,20 @@ def appendStr(obj, st):
|
|||||||
try:
|
try:
|
||||||
import pdb
|
import pdb
|
||||||
set_trace = pdb.set_trace
|
set_trace = pdb.set_trace
|
||||||
|
# set_trace that can be asserted
|
||||||
|
def setTrace():
|
||||||
|
set_trace()
|
||||||
|
return True
|
||||||
pm = pdb.pm
|
pm = pdb.pm
|
||||||
except:
|
except:
|
||||||
# we're in production, there is no pdb module. assign these to something so that the
|
# we're in production, there is no pdb module. assign these to something so that the
|
||||||
# __builtin__ exports will work
|
# __builtin__ exports will work
|
||||||
|
# references in the code should either be if __dev__'d or asserted
|
||||||
set_trace = None
|
set_trace = None
|
||||||
|
setTrace = None
|
||||||
pm = None
|
pm = None
|
||||||
|
|
||||||
|
|
||||||
class ScratchPad:
|
class ScratchPad:
|
||||||
"""empty class to stick values onto"""
|
"""empty class to stick values onto"""
|
||||||
def __init__(self, **kArgs):
|
def __init__(self, **kArgs):
|
||||||
@ -3060,6 +3067,7 @@ __builtin__.uniqueName = uniqueName
|
|||||||
__builtin__.serialNum = serialNum
|
__builtin__.serialNum = serialNum
|
||||||
__builtin__.profiled = profiled
|
__builtin__.profiled = profiled
|
||||||
__builtin__.set_trace = set_trace
|
__builtin__.set_trace = set_trace
|
||||||
|
__builtin__.setTrace = setTrace
|
||||||
__builtin__.pm = pm
|
__builtin__.pm = pm
|
||||||
__builtin__.itype = itype
|
__builtin__.itype = itype
|
||||||
__builtin__.exceptionLogged = exceptionLogged
|
__builtin__.exceptionLogged = exceptionLogged
|
||||||
|
Loading…
x
Reference in New Issue
Block a user