0
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.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Dark Matter
  • 190
  • 2
  • 13
  • 1
    What error are you getting? – Coding Duchess Feb 11 '16 at 13:10
  • disconnected: Graceful close – Dark Matter Feb 12 '16 at 06:20
  • '00626nam a2200193 a 4500001001000000003000600010005001700016008004100033020001500074092001600089100002400105245009300129260002800222300002800250490001900278650004300297650004200340852005000382\x1e010000187\x1eUkOxU\x1e19960506171756.0\x1e880921s1988 enk 000 0 eng u\x1e \x1fa1850761213\x1e \x1faD0000006377\x1e10\x1faChant, Christopher.\x1e10\x1faAviation record breakers :\x1fbinnovations in modern flight technology /\x1fcChristopher Chant\x1e \x1faLondon :\x1fbApple,\x1fcc1988\x1e \x1fa127 p. :\x1fbill. ;\x1fc29 cm\x1e0 \x1faA Quintet book\x1e 0\x1faAeronautics\x1fxT – Dark Matter Feb 12 '16 at 06:21
  • This is data I am getting how to convert in XML – Dark Matter Feb 12 '16 at 06:22

1 Answers1

0

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
Dark Matter
  • 190
  • 2
  • 13