return value_list
def items(self):
- return zip(self.keys(), self.values())
+ return list(zip(list(self.keys()), list(self.values())))
def __getitem__(self, key):
# FIXME: this is inefficient. building the dictionary be rescanning the xml.
- v = dict(self.items())
+ v = dict(list(self.items()))
return v[key]
class IPAR(object):
"""
suffix_node = self.tree.find('RunParameters/CompressionSuffix')
if suffix_node is None:
- print "find compression suffix failed"
+ print("find compression suffix failed")
return None
suffix = suffix_node.text
files = []
format = "%s_%s_%04d_%s.txt%s"
- for lane, attrib in self.tiles.items():
+ for lane, attrib in list(self.tiles.items()):
for file_type in ["int","nse"]:
start, stop = attrib['TileRange']
for tile in range(start, stop+1):
return files
def dump(self):
- print "Matrix:", self.matrix
- print "Tree:", self.tree
+ print("Matrix:", self.matrix)
+ print("Tree:", self.tree)
def get_elements(self):
attribs = {'version': str(IPAR.XML_VERSION) }
tree = ElementTree.parse(paramfile).getroot()
run = tree.find('Run')
- if run.attrib.has_key('Name') and run.attrib['Name'] in SOFTWARE_NAMES:
+ if 'Name' in run.attrib and run.attrib['Name'] in SOFTWARE_NAMES:
return run
else:
LOGGER.info("No run found")