Steve Holden wrote: > You don't need setattr/getattr if you know in advance the name of the > attribute you need to access and you can get a reference to the object > whose attribute it is. So: > > >>> x = "Hello, Paulo" > >>> import sys > >>> sys.modules['__main__'].x > 'Hello, Paulo'
a.k.a
>>> import __main__
>>> __main__.x
'Hello, Paulo'
STeVe
--
http://mail.python.org/mailman/listinfo/python-list
