react-py
react-py copied to clipboard
Feature: Pipe non-traceback stderr into the `stderr` state.
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)