Re: How to get current module object

2008-02-19 Thread Gabriel Genellina
On 19 feb, 03:33, Alex <[EMAIL PROTECTED]> wrote: > GabrielGenellinawrote: > > En Mon, 18 Feb 2008 14:49:02 -0200, Alex <[EMAIL PROTECTED]> escribió: > >> 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 __na

Re: How to get current module object

2008-02-18 Thread Alex
Gabriel Genellina wrote: > En Mon, 18 Feb 2008 14:49:02 -0200, Alex <[EMAIL PROTECTED]> escribió: >> 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

Re: How to get current module object

2008-02-18 Thread Gabriel Genellina
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?

Re: How to get current module object

2008-02-18 Thread Alex
Alex wrote: > function and class namespaces have __name__ attribute too I was wrong - these were function and class _objects'_ namespaces -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get current module object

2008-02-18 Thread Alex
Gabriel Genellina wrote: > En Sun, 17 Feb 2008 16:25:44 -0200, Alex <[EMAIL PROTECTED]> escribi�: > >> Can I get reference to module object of current module (from which the >> code is currently executed)? I know __import__('filename') should >> probably do that, but the call contains redundant

Re: How to get current module object

2008-02-17 Thread Gabriel Genellina
En Sun, 17 Feb 2008 16:25:44 -0200, Alex <[EMAIL PROTECTED]> escribi�: > Can I get reference to module object of current module (from which the > code is currently executed)? I know __import__('filename') should > probably do that, but the call contains redundant information (filename, > which nee

Re: How to get current module object

2008-02-17 Thread John Machin
On Feb 18, 5:25 am, Alex <[EMAIL PROTECTED]> wrote: > Can I get reference to module object of current module (from which the > code is currently executed)? I know __import__('filename') should > probably do that, but the call contains redundant information (filename, > which needs to be updated), a

How to get current module object

2008-02-17 Thread Alex
Can I get reference to module object of current module (from which the code is currently executed)? I know __import__('filename') should probably do that, but the call contains redundant information (filename, which needs to be updated), and it'll perform unnecessary search in loaded modules li