Commit 5a9f4747 authored by Michael Droettboom's avatar Michael Droettboom

Only print console when done with a code chunk

parent c73c37e6
......@@ -42,14 +42,14 @@
term.set_prompt('[[;gray;]... ]')
} else {
term.set_prompt('[[;red;]>>> ]')
}
var stderr = pyodide.runPython("sys.stderr.getvalue()").trim()
if (stderr) {
term.echo(`[[;red;]${stderr}]`)
} else {
var stdout = pyodide.runPython("sys.stdout.getvalue()")
if (stdout) {
term.echo(stdout.trim())
var stderr = pyodide.runPython("sys.stderr.getvalue()").trim()
if (stderr) {
term.echo(`[[;red;]${stderr}]`)
} else {
var stdout = pyodide.runPython("sys.stdout.getvalue()")
if (stdout) {
term.echo(stdout.trim())
}
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment