basilisp
basilisp copied to clipboard
Hook `sys.stdout`, `sys.stderr`, `sys.stdin`
Currently, Basilisp copies the standard streams into its own versions at startup:
(def ^:dynamic *in* sys/stdin)
(def ^:dynamic *out* sys/stdout)
(def ^:dynamic *err* sys/stderr)
But if the Python process streams change, the change is not reflected in Basilisp. Likewise, it's not possible to redirect Python code output based on changes in the Basilisp streams.
Clojure actually doesn't do this, so I'm skeptical it's the right move. It was originally going to be a component of supporting #851, but it felt a little scary to do.