python - get all methods and attribute an object has
Posted by rolf on Wednesday, 2 September 2015For an object, e.g. named "myObj" you can get a list of all attributes with
dir(myObj)
and a list of all methods with
[method for method in dir(myObj) if callable(getattr(myObj, method))]
Taken from stackoverflow