|
|
|
|
|
_initializeFields(yo)
builds the FieldList of names, types, and descriptions |
source code
|
|
|
_fieldLayout(yo,
i)
Returns field information Name Type(Length[,Decimals]) |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
__init__(yo,
filename,
fieldlist='
' ,
memosize=128,
ignore_memos=False,
readonly=False,
keep_memos=False,
metaonly=False,
codepage=' cp1252 ' )
open/create dbf file |
source code
|
|
|
|
|
|
|
|
|
|
|
add_fields(yo,
fieldspec)
adds field(s) to the table layout; format is Name Type(Length,Decimals)[; Name Type(Length,Decimals)[...]] |
source code
|
|
|
append(yo,
kamikaze='
' ,
drop=False,
multiple=1)
adds <multiple> blank records, and fills fields with dict/tuple values if present |
source code
|
|
|
bof(yo)
moves record pointer to previous usable record; returns True if no more usable records |
source code
|
|
|
bottom(yo,
get_record=False)
sets record pointer to bottom of table
if get_record, seeks to and returns last (non-deleted) record
DbfError if table is empty
Bof if all records deleted and use_deleted is False |
source code
|
|
|
close(yo,
keep_table=False,
keep_memos=False)
closes disk files
ensures table data is available if keep_table
ensures memo data is available if keep_memos |
source code
|
|
|
current(yo,
index=False)
returns current logical record, or its index |
source code
|
|
|
delete_fields(yo,
fields)
removes field(s) from the table |
source code
|
|
|
eof(yo)
moves record pointer to next usable record; returns True if no more usable records |
source code
|
|
|
export(yo,
records=None,
filename=None,
fieldlist=None,
format=' csv ' ,
header=True)
writes the table using CSV or tab-delimited format, using the filename
given if specified, otherwise the table name |
source code
|
|
|
goto(yo,
criteria)
changes the record pointer to the first matching (non-deleted) record
criteria should be either a tuple of tuple(value, field, func) triples,
or an integer to go to |
source code
|
|
|
index(yo,
sort=None,
reverse=False)
orders the table using the sort provided; removes index if no sort provided |
source code
|
|
|
is_memotype(yo,
name)
returns True if name is a memo type field |
source code
|
|
|
new(yo,
filename,
_fieldlist='
' )
returns a new table of the same type |
source code
|
|
|
next(yo)
set record pointer to next (non-deleted) record, and return it |
source code
|
|
|
pack(yo,
_pack=True)
physically removes all deleted records |
source code
|
|
|
prev(yo)
set record pointer to previous (non-deleted) record, and return it |
source code
|
|
|
|
|
rename_field(yo,
oldname,
newname)
renames an existing field |
source code
|
|
|
search(yo,
match,
fuzzy=None,
indices=False)
searches using a binary algorythm
looking for records that match the criteria in match, which is a tuple
with a data item per ordered field. |
source code
|
|
|
size(yo,
field)
returns size of field as (length, decimals) |
source code
|
|
|
structure(yo,
fields=None)
return character list of fields suitable for creating same table layout |
source code
|
|
|
top(yo,
get_record=False)
sets record pointer to top of table; if get_record, seeks to and returns first (non-deleted) record
DbfError if table is empty
Eof if all records are deleted and use_deleted is False |
source code
|
|
|
|
|
zap(yo,
areyousure=False)
removes all records from table -- this cannot be undone!
areyousure must be True, else error is raised |
source code
|
|
Inherited from object :
__delattr__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__
|