attribut of the current module

Andrew Dalke dalke at dalkescientific.com
Fri Sep 21 03:41:58 EDT 2001


Oleg Orlov11980884 wrote:
>How can i get attribut of the current module?
>
>Ugly way: getattr(__import__(__name__), attribname)

globals()[attribname]

                    Andrew
                    dalke at dalkescientific.com






More information about the Python-list mailing list