MCPcopy Create free account
hub / github.com/Image-Py/imagepy / start

Method start

imagepy/core/engine/report.py:40–55  ·  view source on GitHub ↗
(self, para=None, callafter=None)

Source from the content-addressed store, hash-verified

38 if callback!=None:callback()
39
40 def start(self, para=None, callafter=None):
41 wb = pyxl.load_workbook(self.cont)
42 xlreport.repair(wb)
43 info, key = xlreport.parse(wb)
44 if para is not None:
45 return self.runasyn(wb, info, para, callafter)
46 dialog = GridDialog(IPy.curapp, self.title, info, key)
47 rst = dialog.ShowModal()
48 para = dialog.GetValue()
49 dialog.Destroy()
50 if rst != 5100: return
51 filt = '|'.join(['%s files (*.%s)|*.%s'%('XLSX', 'xlsx', 'xlsx')])
52 if not IPy.getpath('Save..', filt, 'save', para): return
53 win = WidgetsManager.getref('Macros Recorder')
54 if win!=None: win.write('{}>{}'.format(self.title, para))
55 self.runasyn(wb, info, key, para, callafter)
56
57def show_rpt(data, title):
58 wx.CallAfter(Report(title, data).start)

Callers

nothing calls this directly

Calls 6

runasynMethod · 0.95
GetValueMethod · 0.95
GridDialogClass · 0.90
parseMethod · 0.80
getrefMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected