The Python Binding

12th July 2002

Python Binding Specification

The Python binding is maintained by Aaron Lav <asl2@pobox.com>

The ZOOM binding for Guido van Rossum's Python can be found at http://www.pobox.com/~asl2/software/PyZ3950/zoom.html

Canonical Sample Program

To give a flavour of the Python binding, here is ZOOM's equivalent of the ``Hello World'' program: a tiny Z39.50 client that fetches and displays the MARC record for Farlow & Brett Surman's The Complete Dinosaur from the Library of Congress.

from PyZ3950 import zoom

conn = zoom.Connection ('z3950.loc.gov', 7090)
conn.databaseName = 'Voyager'
conn.preferredRecordSyntax = 'USMARC'

query = zoom.Query ('CCL', 'isbn=0253333490')

res = conn.search (query)
print res [0]

conn.close ()

Python Binding Implementations

We currently have the following implementations of the Python binding:

Feedback to <mike@indexdata.com> is welcome!