~ubuntu-branches/ubuntu/lucid/python-scipy/lucid

« back to all changes in this revision

Viewing changes to Lib/plt/dumb_shelve.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-01-07 14:12:12 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070107141212-mm0ebkh5b37hcpzn
* Remove build dependency on python-numpy-dev.
* python-scipy: Depend on python-numpy instead of python-numpy-dev.
* Package builds on other archs than i386. Closes: #402783.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
from shelve import Shelf
2
 
 
3
 
class DbfilenameShelf(Shelf):
4
 
        """Shelf implementation using the "anydbm" generic dbm interface.
5
 
 
6
 
        This is initialized with the filename for the dbm database.
7
 
        See the module's __doc__ string for an overview of the interface.
8
 
        """
9
 
        
10
 
        def __init__(self, filename, flag='c'):
11
 
                import dumbdbm_patched
12
 
                Shelf.__init__(self, dumbdbm_patched.open(filename, flag))
13
 
 
14
 
 
15
 
def open(filename, flag='c'):
16
 
        """Open a persistent dictionary for reading and writing.
17
 
 
18
 
        Argument is the filename for the dbm database.
19
 
        See the module's __doc__ string for an overview of the interface.
20
 
        """
21
 
        
22
 
        return DbfilenameShelf(filename, flag)