Currently the way piping command output to a shell command is implemented, a temporary file is used as an intermediate.
It would be better if a real pipe were used. However doing so in a manner which works consistently and reliably across all OSes and versions of Python may be non-trivial.