Print variable values by their names

Michael Krasnyk mkrasnyk at gmail.com
Tue Oct 19 05:06:32 EDT 2004


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

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



More information about the Python-list mailing list