WREBTest.py 文件源码

python
阅读 16 收藏 0 点赞 0 评论 0

项目:SLAC 作者: bencbartlett 项目源码 文件源码
def report(self, pdf, reportPath):
        '''@brief generate this test's page in the PDF report.
        @param pdf pyfpdf-compatible PDF object.
        @param reportPath Path of directory containing the pdf report'''
        onePage = False
        if onePage:
            pdf.makePlotPage("Parameter Logging: " + name, name + ".jpg",
                             [(self.data[name], name) for name in self.names])
            pdf.cell(0, 6, "Data saved to pickleable object in ParameterLogging.dat with key " + name, 0, 1, 'L')
        else:
            for name in self.names:
                pdf.makePlotPage("Parameter Logging: " + name, name + ".jpg", [(self.data[name], name)])
                pdf.cell(0, 6, "Data saved to pickleable object in ParameterLogging.dat with key " + name, 0, 1, 'L')
        if dump:
            testPath = reportPath + "/" + self.title
            os.mkdir(testPath)
            with open(testPath + "/data.dat", "wb") as output:
                pickle.dump(self.data, output)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号