From 0a6c464275df6e3d5c57cc87d03f04eda6cf93a2 Mon Sep 17 00:00:00 2001 From: Mark Mine Date: Tue, 5 Dec 2000 04:37:39 +0000 Subject: [PATCH] *** empty log message *** --- direct/src/showbase/PythonUtil.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/direct/src/showbase/PythonUtil.py b/direct/src/showbase/PythonUtil.py index 65e4870d64..e4cf96b975 100644 --- a/direct/src/showbase/PythonUtil.py +++ b/direct/src/showbase/PythonUtil.py @@ -21,8 +21,17 @@ def indent(stream, numIndents, str): indentString = ' ' stream.write(indentString * numIndents + str) +def pdir(obj, *args): + """ + Print out a formatted list of members and methods of an instance or class + """ + apply(apropos, (obj,) + args) + def apropos(obj, str = None, fOverloaded = 0, width = None, fTruncate = 1, lineWidth = 75): + """ + Print out a formatted list of members and methods of an instance or class + """ if type(obj) == types.InstanceType: print "***************************INSTANCE INFO*****************************" if type(obj) == types.DictionaryType: @@ -81,8 +90,11 @@ def apropos(obj, str = None, fOverloaded = 0, width = None, apropos(obj.__class__, str = str ) def aproposAll(obj): + """ + Print out a list of all members and methods (including overloaded methods) + of an instance or class + """ apropos(obj, fOverloaded = 1, fTruncate = 0) - def doc(obj): if (isinstance(obj, types.MethodType)) or \