[IPython-dev] documenting new packages
Paul Ivanov
pivanov314 at gmail.com
Fri May 4 18:51:37 EDT 2012
Hey Jason,
On Fri, May 4, 2012 at 3:33 PM, Jason Grout <jason-sage at creativetrax.com> wrote:
> Also, I'm trying to somehow view every message that goes back and forth
> to clients. I can start the kernel with --debug and see the
> execute_request/reply messages. But how do I see the stdout messages,
> etc., going from the kernel back to the frontend?
In python, get a kernel manager looking on the right session (see [1] for
an example on how to do that), and then use:
msgs = km.sub_channel.get_msgs(). Now, iterate over the msgs to figure
out what type it is, and what contents it has. In vim-ipython, I do it
like this [2]
1. https://github.com/ivanov/vim-ipython/blob/master/ftplugin/python/ipy.vim#L63
2. https://github.com/ivanov/vim-ipython/blob/master/ftplugin/python/ipy.vim#L281
best,
--
Paul Ivanov
314 address only used for lists, off-list direct email at:
http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7
More information about the IPython-dev
mailing list