Is there any way in Python 3.5 to read dbf files?


  • QA Engineer

    DBF database available. More specifically, it's a database 1c 7.7 (i.e., it's actually FoxPro). It has tables that simply select lines on some very simple criterion and return them as a list. Started to study the documentation, and it turns out that the readings of dbf-fails at Python 3.5 are virtually non-existent. Experiments with the library dbf failed:

    table = dbf.Table('SC8454.dbf') # работает, однако уже следующая строка
    for item in table: # выдаст исключение 'E:\1\sklad_2006\SC8454.dbf is closed; record 0 is unavailable'
        print(item)
    

    Tell me if I'm wrong, and Python 3.5 still has any reliable means to read dbf files?



  • Before you need a line: table.open()

    table = dbf.Table('SC8454.dbf')
    table.open()
    for item in table:
        print(item)
    



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2