From 8cc2989e961f5fb63eae3a90fa808ec29ea6bcb2 Mon Sep 17 00:00:00 2001 From: Mark Mine Date: Fri, 2 Feb 2001 19:56:20 +0000 Subject: [PATCH] *** empty log message *** --- direct/src/showbase/PythonUtil.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/direct/src/showbase/PythonUtil.py b/direct/src/showbase/PythonUtil.py index 041a27db0c..d7ec6ee9ae 100644 --- a/direct/src/showbase/PythonUtil.py +++ b/direct/src/showbase/PythonUtil.py @@ -21,13 +21,13 @@ def indent(stream, numIndents, str): indentString = ' ' 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): """ 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) value = value[:max(1,lineWidth - maxWidth)] print (format % key)[:maxWidth] + '\t' + value + # Check for parent classes if type(obj) == types.InstanceType: print - apropos(obj.__class__, str = str ) + pdir(obj.__class__, str = str ) elif type(obj) == types.ClassType: for parentClass in obj.__bases__: print - apropos(parentClass, str = str) + pdir(parentClass, str = str) def aproposAll(obj): """