示例#1
0
 def reuse(self):
     self.message("INFO Reusing!")
     res_file = self.plot_output_dir + "result"
     if self.has_output_dir and os.path.exists(res_file+".info"):
         self.message("INFO Fetching last round's data: ")
         res = diskio.read(res_file)
         self.message(str(res))
         if hasattr(res, "RESULT_WRAPPERS"):
             self.result = list(diskio.read(f) for f in res.RESULT_WRAPPERS)
         else:
             self.result = res
         settings.post_proc_dict[self.name] = self.result
示例#2
0
 def make_info_file_divs(self):
     if not self.plain_info:
         return
     self.web_lines += (
         '<!-- info files -->',
         '<h2>Info files</h2>',
     )
     for nfo in self.plain_info:
         p_nfo = os.path.join(self.working_dir, nfo)
         try:
             wrp = diskio.read(p_nfo)
             self.web_lines += (
                 '<div>',
                 '<p>',
                 '<b>' + nfo + '</b>',
                 '<p>',
                 '<pre>',
                 str(wrp),
                 '</pre>',
                 '</div>',
             )
         except (SyntaxError, ValueError, IOError):
             self.message('WARNING Could not read info file at %s' % p_nfo)
             etype, evalue, _ = sys.exc_info()
             traceback.print_exception(etype, evalue, None)
     self.web_lines += ('', )
示例#3
0
 def make_info_file_divs(self):
     self.web_lines += ('<h2>Info files:</h2>', )
     for nfo in self.plain_info:
         wrp = diskio.read(os.path.join(self.working_dir, nfo))
         self.web_lines += (
             '<div>',
             '<p>',
             '<b>' + nfo + '</b>',
             '<p>',
             '<pre>',
             str(wrp),
             '</pre>',
             '</div>',
             '<hr width="60%">',
         )
示例#4
0
 def make_info_file_divs(self):
     self.web_lines += ('<h2>Info files:</h2>',)
     for nfo in self.plain_info:
         wrp = diskio.read(
             os.path.join(self.working_dir, nfo)
         )
         self.web_lines += (
             '<div>',
             '<p>',
             '<b>' + nfo + '</b>',
             '<p>',
             '<pre>',
             str(wrp),
             '</pre>',
             '</div>',
             '<hr width="60%">',
         )