ContentsIndex
MissingPy.AnyDBM
Portability portable
Stability provisional
Maintainer jgoerzen@complete.org
Description

This module interfaces MissingH.AnyDBM to Python's anydbm.py. Implementations for specific Python *dbm modules are also available.

See and import MissingH.AnyDBM to use these features.

Written by John Goerzen, jgoerzen@complete.org

Synopsis
data PyDBMOpenFlags
= DBM_ReadOnly
| DBM_ReadWrite
| DBM_ReadWriteCreate
| DBM_ReadWriteNew
openAnyDBM :: FilePath -> PyDBMOpenFlags -> IO PyDict
openSpecificDBM :: String -> FilePath -> PyDBMOpenFlags -> IO PyDict
Documentation
data PyDBMOpenFlags
Flags used to open a dbm-type database
Constructors
DBM_ReadOnlyOpen an existing database for read only
DBM_ReadWriteOpen an existing database for reading and writing
DBM_ReadWriteCreateOpen a database for reading and writing, creating if it doesn't exist
DBM_ReadWriteNewOpen a database, creating it anew each time (deleting any existing data)
openAnyDBM :: FilePath -> PyDBMOpenFlags -> IO PyDict
Opens a persistent storage database using the "best" storage mechanism available to Python on this system. This will usually be one of the *dbm services, though in rare circumstances, could be "dumbdbm", which is only marginally better than MissingH.AnyDBM.StringDBM.
openSpecificDBM
:: StringPython module name to use
-> FilePathPath to database files
-> PyDBMOpenFlagsFlags to use when opening
-> IO PyDictResult

Open a database using a specific module given by the first parameter. The module supported are:

  • dbhash
  • dbm
  • dumbdbm
  • gdbm

SECURITY NOTE: the string is not validated before being passed to Python. Do not pass an arbitrary value to this function.

Produced by Haddock version 0.6