Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from pymarc import MARCReader
- from pymarc import Record, Field
- with open('machiavellism_biu_2018.mrc', 'rb') as fh:
- reader = MARCReader(fh, to_unicode=True)
- # loop 1
- recnum = 0
- for record in reader:
- # loop 2
- recnum += 1
- for tield_contents in record.get_fields():
- print ('%09d' % recnum,' ',tield_contents.tag,' ',' L',tield_contents.value())
- ## end loop 2
- python pymarc_000002.py
- 000000001 001 L 002547390
- 000000001 003 L OCoLC
- 000000001 005 L 20181016125657.0
- 000000001 008 L 180214t20182018enka b 001 0 eng
- 000000001 092 L 302 BER m
- 000000001 020 L 9781138093317
- 000000001 035 L (OCoLC)991673448
- 000000001 040 L eng rda
- 000000001 041 L eng
- 000000001 100 L Bereczkei, Tamás lat author
- 000000001 245 L Machiavellianism : the psychology of manipulation / Tamas Bereczkei.
- 000000001 264 L London : Routledge, 2018.
- 000000001 264 L ©2018
Add Comment
Please, Sign In to add comment