Re: naming objects from string



Damjan wrote:
try
sys.modules[__name__].__dict__[x] = a

@manstay: You see! Ugly, unreadable trickery!
Hands off this stuff, bad mojo!

You've been told three very different approaches now, which is a pretty good indicator that there is no obvious way to do it. Which means another angle to your problem might make it a lot easier.
(btw: Try 'import this' at the python prompt for some wise words.)

Please describe your problem and let us suggest that new angle.

wildemar
.



Relevant Pages

  • Re: Physicists Wanted for collaboration
    ... Angle of attack control appears the most promising technology. ... variable attack wing is already in example exprimentally. ... A simple method of doing the same appears to be the controled angle. ... A new instrument panel indicator would allow the takeoff to ...
    (sci.physics)
  • Re: Sigh. Its only plastic
    ... The Older Gentleman wrote: ... TC that I am, only repair needed was a new indicator, all the other damaged parts were pre-disastered... ... However, it probably has stopped it many times in the past, as it usually catches my eye as I walk back to the bike. ... This time I was coming at it from the wrong angle for that to work. ...
    (uk.rec.motorcycles)