diff __efetch_build_options.py @ 1:28f69754ddc5 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:09:05 -0400
parents 9d18e6815994
children d1789b4821fc
line wrap: on
line diff
--- a/__efetch_build_options.py	Thu Jul 07 02:39:52 2016 -0400
+++ b/__efetch_build_options.py	Tue Oct 30 19:09:05 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)))