<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Quick question from the Spyder project. I'm working on some debugging related features, and I can't quite figure out the right way to communicate with IPython during debugging. <br>
</div>
<div><br></div><div>As background, Spyder can launch instances of IPythonQtConsoleApp in the IDE which make use of RichIPythonWidget. These get associated with an IPython kernel instance. As part of the IDE there are commands and toolbars to, say, execute the current editor contents in an IPython console. We are currently using the execute() method (inherited from IPython's HistoryConsoleWidget) to send these commands, and as best I can tell this is the method by which typical keyboard input is also sent. Anyway, this approach works fine for sending commands directly to conventional input prompts.</div>

<div><br></div><div>Difficulty arises when IPython is in debug mode. I'm currently experimenting with a simple debugging toolbar that will send the typical pdb commands (next, step, continue, etc.) down to the shell during a debug session. But using the execute() method as described above does not work while debugging. It seems like pdb commands must be taking a different route to get to the kernel, but I can't seem to figure out what it is. Any guidance you can provide would be most appreciated.</div>
<span class="HOEnZb"><font color="#888888">
<div><br></div></font></span></div></blockquote><div><br></div><div style>Sorry for the empty subject on my previous message above on this topic. It's been that kind of day.</div><div style><br></div><div style>After studying the problem further, I suspect what I'm looking for is a way to write directly to stdin. The execute() method works well to send Python code to the the interpreter itself. But it seems that once the debugger is active it's just looking for commands on stdin. Is there a mechanism to manipulate this?</div>
<div style><br></div><div style>Jed</div></div></div></div>