Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 710
sorin Avatar asked Oct 26 '11 16:10

sorin


1 Answers

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

like image 196
Dan Breen Avatar answered Sep 23 '22 06:09

Dan Breen