[wxPython-users] Re: OT - how to create variables from a cvs
file?
Werner F. Bruhin
werner.bruhin at free.fr
Wed Mar 28 01:36:53 PDT 2007
Hi Christian,
Christian wrote:
> Werner F. Bruhin wrote:
>
>> Using the cvs module I get a list like this.
>>
>> ['field1', 'field2', 'fieldn']
>>
>> How to iterate over this list and create variables?
>>
>> I know I can do 'setattr(self, itervalue)', but I am sure I saw a nicer
>> way of doing this but just can't find it.
>>
>
> You could modify self.__dict__ directly but I wouldn't say that this is a nicer way.
>
No that is not it, and I agree it would not be nicer. Maybe I am just
dreaming that there was another nicer way of doing this.
Werner
More information about the wxpython-users
mailing list