J
Johny
Is there a module for reading/modifing db files from Python?
Thanks for help
B.
Thanks for help
B.
Johny said:Is there a module for reading/modifing db files from Python?
Johny said:Is there a module for reading/modifing db files from Python?
Thanks for help
B.
I have a module -- which I'm going to get around to releasing one of
these days -- which allows to read dBase III, dBase IV and Foxpro
files (sequentially only, not randomly) and to write dBaseIII files
sequentially. Index files if any are ignored.
Field types supported for reading:
C character
D date
F float
I integer (32 bits)
L logical
M memo (stored in a .DBT (dBase) or .FPT (FoxPro) file)
N number
T time
Writing supports only dBaseIII with C, D, L and N fields, but could be
extended easily enough (I've never had the need). No index files are
written.
E-mail me if you are interested.
Cheers,
John
Is there a module for reading/modifing db files from Python?
Thanks for help
B.
I'm switching my company's software base over from FoxPro 6 to Python.Johny said:Is there a module for reading/modifing db files from Python?
Thanks for help
B.
.... print record.name, record.wisdom>>> table.Append()
>>> table.name = 'Ethan'
>>> table.age = 37
>>> table.wisdom = 'Python rules!'
>>> table.Scatter() {'age': 37, 'name': 'Ethan', 'wisdom': 'Python rules!'}
>>> table.GetField('name') 'Ethan'
>>> table[0] Ethan 37 1
>>> record = table[0]
>>> record.name 'Ethan'
>>> record.wisdom 'Python rules!'
>>> record.age = 40
>>> record Ethan 40 1
>>> table[0] Ethan 40 1
>>> table.Append({'name':'Lori', 'age':45, 'wisdom':'happy gardens make a happy wife'})
>>> table.Scatter() {'age': 45, 'name': 'Lori', 'wisdom': 'happy gardens make a happy wife'}
>>> for record in table:
It is possible with mine. To clarify an earlier post, my module is forJohny said:Thanks for your reply.Is it possible to delete a record by using the
module?
Thanks
L>
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.