gamename wrote: > In TCL, you can do things like: > set foobar "HI!" > set x foo > set y bar > subst $$x$y > HI! > > Is there a way to do this type of evaluation in python?
If this is at the outer-most scope, you can use globals()::
>>> foobar = 'HI!'
>>> x = 'foo'
>>> y = 'bar'
>>> globals_dict = globals()
>>> globals_dict[x + y]
'HI!'
That said, why do you think you want to do this?
STeVe
--
http://mail.python.org/mailman/listinfo/python-list
