mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
*** empty log message ***
This commit is contained in:
parent
fe4c4f0172
commit
8cc2989e96
@ -21,13 +21,13 @@ def indent(stream, numIndents, str):
|
|||||||
indentString = ' '
|
indentString = ' '
|
||||||
stream.write(indentString * numIndents + str)
|
stream.write(indentString * numIndents + str)
|
||||||
|
|
||||||
def pdir(obj, *args):
|
def apropos(obj, *args):
|
||||||
"""
|
"""
|
||||||
Print out a formatted list of members and methods of an instance or class
|
Obsolete, use pdir
|
||||||
"""
|
"""
|
||||||
apply(apropos, (obj,) + args)
|
print 'Use pdir instead'
|
||||||
|
|
||||||
def apropos(obj, str = None, fOverloaded = 0, width = None,
|
def pdir(obj, str = None, fOverloaded = 0, width = None,
|
||||||
fTruncate = 1, lineWidth = 75):
|
fTruncate = 1, lineWidth = 75):
|
||||||
"""
|
"""
|
||||||
Print out a formatted list of members and methods of an instance or class
|
Print out a formatted list of members and methods of an instance or class
|
||||||
@ -106,13 +106,14 @@ def apropos(obj, str = None, fOverloaded = 0, width = None,
|
|||||||
# Cut off line (keeping at least 1 char)
|
# Cut off line (keeping at least 1 char)
|
||||||
value = value[:max(1,lineWidth - maxWidth)]
|
value = value[:max(1,lineWidth - maxWidth)]
|
||||||
print (format % key)[:maxWidth] + '\t' + value
|
print (format % key)[:maxWidth] + '\t' + value
|
||||||
|
# Check for parent classes
|
||||||
if type(obj) == types.InstanceType:
|
if type(obj) == types.InstanceType:
|
||||||
print
|
print
|
||||||
apropos(obj.__class__, str = str )
|
pdir(obj.__class__, str = str )
|
||||||
elif type(obj) == types.ClassType:
|
elif type(obj) == types.ClassType:
|
||||||
for parentClass in obj.__bases__:
|
for parentClass in obj.__bases__:
|
||||||
print
|
print
|
||||||
apropos(parentClass, str = str)
|
pdir(parentClass, str = str)
|
||||||
|
|
||||||
def aproposAll(obj):
|
def aproposAll(obj):
|
||||||
"""
|
"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user