def _make_qheader(self, job_name, qout_path, qerr_path):
        """Return a string with the options that are passed to the resource manager."""
        # get substitution dict for replacements into the template
        subs_dict = self.get_subs_dict()

        # Set job_name and the names for the stderr and stdout of the
        # queue manager (note the use of the extensions .qout and .qerr
        # so that we can easily locate this file.
        subs_dict['job_name'] = job_name.replace('/', '_')
        subs_dict['_qout_path'] = qout_path
        subs_dict['_qerr_path'] = qerr_path

        qtemplate = QScriptTemplate(self.QTEMPLATE)
        # might contain unused parameters as leftover $$.
        unclean_template = qtemplate.safe_substitute(subs_dict)

        # Remove lines with leftover $$.
        clean_template = []
        for line in unclean_template.split('\n'):
            if '$$' not in line:
                clean_template.append(line)

        return '\n'.join(clean_template)
def _make_qheader ( self , job_name , qout_path , qerr_path ) : subs_dict = self . get_subs_dict ( ) subs_dict [ 'job_name' ] = job_name . replace ( '/' , '_' ) subs_dict [ '_qout_path' ] = qout_path subs_dict [ '_qerr_path' ] = qerr_path qtemplate = QScriptTemplate ( self . QTEMPLATE ) unclean_template = qtemplate . safe_substitute ( subs_dict ) clean_template = [ ] for line in unclean_template . split ( '\n' ) : if '$$' not in line : clean_template . append ( line ) return '\n' . join ( clean_template )
Return a string with the options that are passed to the resource manager.