Reference current module?

Ben Finney bignose+hates-spam at benfinney.id.au
Tue Jun 19 20:43:17 EDT 2007


Tobiah <toby at tobiah.org> writes:

> Can I do:
>
> getattr(current_module, 'foo')
>
> where 'current_module' is a handle the the one
> that the code is in?  Just like

The python-list archives
<URL:http://mail.python.org/pipermail/python-list/> are your friend.

Google is able to search within a site hierarchy by using search terms
like the following:

    site:mail.python.org/pipermail/python-list/ current module reference

Searching there, I immediately find this brief thread:

    <URL:http://mail.python.org/pipermail/python-list/2006-August/398319.html>
    <URL:http://mail.python.org/pipermail/python-list/2006-August/398321.html>

-- 
 \          "I hope if dogs ever take over the world, and they chose a |
  `\    king, they don't just go by size, because I bet there are some |
_o__)                Chihuahuas with some good ideas."  -- Jack Handey |
Ben Finney



More information about the Python-list mailing list