react-py icon indicating copy to clipboard operation
react-py copied to clipboard

Feature: Pipe non-traceback stderr into the `stderr` state.

Open glipR opened this issue 1 year ago • 0 comments

Currently, because we don't pass the stderr function into pyodide initialisation, anything written to stderr that is not a traceback from an error just follows the default functionality, and gets sent to console.warn.

Preferably, anything written to sys.stderr in python should instead populate the stderr state from usePython.

MWE: Paste the following code into the example from the react-py website:

import sys
print('test', file=sys.stderr)

glipR avatar Jun 20 '24 07:06 glipR