Advertisement
Guest User

Untitled

a guest
Oct 25th, 2016
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. import sys
  2.  
  3. AUTHORS_FILE_NAME = ""
  4. AFFILIATIONS_FILE_NAME = ""
  5. AUTHOR_AFFILIATION_FILE_NAME = ""
  6.  
  7. authors_file = open(AUTHORS_FILE_NAME)
  8. affiliations_file = open(AFFILIATIONS_FILE_NAME)
  9. author_affiliation_file = open(AUTHOR_AFFILIATION_FILE_NAME)
  10.  
  11. for auth_aff_line in author_affiliation_file:
  12. try:
  13. author_id, affiliation_id = auth_aff_line.split("\t")
  14. for auth_line in authors_file:
  15. for aff_line in affiliations_file:
  16. try:
  17. auth_id, auth_name = auth_line.split("\t")
  18. aff_id, aff_name = aff_line.split("\t")
  19. if auth_id == author_id and aff_id == affiliation_id:
  20. print
  21. except e:
  22. sys.stderr.write("skipping extry")
  23. except e:
  24. sys.stderr.write("skipping line: %s" % auth_aff_line)
  25.  
  26. authors_file.close()
  27. affiliations_file.close()
  28. author_affiliation_file.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement