diff --git a/src/app/notebook/cellTypes/languages/Python.ts b/src/app/notebook/cellTypes/languages/Python.ts index 06163b5..62953c2 100644 --- a/src/app/notebook/cellTypes/languages/Python.ts +++ b/src/app/notebook/cellTypes/languages/Python.ts @@ -46,8 +46,10 @@ def display(f): f.canvas.show() return "
" ${this.mostRecentCode}`; - instance.runPythonAsync(code).then((output: string) => { - this.write(output); + instance.runPythonAsync(code).then((output: any) => { + if (output) { + this.write(output); + } this.stop(); }).catch((e: any) => { this.rewrite(`${e.message}`);