5.4.1 Module Level Functions

The e32dbm defines the following functions:

open( dbname[,flags, mode])
Opens or creates the given database file and returns an e32dbm object. Note that dbname should be a full path name, for example, u'c: $\backslash
\backslash $foo.db'. Flags can be:

If the character 'f' is appended to flags, the database is opened in fast mode. In fast mode, updates are written to the database only when one of these methods is called: sync, close, reorganize, or clear.

Since the connection object destructor calls close, it is not strictly necessary to close the database before exiting to ensure that data is saved, but it is still good practice to call the close method when you are done with using the database. Closing the database releases the lock on the file and allows the file to be reopened or deleted without exiting the interpreter.

If you plan to do several updates, it is highly recommended that you open the database in fast mode, since inserts and updates are more efficient when they are bundled together in a larger transaction. This is especially important when you plan to insert large amounts of data, since inserting records to e32db is very slow if done one record at a time.

See About this document... for information on suggesting changes.