From 1fdfb871d9eb815161af877e28d01ec9fa36e10c Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 15 Apr 2011 21:25:05 -0400 Subject: [PATCH] Capitalize global constants in entrez.py. --- posts/entrez/entrez.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/posts/entrez/entrez.py b/posts/entrez/entrez.py index e83a26e..30a6566 100755 --- a/posts/entrez/entrez.py +++ b/posts/entrez/entrez.py @@ -64,10 +64,10 @@ if _POSIX: # Entrez access points -einfo_url = 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/einfo.fcgi' -esearch_url = 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi' -efetch_url = 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi' -elink_url = 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/elink.fcgi' +EINFO_URL = 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/einfo.fcgi' +ESEARCH_URL = 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi' +EFETCH_URL = 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi' +ELINK_URL = 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/elink.fcgi' # Entrez-requested tracking information TOOL = 'entrezpy' @@ -222,8 +222,8 @@ def _query_einfo(db=None): 'tool': TOOL, 'email': EMAIL}) - LOG.info("getting einfo from '%s?%s'" % (einfo_url, params)) - f = urllib.urlopen ("%s?%s" % (einfo_url, params)) + LOG.info("getting einfo from '%s?%s'" % (EINFO_URL, params)) + f = urllib.urlopen ("%s?%s" % (EINFO_URL, params)) string = f.read() f.close() LOG.debug('got:\n%s' % string) @@ -431,8 +431,8 @@ def _query_esearch(term, db='pubmed', field=None, 'rettype': rettype, 'sort': sort}) - LOG.info("getting esearch from '%s?%s'" % (esearch_url, params)) - f = urllib.urlopen ("%s?%s" % (esearch_url, params)) + LOG.info("getting esearch from '%s?%s'" % (ESEARCH_URL, params)) + f = urllib.urlopen ("%s?%s" % (ESEARCH_URL, params)) string = f.read() f.close() LOG.debug('got:\n%s' % string) @@ -523,8 +523,8 @@ def _query_efetch(id, db='pubmed', 'retmode': retmode, 'rettype': rettype}) - LOG.info("getting efetch from '%s?%s'" % (efetch_url, params)) - f = urllib.urlopen ("%s?%s" % (efetch_url, params)) + LOG.info("getting efetch from '%s?%s'" % (EFETCH_URL, params)) + f = urllib.urlopen ("%s?%s" % (EFETCH_URL, params)) string = f.read() f.close() LOG.debug('got:\n%s' % string) @@ -630,8 +630,8 @@ def _query_elink(id, term=None, db='all', dbfrom='pubmed', 'datetype': datetype, 'retmode': retmode}) - LOG.info("getting elink from '%s?%s'" % (elink_url, params)) - f = urllib.urlopen ("%s?%s" % (elink_url, params)) + LOG.info("getting elink from '%s?%s'" % (ELINK_URL, params)) + f = urllib.urlopen ("%s?%s" % (ELINK_URL, params)) if cmd == 'prlinks' and retmode == 'ref': # Just get the link, we don't need the provider's webpage HTML. -- 2.26.2