Hi,
How can I access a particular column from the row if the column attribute is a
variable.
For example, in a Bridge table I can access the name of the bridge using
'row.name'. I want to do the same but using the column name as a variable. If I
can do something as row['name'] it will help me a lot. So far all the methods I
tried failed.
row._data['name'] doesn't work either.
My code is as follows:
txn = ovs.db.idl.Transaction(idl)
bridge_table = idl.tables['Bridge']
column_keys = bridge_table.columns.keys()
row = txn.insert(bridge_table)
for key in column_keys:
# how can I assign row elements using the variable 'key'
row['key'] = some_default_value # This doesn't work.
Any help will be great.
Thanks
Mir
_______________________________________________
discuss mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/discuss