def __init__(self, filename, *args, **kwargs):
super(PepXMLIterator, self).__init__(filename, *args, **kwargs)<EOL>try:<EOL><INDENT>mzml = six.next(etree.iterparse(self.filename.name, tag=('<STR_LIT>',)))[<NUM_LIT:1>]<EOL>self.mzml_file = mzml<EOL>info = dict(mzml.items())<EOL>try:<EOL><INDENT>self.mzml = MZMLIterator('<STR_LIT>'%(info['<STR_LIT>'], info['<STR_LIT>']))<EOL><DEDENT>except IOError:<EOL><INDENT>xml_path, junk = os.path.split(filename)<EOL>junk, file_name = os.path.split(info['<STR_LIT>'])<EOL>new_path = os.path.join(xml_path, file_name)<EOL>try:<EOL><INDENT>self.mzml = MZMLIterator('<STR_LIT>'%(new_path, info['<STR_LIT>']))<EOL><DEDENT>except IOError:<EOL><INDENT>try:<EOL><INDENT>self.mzml = MZMLIterator('<STR_LIT>'%(new_path, info['<STR_LIT>']))<EOL><DEDENT>except IOError:<EOL><INDENT>self.mzml = None<EOL><DEDENT><DEDENT><DEDENT>self.filename.seek(<NUM_LIT:0>)<EOL>dom1 = etree.iterparse(self.filename.name, tag=('<STR_LIT>',))<EOL>self.lxml = True<EOL><DEDENT>except NameError:<EOL><INDENT>self.lxml = False<EOL>sys.stderr.write('<STR_LIT>')<EOL>return<EOL><DEDENT>if self.lxml:<EOL><INDENT>self.spectra = dom1<EOL>self.scans = {}<EOL>self.ra = {}<EOL><DEDENT>else:<EOL><INDENT>self.nest = <NUM_LIT:0><EOL><DEDENT>self.ptm_regex = re.compile(r'<STR_LIT>')<EOL>self.db = None<EOL>
An iterator over the pepXML file format.

        The returned items are ScanObjects