def onDownload(self, event): self.onCompile(event=None) from pynxc import download path = self.parent.dir + os.sep + self.filename f = open(path, "w") f.write(self.editor.GetText()) f.close() out = download(path, run=False) if out != ('', ''): self.parent.showMsg(''.join(out))