I am trying to shell out to a non-python subprocess and allow it to inherit the stdin and stdout from python. – i am using subprocess.Popen
This would probably work if I am calling from a console, but it definitely doesn’t work when I am using the python shell
(I am using IDLE by the way)
Is there any way to convince python to allow a non python subprocess to print it’s stdout to the python shell?
This works both from a script and from the interactive interpreter, but not from IDLE:
You can’t use the objects which IDLE assigns to
sys.stdinandsys.stdoutas arguments tosubprocess.Popen. These objects (the interfaces to the IDLE shell window) are file-like, but they’re not real file handles withfilenoattributes, and Unix-like operating systems require a fileno to be specified as the stdin or stdout for a subprocess. I cannot speak for Windows, but I imagine it has similar requirements.