Home computickets Does Python 3.5 have any opportunity to read DBF files?

Does Python 3.5 have any opportunity to read DBF files?




There is a database in DBF format. More precisely, this is 1C 7.7 database (i.e., in fact, this is the base FoxPro). It has tables in which you just need to choose lines on some very simple criterion and return them as a list. He began to study the documentation, and then it turned out that the readings of DBF files in Python 3.5 is actually no. Experiments with the DBF library failed:

table = dbf.table ('sc8454.dbf') # works, however the next line
For item in table: # EXlence 'E: \ 1 \ SKLAD_2006 \ SC8454.dbf is closed; Record 0 is unavailable '
  Print (Item)

Tell me, maybe I am wrong, and in Python 3.5 still have any reliable tools to read DBF files?

Answer 1, Authority 100%

Before For, you need a string: table.open ()

table = dbf.table ('sc8454.dbf')
table.open ()
for item in table:
  Print (Item)

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions