<div dir="ltr">Hi,<br>I want to start "python -i" from a subprocess and change its stdin stream, <br>so I get control over the commands I feed the interpreter.<br><br>I thought just changing sys.stdin to my custom file-like object would<br>
suffice, but this does not work. Neither does changing sys.__stdin__.<br><br>I guess the interpreter got a reference to the original stdin (the Pipe) before<br>I could change it, and is using that instead of sys.stdin.<br>
<br>Any thoughts how I can get the interpreter to use MY custom stream?<br><br>thanks,<br>Almar<br></div>