Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- AUTHORS_FILE_NAME = ""
- AFFILIATIONS_FILE_NAME = ""
- AUTHOR_AFFILIATION_FILE_NAME = ""
- authors_file = open(AUTHORS_FILE_NAME)
- affiliations_file = open(AFFILIATIONS_FILE_NAME)
- author_affiliation_file = open(AUTHOR_AFFILIATION_FILE_NAME)
- for auth_aff_line in author_affiliation_file:
- try:
- author_id, affiliation_id = auth_aff_line.split("\t")
- for auth_line in authors_file:
- for aff_line in affiliations_file:
- try:
- auth_id, auth_name = auth_line.split("\t")
- aff_id, aff_name = aff_line.split("\t")
- if auth_id == author_id and aff_id == affiliation_id:
- print
- except e:
- sys.stderr.write("skipping extry")
- except e:
- sys.stderr.write("skipping line: %s" % auth_aff_line)
- authors_file.close()
- affiliations_file.close()
- author_affiliation_file.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement