from tables import *

class Property(IsDescription):
    name = StringCol(256)
    value = StringCol(4096)

h5file = openFile('/tmp/wfsr.hdf5', mode='w')
ptable = h5file.createTable('/', 'ptable', Property, 'test table')
ptable.append([('a', '1'),('b', '2'), ('c', '3')])
ptable.flush()

print "Before:"
for row in ptable.iterrows():
    print '%s = %s' % ( row['name'], row['value'] )

# it all works up to this point
# according to the documenation at (http://www.pytables.org/docs/manual/x2981.html )
# the following should work but it doesn't, it throws the exception following the code

for row in ptable.iterrows():
    row['value'] = 'x'
    row.update()

print "After:"
for row in ptable.iterrows():
    print '%s = %s' % ( row['name'], row['value'] )
