Skip to content
A small library for python that reads an mlocate database
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE
README.md
pymlocate.py

README.md

pymlocate

A small library for python that reads an mlocate database The implementation has been done according to the man page mlocate.db(5).

Note that the mlocate database is usually residing in /var/lib/mlocate which is only readable for group 'locate'.

Written by Alexander Schlemmer, 2016

This library can make use of the chardet module for recognizing character encodings: https://pypi.python.org/pypi/chardet

Example:

import pymlocate

ml = pymlocate.open_locate_db("mlocate.db", True)

print(ml[0].dirname)

You can’t perform that action at this time.