dbf.Table already supports the context-manager protocol, so you can do:
with dbf.Table(dbf_file_path) as theDBF:
doStuffWith(theDBF)
and also:
theDBF = dbf.Table(dbf_file_Path)
with theDBF:
doStuffWith(theDBF)
What advantages are offered by being able to work on StringIO objects?
--
~Ethan~