Writing to the Jupyter console using os.write on macOS will write to cell output

Hi everyone!

To provide some extra information to our users we use os.write(1, ...) to write to the terminal window in which jupyter runs. This way the state of a 3rd party software run in the background can be inspected. However in more recent installations this also writes to the cell output in the notebook when macOS is used and clutters the output cells.

Is this documented somewhere or is it a bug? If this is a bug to which GitHub repo would this issue belong?
I am also looking for some pointers how this can be avoided or recommendations on how to display the extra information in another way (f.e. open a special terminal-like window).