Mercurial > repos > iuc > ncbi_eutils_elink
diff __efetch_build_options.py @ 1:2791c731fc65 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ncbi_entrez_eutils commit a4b0969b33a68a0ea9ba12291f6694aec24f13ed
author | iuc |
---|---|
date | Tue, 30 Oct 2018 19:07:34 -0400 |
parents | 59063d2e91c6 |
children | 55b3067762f9 |
line wrap: on
line diff
--- a/__efetch_build_options.py Thu Jul 07 02:40:20 2016 -0400 +++ b/__efetch_build_options.py Tue Oct 30 19:07:34 2018 -0400 @@ -1,6 +1,8 @@ #!/usr/bin/env python # Daniel Blankenberg # Creates the options for tool interface +from __future__ import print_function + import re # http://eutils.ncbi.nlm.nih.gov/entrez/eutils/einfo.fcgi @@ -164,7 +166,7 @@ section = None for line in help: - line = re.split('\s{2,}', line.strip()) + line = re.split(r'\s{2,}', line.strip()) # Ignore empties if len(line) == 0: continue @@ -214,9 +216,9 @@ format_names = {} -print ''' <xml name="db"> +print(''' <xml name="db"> <conditional name="db"> - <expand macro="dbselect" />''' + <expand macro="dbselect" />''') for key in sorted(db): format_options = [] @@ -233,13 +235,13 @@ format_names[format_string] = format_modifier - print WHEN_TPL.format( + print(WHEN_TPL.format( format=key, format_options='\n '.join(format_options) - ) + )) -print ''' </conditional> - </xml>''' +print(''' </conditional> + </xml>''') CHANGE_FORMAT_TPL = ''' <xml name="efetch_formats"> @@ -264,4 +266,4 @@ key=k, value=v )) -print CHANGE_FORMAT_TPL.format(formats='\n '.join(whens)) +print(CHANGE_FORMAT_TPL.format(formats='\n '.join(whens)))