"Martin v. Löwis" <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
> d = {}
> exec source_code in d
> some_name = d['some_name']
This works quite well! I can't believe after googling for half on hour I
didn't notice this "exec ... in ..." syntax.
One more thing though, is there a way to access "some_name" as a
attribute, instead as a dictionary:
some_name = d.some_name
?
Thanks...
--
_______ Karlo Lozovina - Mosor
| | |.-----.-----. web: http://www.mosor.net || ICQ#: 10667163
| || _ | _ | Parce mihi domine quia Dalmata sum.
|__|_|__||_____|_____|
--
http://mail.python.org/mailman/listinfo/python-list