Current module reference

Miguel Galves mgalves at gmail.com
Wed Aug 16 08:29:03 EDT 2006


Hi

How do I get a reference for the current module I'm in ?
I have a package called services with a __init__.py
that need to use getattr() to fill out a hash whith
my package attributes. But to use getattr, I need
a object that references my package (kind of this this reference in Java).
How can I do it ?

the only way I found to o this is to call get attr from another
module that imports the services package. But I suppose
it's not the only way....

Thanks for your help

Miguel

-- 
Miguel Galves - Engenheiro de Computação
Já leu meus blogs hoje?
Para geeks http://log4dev.blogspot.com
Pra pessoas normais
http://miguelgalves.blogspot.com

"Não sabendo que era impossível, ele foi lá e fez..."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20060816/6e9796bc/attachment.html>


More information about the Python-list mailing list