Accessing objects at runtime.

Jochen Schulz ml at well-adjusted.de
Thu Sep 10 11:06:51 EDT 2009


jacopo:
> 
> I would like to find a way to inspect the objects at run time.  In
> other words I would like to check certain attributes in order to
> understand in which status the object is.

What exactly do you want to know? The names of existing attributes or
their content? The latter is probably obvious to you and the former is
easy, too. See hasattr, getattr and isinstance.

J.
-- 
I lust after strangers but only date people from the office.
[Agree]   [Disagree]
                 <http://www.slowlydownward.com/NODATA/data_enter2.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 204 bytes
Desc: Digital signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20090910/bbd1da64/attachment-0001.sig>


More information about the Python-list mailing list