コード例 #1
0
def testBasic():
    sp = u.load()
    report = locationreport.LocationReport(scenereport.SceneReport(sp))
    data = report.generate()

    # try to catch cases where generate returns something other than a PDF
    # document
    assert len(data) > 200
    assert data[:8] == "%PDF-1.5"
コード例 #2
0
def genLocationReport(mainFrame, sp):
    report = locationreport.LocationReport(scenereport.SceneReport(sp))

    dlg = misc.CheckBoxDlg(mainFrame, "Report type", report.inf,
                           "Information to include:", False)

    ok = False
    if dlg.ShowModal() == wx.ID_OK:
        ok = True

    dlg.Destroy()

    if not ok:
        return

    data = report.generate()

    gutil.showTempPDF(data, sp.cfgGl, mainFrame)
コード例 #3
0
 def __init__(self, sp):
     self.sp = sp
     self.sr = scenereport.SceneReport(sp)
     self.cr = characterreport.CharacterReport(sp)