original_docstring: Get a PMID based on a given DOI.
docstring: Get a PMID based on a given DOI.
docstring_tokens: Get a PMID based on a given DOI .
code: def doi2pmid(doi, debug):
      """Get a PMID based on a given DOI."""
      # *needto be improved*
      result = Entrez.esearch(db="pubmed", term=doi, email=MAIL)
      out = Entrez.read(result)
      idlist = out["IdList"]
      if debug:
          print('IdList'.ljust(LJUST, LJUST_SPACER), idlist)
      if len(idlist) == 1:
          return idlist[0]
          # if IdList ['20959296', '20959295', '20959294'959289', '20959288',
          #'20959287', '20952411', '20952403', '20952402'] # problem !!!
      else:
          return False
code_tokens: def doi2pmid ( doi , debug ) : result = Entrez . esearch ( db = "pubmed" , term = doi , email = MAIL ) out = Entrez . read ( result ) idlist = out [ "IdList" ] if debug : print ( 'IdList' . ljust ( LJUST , LJUST_SPACER ) , idlist ) if len ( idlist ) == 1 : return idlist [ 0 ] else : return False
short_docstring: Get a PMID based on a given DOI.
short_docstring_tokens: Get a PMID based on a given DOI .
comment: """Get a PMID based on a given DOI."""$SEP$# *needto be improved*$SEP$# if IdList ['20959296', '20959295', '20959294'959289', '20959288',$SEP$#'20959287', '20952411', '20952403', '20952402'] # problem !!!