I've added the esedb module (esedb.zip) to the release page of the ManagedEsent
CodePlex project
(http://www.codeplex.com/ManagedEsent/Release/ProjectReleases.aspx). This is
still under development and I'm interested in comments, feedback and
suggestions on how to do things better in Python.
What is Esent?
Esent is the Windows database engine. It is used by the Active Directory and
several smaller applications on Windows clients (e.g. Windows Update). The same
code is also used by Microsoft Exchange as their database engine. The unmanaged
API is documented on MSDN and there is a managed interop layer on code plex.
What is esedb?
The esedb module uses the Esent interop layer to provide a persisted key/data
store in a dbm-like way. The zip file contains the managed interop DLL and the
Python module. The code uses the esent DLL which is part of Windows. This code
will work on Windows XP on up (it won't work on Windows 2000). That does mean
that this module will only work on Windows.
>>> x = esedb.open('test.db', mode='n')
>>> x['a'] = 'somedata'
>>> x['a']
'somedata'
>>> x.has_key('b')
False
>>> x['b'] = 'somemoredata'
>>> x['c'] = 'deleteme'
>>> del x['c']
>>> x.keys()
['a', 'b']
>>> x.values()
['somedata', 'somemoredata']
>>> x.close()
thanks,
--Laurion
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com