18.04 and earlier use wxPython 4.0.1 that doesn't have the new Id call. This wraps the id to use the earlier version if the newer one is not available Fixes https://gitlab.com/kicad/code/kicad/issues/8887
Keeps a copy of stdin as well, so that re-assigning this in the python window does't close the output Fixes https://gitlab.com/kicad/code/kicad/issues/8047