I have this simple test harness program
class Property(IsDescription):
name = StringCol(256)
value = StringCol(4096)
h5file = openFile('/Users/jarrodroberson/wfsr.hdf5', mode='w', title='Test File', filters=Filters(complevel, complib))
ptable = h5file.createTable('/', 'ptable', Property, 'test table')
ptable.append([('a', '1'),('b', '2'), ('c', '3')])
ptable.flush()
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()
# "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/tables/TableExtension.pyx", line 1159, in TableExtension.Row.__setitem__
# NotImplementedError: You cannot set Row fields when in middle of an table iterator. Use Table.modifyRows() or Table.modifyColumns() instead.
Anyone know how to update information in a table, and what is the correct way if the documenation is wrong?
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ Pytables-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pytables-users
