File indexing completed on 2024-04-28 15:53:57
0001 # AUTO-GENERATED FILE -- DO NOT EDIT 0002 0003 """ This module provides an interface to the GNU DBM (GDBM) library. 0004 0005 This module is quite similar to the dbm module, but uses GDBM instead to 0006 provide some additional functionality. Please note that the file formats 0007 created by GDBM and dbm are incompatible. 0008 0009 GDBM objects behave like mappings (dictionaries), except that keys and 0010 values are always strings. Printing a GDBM object doesn't print the 0011 keys and values, and the items() and values() methods are not 0012 supported. """ 0013 0014 __package__ = None 0015 0016 class error(Exception): 0017 0018 pass 0019 0020 def open(filename, flags=None, mode=None): 0021 """ open(filename, [flags, [mode]]) -> dbm_object 0022 Open a dbm database and return a dbm object. The filename argument is 0023 the name of the database file. 0024 0025 The optional flags argument can be 'r' (to open an existing database 0026 for reading only -- default), 'w' (to open an existing database for 0027 reading and writing), 'c' (which creates the database if it doesn't 0028 exist), or 'n' (which always creates a new empty database). 0029 0030 Some versions of gdbm support additional flags which must be 0031 appended to one of the flags described above. The module constant 0032 'open_flags' is a string of valid additional flags. The 'f' flag 0033 opens the database in fast mode; altered data will not automatically 0034 be written to the disk after every change. This results in faster 0035 writes to the database, but may result in an inconsistent database 0036 if the program crashes while the database is still open. Use the 0037 sync() method to force any unwritten data to be written to the disk. 0038 The 's' flag causes all database operations to be synchronized to 0039 disk. The 'u' flag disables locking of the database file. 0040 0041 The optional mode argument is the Unix mode of the file, used only 0042 when the database has to be created. It defaults to octal 0666. """ 0043 return None 0044 0045 open_flags = 'rwcnfsu' 0046