Print variable values by their names

Michael Krasnyk mkrasnyk at
Mon Oct 18 19:03:26 CEST 2004


How can I print variable values by their names?
For example:

import sys
for str in dir(sys): print str

Will be printed only variable names, but I need values from list of variable names.

Thanks in advance,

More information about the Python-list mailing list