def on_export(self, event):
"""
Gets a file path via popup, then exports content
"""
exporters = plugin_loader.load_export_plugins()
wildcards = '|'.join([x.wildcard for x in exporters])
export_dialog = wx.FileDialog(self, "Export BOM", "", "",
wildcards,
wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT)
if export_dialog.ShowModal() == wx.ID_CANCEL:
return
base, ext = os.path.splitext(export_dialog.GetPath())
filt_idx = export_dialog.GetFilterIndex()
exporters[filt_idx]().export(base, self.component_type_map)
评论列表
文章目录