The problem is that I want to specify the global namespace explicitly.
This defaults to the local namespace being the global namespace, which
is exactly what I do *not* want.
Anybody any clues?
Example:
>>> global_namespace = {}
>>> def showit:
... var_in_local_namespace = 0
... # I wish I could give the local namespace as third argument
... exec ('var_in_local_namespace = 1\n', global_namespace)
... return var_in_local_namespace
>>> showit()
0
>>>
Thanks,
-Jaap-
-- Jaap Vermeulen +--------------------------+ | Sequent Computer Systems | Internet : jaap@sequent.com | Beaverton, Oregon | Uucp : ...uunet!sequent!jaap +--------------------------+