-
Notifications
You must be signed in to change notification settings - Fork 90
Python development
libesedb comes with Python-bindings named pyesedb.
Below are examples how use pyesedb. They assume you have a working version of pyesedb on your system. To build pyesedb see Building.
To be able to use pyesedb in your Python scripts add the following import:
import pyesedb
The get_version() module function can be used to retrieve the version of the pyesedb.
pyesedb.get_version()
This will return a textual string (Unicode) that contains the libesedb version. Since pyesedb is a wrapper around libesedb it does not have a separate version.
esedb_file = pyesedb.file()
esedb_file.open("Windows.edb")
...
esedb_file.close()
The explicit call to esedb_file.close() is not required. Close only must be called once all operations on the file have been completed.
file_object = open("Windows.edb", "rb")
esedb_file = pyesedb.file()
esedb_file.open_file_object(file_object)
...
esedb_file.close()
The explicit call to esedb_file.close() is not required. Close only must be called once all operations on the file have been completed and will not close the file-like object itself.
import pyesedb
help(pyesedb)
help(pyesedb.file)