basilisp icon indicating copy to clipboard operation
basilisp copied to clipboard

Hook `sys.stdout`, `sys.stderr`, `sys.stdin`

Open chrisrink10 opened this issue 1 year ago • 1 comments

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.

chrisrink10 avatar Jan 25 '24 20:01 chrisrink10

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.

chrisrink10 avatar Feb 22 '24 14:02 chrisrink10