Your IP : 216.73.216.213
B
�d{T} � @ s� d Z ddlmZ ddlZddlZddlZddlZddlZddlZddl m
Z
G dd� d�Zdd� Ze
d kr�ed
�Zx,eD ]$Zeded �� ed
�� f � qxW dS )a? This is a DBF reader which reads Visual Fox Pro DBF format with Memo field
Usage:
>>> rec = readDbf('test.dbf')
>>> for line in rec:
>>> print line['name']
:date: 13/07/2007
http://www.physics.ox.ac.uk/users/santoso/Software.Repository.html
page says code is "available as is without any warranty or support".
� )�print_functionN)�rangec @ s\ e Zd Zdd� Zdd� Zdd� Zdd� Zd d
� Zdd� Zd
d� Z dd� Z
dd� Zdd� ZdS )�Dbasec C sF d | _ d | _d | _d | _d | _d| _d | _d| _d | _d| _ d| _
d S )Nr � )�fdb�fmemo�db_data� memo_data�fields�num_records�header� memo_file�memo_header�memo_block_size�memo_header_len)�self� r �C/opt/alt/python37/lib/python3.7/site-packages/logilab/common/dbf.py�__init__, s zDbase.__init__c C sD x>t dt|��D ],}tt�d|| �d �dkr|d |� S qW |S )Nr �c)r �len�ord�struct�unpack)r Ztxt�ir r r �_drop_after_NULL9 s zDbase._drop_after_NULLc C s<