[IPython-dev] Manipulate stdin to IPythonQtConsoleApp
jed.ludlow at gmail.com
Sat Dec 22 02:19:20 EST 2012
> 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.
> 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.
> 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.
Sorry for the empty subject on my previous message above on this topic.
It's been that kind of day.
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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev