How to connect to database using z39.50

1.1k views Asked by At
from PyZ3950 import zoom
conn = zoom.Connection ('z3950.iacentre.com', 210,user='gaurishankar')
conn.databaseName = 'itke'
conn.preferredRecordSyntax = 'USMARC'
query = zoom.Query ('CCL', 'mango')
res = conn.search (query)
print res [0]

This is my code and I am not able to make connection with database.

1

There are 1 answers

0
Dark Matter On BEST ANSWER

This is the answer

from PyZ3950 import zoom
conn = zoom.Connection ('z3950.iacentre.com', 210,user='gaurishankar')
conn.databaseName = 'itke'
conn.preferredRecordSyntax = 'USMARC'
query = zoom.Query ('CCL', 'mango')
res = conn.search (query)
for i in res:
    print i,i.data