From 183d29ff9a85380f8cfe10fcfa284e112c4d77c1 Mon Sep 17 00:00:00 2001 From: "Carlos Eduardo Sanchez Torres (sanchezcarlosjr)" <24639141+sanchezcarlosjr@users.noreply.github.com> Date: Tue, 3 Oct 2023 08:43:24 -0700 Subject: [PATCH] Update Python.ts --- src/app/notebook/cellTypes/languages/Python.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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}
`);