Bibtex parser in Python 2 and 3