Jun-28-2023, 04:56 AM
(This post was last modified: Jun-28-2023, 04:57 AM by Gribouillis.)
Why not just replacing
For example the IDLE IDE interposes in front of these streams to send the output to a tkinter text window instead of the standard files.
sys.stdout
and sys.stderr
by custom file objects that send the data to the other forms of output?For example the IDLE IDE interposes in front of these streams to send the output to a tkinter text window instead of the standard files.