En Mon, 18 Feb 2008 14:49:02 -0200, Alex <[EMAIL PROTECTED]> escribió: > Gabriel Genellina wrote:
> That's what I've been searching for, thanks. By the way, I know it might > be trivial question... but function and class namespaces have __name__ > attribute too. Why is global one always returned? I don't understand the question (even with the later correction namespaces->objects) >> Why do you want to get the module object? globals() returns the module >> namespace, its __dict__, perhaps its only useful attribute... > To pass it as a parameter to a function (in another module), so it can > work with several modules ("plugins" for main program) in a similar > manner. The function could receive a namespace to work with (a dictionary). Then you just call it with globals() == the namespace of the calling module. -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list