|
|
NoneType
|
|
|
Decimal
Floating point class for decimal arithmetic.
|
|
|
bytes
str(object) -> string
|
|
|
property
2.6 properties for 2.5-
|
|
|
MutableDefault
Lives in the class, and on first access calls the supplied factory
and maps the result into the instance it was called on
|
|
|
DbfError
Fatal errors elicit this response.
|
|
|
DataOverflow
Data too large for field
|
|
|
BadData
bad data in table
|
|
|
FieldMissing
Field does not exist in table
|
|
|
NonUnicode
Data for table not in unicode
|
|
|
DbfWarning
Normal operations elicit this response
|
|
|
Eof
End of file reached
|
|
|
Bof
Beginning of file reached
|
|
|
DoNotIndex
Returned by indexing functions to suppress a record from becoming
part of the index
|
|
|
NullType
Null object -- any interaction returns Null
|
|
|
Char
adds null capable str constructs
|
|
|
Date
adds null capable datetime.date constructs
|
|
|
DateTime
adds null capable datetime.datetime constructs
|
|
|
Time
adds null capable datetime.time constructs
|
|
|
Logical
return type for Logical fields; can take the values of True, False,
or None/Null
|
|
|
Quantum
return type for Logical fields; implements boolean algebra can take
the values of True, False, or None/Null/Unknown/Other
|
|
|
_DbfRecord
Provides routines to extract and save data within the fields of a
dbf record.
|
|
|
_DbfMemo
Provides access to memo fields as dictionaries must override _init,
_get_memo, and _put_memo to store memo contents to disk
|
|
|
_Db3Memo
Provides access to memo fields as dictionaries must override _init,
_get_memo, and _put_memo to store memo contents to disk
|
|
|
_VfpMemo
Provides access to memo fields as dictionaries must override _init,
_get_memo, and _put_memo to store memo contents to disk
|
|
|
DbfCsv
csv format for exporting tables
|
|
|
FieldType
tuple with named attributes for representing a field's dbf type and
python class
|
|
|
DbfTable
Provides a framework for dbf style tables.
|
|
|
Db3Table
Provides an interface for working with dBase III tables.
|
|
|
FpTable
Provides an interface for working with FoxPro 2 tables
|
|
|
VfpTable
Provides an interface for working with Visual FoxPro 6 tables
|
|
|
List
list of Dbf records, with set-like behavior
|
|
|
Index
|
|
|
_Db4Table
|
|
|
fake_module
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
packShortInt(value,
bigendian=False)
Returns a two-bye integer from the value, or raises DbfError |
source code
|
|
|
|
packLongInt(value,
bigendian=False)
Returns a four-bye integer from the value, or raises DbfError |
source code
|
|
|
|
packStr(string)
Returns an 11 byte, upper-cased, null padded string suitable for
field names; raises DbfError if the string is bigger than 10 bytes |
source code
|
|
|
|
unpackShortInt(bytes,
bigendian=False)
Returns the value in the two-byte integer passed in |
source code
|
|
|
|
unpackLongInt(bytes,
bigendian=False)
Returns the value in the four-byte integer passed in |
source code
|
|
|
|
unpackStr(chars)
Returns a normal, lower-cased string from a null-padded byte string |
source code
|
|
|
|
unsupportedType(something,
*ignore)
called if a data type is not supported for that style of table |
source code
|
|
|
|
retrieveCharacter(bytes,
fielddef,
memo,
decoder)
Returns the string in bytes as fielddef[CLASS] or fielddef[EMPTY] |
source code
|
|
|
|
updateCharacter(string,
fielddef,
memo,
decoder,
encoder)
returns the string as bytes (not unicode) as fielddef[CLASS] or
fielddef[EMPTY] |
source code
|
|
|
|
retrieveCurrency(bytes,
fielddef,
*ignore)
returns the currency value in bytes |
source code
|
|
|
|
updateCurrency(value,
*ignore)
returns the value to be stored in the record's disk data |
source code
|
|
|
|
retrieveDate(bytes,
fielddef,
*ignore)
Returns the ascii coded date as fielddef[CLASS] or fielddef[EMPTY] |
source code
|
|
|
|
updateDate(moment,
*ignore)
returns the Date or datetime.date object ascii-encoded (yyyymmdd) |
source code
|
|
|
|
retrieveDouble(bytes,
fielddef,
*ignore)
Returns the double in bytes as fielddef[CLASS] ('default' == float) |
source code
|
|
|
|
updateDouble(value,
*ignore)
returns the value to be stored in the record's disk data |
source code
|
|
|
|
retrieveInteger(bytes,
fielddef,
*ignore)
Returns the binary number stored in bytes in little-endian format as
fielddef[CLASS] |
source code
|
|
|
|
updateInteger(value,
*ignore)
returns value in little-endian binary format |
source code
|
|
|
|
retrieveLogical(bytes,
fielddef,
*ignore)
Returns True if bytes is 't', 'T', 'y', or 'Y', None if '?', and
False otherwise |
source code
|
|
|
|
updateLogical(data,
*ignore)
Returns 'T' if logical is True, 'F' if False, '?' otherwise |
source code
|
|
|
|
retrieveMemo(bytes,
fielddef,
memo,
decoder)
Returns the block of data from a memo file |
source code
|
|
|
|
updateMemo(string,
fielddef,
memo,
decoder,
encoder)
Writes string as a memo, returns the block number it was saved into |
source code
|
|
|
|
retrieveNumeric(bytes,
fielddef,
*ignore)
Returns the number stored in bytes as integer if field spec for
decimals is 0, float otherwise |
source code
|
|
|
|
updateNumeric(value,
fielddef,
*ignore)
returns value as ascii representation, rounding decimal portion as
necessary |
source code
|
|
|
|
retrieveVfpDateTime(bytes,
fielddef,
*ignore)
returns the date/time stored in bytes; dates <= 01/01/1981
00:00:00 may not be accurate; BC dates are nulled. |
source code
|
|
|
|
updateVfpDateTime(moment,
*ignore)
sets the date/time stored in moment moment must have fields year,
month, day, hour, minute, second, microsecond |
source code
|
|
|
|
retrieveVfpMemo(bytes,
fielddef,
memo,
decoder)
Returns the block of data from a memo file |
source code
|
|
|
|
updateVfpMemo(string,
fielddef,
memo,
decoder,
encoder)
Writes string as a memo, returns the block number it was saved into |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fieldSpecErrorText(format,
flags)
generic routine for error text for the add...() functions |
source code
|
|
|
|
ezip(*iters)
extends all iters to longest one, using last value from each as
necessary |
source code
|
|
|
|
| sql_select(records,
chosen_fields,
condition,
field_names) |
source code
|
|
|
|
| sql_update(records,
command,
condition,
field_names) |
source code
|
|
|
|
| sql_delete(records,
dead_fields,
condition,
field_names) |
source code
|
|
|
|
| sql_recall(records,
all_fields,
condition,
field_names) |
source code
|
|
|
|
| sql_add(records,
new_fields,
condition,
field_names) |
source code
|
|
|
|
| sql_drop(records,
dead_fields,
condition,
field_names) |
source code
|
|
|
|
| sql_pack(records,
command,
condition,
field_names) |
source code
|
|
|
|
| sql_resize(records,
fieldname_newsize,
condition,
field_names) |
source code
|
|
|
|
sql_criteria(records,
criteria)
creates a function matching the sql criteria |
source code
|
|
|
|
sql_cmd(command,
field_names)
creates a function matching to apply command to each record in
records |
source code
|
|
|
|
sql(records,
command)
recognized sql commands are SELECT, UPDATE | REPLACE, DELETE, RECALL,
ADD, DROP |
source code
|
|
|
|
|
|
|
_normalize_tuples(tuples,
length,
filler)
ensures each tuple is the same length, using filler[-missing] for the
gaps |
source code
|
|
|
|
|
|
|
codepage(cp=None)
get/set default codepage for any new tables |
source code
|
|
|
|
encoding(cp=None)
get/set default encoding for non-unicode strings passed into a table |
source code
|
|
|
|
Write(records)
commits each record to disk before returning the next one |
source code
|
|
|
|
Table(filename,
field_specs='',
memo_size=128,
ignore_memos=False,
read_only=False,
keep_memos=False,
meta_only=False,
dbf_type=None,
codepage=None,
default_data_types={},
field_data_types={})
returns an open table of the correct dbf_type, or creates it if
field_specs is given |
source code
|
|
|
|
index(sequence)
returns integers 0 - len(sequence) |
source code
|
|
|
|
|
|
|
table_type(filename)
returns text representation of a table's dbf version |
source code
|
|
|
|
add_fields(table_name,
field_specs)
adds fields to an existing table |
source code
|
|
|
|
delete_fields(table_name,
field_names)
deletes fields from an existing table |
source code
|
|
|
|
export(table_name,
filename='',
fields='',
format='csv',
header=True)
creates a csv or tab-delimited file from an existing table |
source code
|
|
|
|
first_record(table_name)
prints the first record of a table |
source code
|
|
|
|
from_csv(csvfile,
to_disk=False,
filename=None,
field_names=None,
extra_fields=None,
dbf_type='db3',
memo_size=64,
min_field_size=1)
creates a Character table from a csv file to_disk will create a table
with the same name filename will be used if provided field_names
default to f0, f1, f2, etc, unless specified (list) extra_fields can
be used to add additional fields -- should be normal field specifiers
(list) |
source code
|
|
|
|
get_fields(table_name)
returns the list of field names of a table |
source code
|
|
|
|
|
|
|
rename_field(table_name,
oldfield,
newfield)
renames a field in a table |
source code
|
|
|
|
structure(table_name,
field=None)
returns the definition of a field (or all fields) |
source code
|
|
|
|
|