I am wokring in python 2.7. I have been experimenting with the tweepy package. There is an object called the tweepy.models.status object, whose function is defined here: https://github.com/tweepy/tweepy/blob/master/tweepy/models.py.
I have a function that looks like this:
def on_status(self, status): try: print status return True except Exception, e: print >> sys.stderr, 'Encountered Exception:', e pass The object I am referring to is the one returned from the on_status function, called status. When the print status line executes i get this printed on the screen;
tweepy.models.Status object at 0x85d32ec>
My question is actually pretty generic. I want to know how to visually print out the contents of this status object? I want to know what information is available inside this object.
I tried the for i, v in status : approach, but it says this objects is not iterable. Also not all of the object attributes are described in the function definition.
Thanks a lot!
dirbut now the answer from mgilson gives me something more concrete to re-use. Wanted to add: Dive Into Python (for v2, first one) has a chapter on introspection with anapihelper->infofunction. Also gives some useful info about members, etc. and documentation from the doc strings.