<div dir="ltr">Hi,<br><br>In wxpython, I made an interactive shell, which creates a remote python subprocess<br>to do the interpreting. Communication is done via a pipe. The idea is that the python<br>session is an actual process separate from the GUI, which has some advantages, <br>
like I can have multiple such shells in my application, and I can kill them without <br>worrying that my wx app will crash.<br><br>To do this I use the wx.Process class, which allows asynchronous communication with<br>the remote process.<br>
<br>This all works really, I will also launch wxpython apps. So I was quite happy, untill I tried <br>doing some plotting with matplotlib (in TkAgg backend). The problem is that the process <br>becomes unresponsive when I plot something (No prompt is written to the stdout/stderr). <br>
(more details below)<br><br>I don't know much about creating subprocess and how they are different from a normal <br>process. So can anyone offer some help as to what the problem might be?<br><br>Thanks in advance,<br>
Almar<br><br>To get to the details:<br>- When I start a process with command "python -u -i"<br> -- When interactive mode is off, the whole process becomes unresponsive when doing <br> pylab.show()<br> -- When interactive mode in on, on doing pylab.plot(), a figure appears, which I can <br>
zoom etc., but the process is now stuck, also after closing the figure<br><br>- When I start a process with command <br> "python -u -c 'import code;code.interact(readfunc=raw_input)'" (This is how Pype does it).<br>
-- When interactive mode is off, the figures show when doing pylab.show() and the process<br> behaves as normal after closing the figure(s). <br> -- When interactive mode in on, on doing pylab.plot(), a figure appears, but most of the time<br>
it is not drawn and emmediately unresponsive, just like the process itself.<br><br>I have also tried an asynchronous Popen recipe by Joshiah Carlson I found on <br>activestate. And I made my own process class using win32process.CreateProcess. <br>
Both alternatives to wx.Process resulted in the same sympoms.<br><br>Oh, and I run windows.<br><br></div>