gopherdata / gophernotes

The Go kernel for Jupyter notebooks and nteract.
MIT License
3.82k stars 265 forks source link

repl: print and println not displaying output #149

Closed sbinet closed 5 years ago

sbinet commented 5 years ago

print and println are pre-declared identifiers that I have been using in some of my neugram.io-based notebooks. see:

converting these notebooks to gomacro fails, as it seems like only stdout is captured (and they print to stderr.)

could this be added?

thanks :)

SpencerPark commented 5 years ago

This is a little strange because the kernel redirects stderr the same way it redirects stdout. see https://github.com/gopherdata/gophernotes/blob/master/kernel.go#L359. Also travis says that the TestPrintStderr is passing.

I just tried the following which printed fine. Maybe this is an issue with the println implementation in gomacro?

import "fmt"
import "os"
os.Stderr.WriteString("Hello stderr")