On Wed, 03 Oct 2012 09:23:03 -0700, Daniel Klein wrote: > So ideally I would tell the script which language I'm currently > importing and based on that it would write to the appropriate text > fields. But I don't know how to abstract this: > > tempmes.polish = row[1] > > Well, I do. Like this: > > eval("tempmes." + language + " = row[1]")
setattr(tempmes, language, row[1]) -- Steven -- http://mail.python.org/mailman/listinfo/python-list