getattr for modules not classes

Piet van Oostrum piet at cs.uu.nl
Sat May 27 07:11:27 EDT 2006


>>>>> Heiko Wundram <me+python at modelnine.org> (HW) schreef:

>HW> from x import test as x
>HW> print x.one
>HW> print x.two
>HW> print x.three

Or replace test by x in x.py :=)
-- 
Piet van Oostrum <piet at cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4]
Private email: piet at vanoostrum.org



More information about the Python-list mailing list