wow, ok, thank you Gabriel, I wasn't aware of x,'y',z This is what I decided to go with for now in one of my classes, but another class will need a modified version of this, as mentioned x,'y',z
B=_brush() list( ( self.__setattr__(x.replace("b_",""),getattr(B,x)) for x in dir(B) if x.startswith("b_") ) ) -Alex Goretoy http://www.goretoy.com On Fri, Mar 13, 2009 at 1:46 AM, Lie Ryan <lie.1...@gmail.com> wrote: > Gabriel Genellina wrote: > >> En Thu, 12 Mar 2009 09:27:35 -0200, alex goretoy < >> aleksandr.gore...@gmail.com> escribió: >> >> note i would still like to be able to do __import__("sys")."path" >>>> >>> >> p = __import__("sys").path >> >> That's a convoluted way of doing: >> >> import sys >> p = sys.path >> >> (except that the latter one inserts "sys" in the current namespace) >> > > That's a convoluted way of doing: > > from path import sys > > (except that the latter one doesn't insert sys in the current namespace) > > -- > http://mail.python.org/mailman/listinfo/python-list >
-- http://mail.python.org/mailman/listinfo/python-list