bibtex-py - bibtex parsing module

bibtex-py is a simple bibtex parsing module for python. It is the library used in biblio-py. The usage of bibtex-py is very simple; the function parse_bib is called, and the filename of the bibfile is passed as parameter. The result is a list filled with the instances of BibtexEntry class. For example:
from bibtex import bibparse

entries = bibparse.parse('example.bib')
The actual data of the bibtex entry can be accessed through the following fields: for example:
print "%s\n" % ( entries[n].data['author'], )
The BibtexEntry.__str__() is overriden in BibtexEntry and prints out the entry in bibtex form.
@inproceedings{Spi08g,
	Author = {Diomidis Spinellis},
	Url = {http://www.dmst.aueb.gr/dds/pubs/talks/2008-03-InfEd/html/Spi08g.htm},
	Booktitle = {4th Panhellenic Conference on Computer Science Education},
	Title = {Open Source in Education},
	Filename = {/Users/bkarak/devel/bkarak-svn/bibliography/reading/papers/dds.bib},
	Note = {Keynote address. (In Greek.)},
	Location = {Patras, Greece},
	Organization = {University of Patras},
	Pages = {31--32},
	Editor = {Vassilis Komis},
}
Download version 0.8 (~1.2kb).