Print variable values by their names

Michael Krasnyk mkrasnyk at
Tue Oct 19 11:06:32 CEST 2004

"Robert Brewer" <fumanchu at> wrote in message news:<mailman.5125.1098119864.5135.python-list at>...

> import sys
> for name in dir(sys):
>     print name, getattr(sys, name)
Thank you for your replies, that is exatly what i need,

More information about the Python-list mailing list