<div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I did not understand completely what you want, and rereading previous posts I got even more confused...<br>

Could you provide a complete description of what you want to do?<br>
Is it a single process, or two separate processes? Running on the same machine or remotely? All python or there is another program involved?</blockquote><div><br>Hehe, sory for that...<br>I have two seperate processes on the same (windows) machine,<br>
which are both python. One is a wx GUI (a simple IDE), and the <br>other should function as a python interpreter. The latter is a <br>subprocess of the former, created using wx.Execute / wx.Process, <br>and there are three pipes between the two.<br>
<br>I wanted to start the interpreter process as <br>"python -i my_startup_script.py". <br>In the startup script I create a "connection thread" that reads the <br>original standard input (a pipe to the wx GUI), and will most of the<br>
time write the read-result to a pseudofile. <br><br>(In this setup, I can do special requests from the GUI, that the <br>"connection thread" will process, for example interrupt the main <br>thread or get introspection information.)<br>
<br>When python finishes processing my startup script, it goes into <br>"interpreter mode" because of the -i flag. What I want is that it <br>will use the pseudofile as it's stdin. The result should be a python<br>
interpreter with some extra control, plus I am now able to "hijack"<br>the tk mainloop, and this way have interactive behaviour in matplotlib.<br><br>I hope it is more clear now... I wonder if this can be done, but it's no <br>
big problem if it cannot; as I said before, I already have this setup <br>working with an interpreter inherited from code.InteractiveConsole.<br>Which means I do not use -i, but at the end of the startup script I <br>create an instance of that interpreter and call .interact(). <br>
<br>Thanks again,<br>Almar<br><br><br></div></div><br></div>