Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
527 views
in Technique[技术] by (71.8m points)

debugging - How do I list all the attributes of an object in python pdb?

I try to list all the attributes of an object in Python pdb.

Let's say I want to list all the attributes and all methods of sys.stderr.

How can I do that?

question from:https://stackoverflow.com/questions/7905904/how-do-i-list-all-the-attributes-of-an-object-in-python-pdb

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

For pdb, you should be able to do p dir(a).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...