searching for __doc__ from the interactive cmd line

Rikard Bosnjakovic bos at
Thu May 17 12:50:08 CEST 2001

Sean Montgomery wrote:
> Doh!  That's a great start.

Before I new about the pydoc, I did this hack:

def print_doc(obj):
    for k in dir(obj):
        print k
            print getattr(obj, k).__doc__
        except AttributeError:
            print "--no-doc--"
        print "-" * 70

if __name__ == "__main__":
    for t in ["", [], {}]:
        print type(t)
        print "=" * 70

Rikard Bosnjakovic - - ICQ: 1158217

Anyone sending unwanted advertising e-mail to my address will be
charged $250 for network traffic and computing time. By extracting my
address from this message or its header, you agree to these terms.

More information about the Python-list mailing list