[IPython-dev] kernel wrapper example
takowl at gmail.com
Mon Jul 21 19:56:04 EDT 2014
On 21 July 2014 16:12, Ralf Hemmecke <hemmecke at gmail.com> wrote:
> As an example, your bash_kernel is OK, but that someone customizes
> his/her PS1 should be expected. Either you should clearly document the
> prerequisite of a certain prompt or tell the user that he/she should
> customize bash_kernel.py to the respective prompt.
There are flags for bash, --noprofile and --norc, that we could use to
disable these customisations and start more reliably. However, then you
also wouldn't get any customisations that you presumably want in the bash
kernel, like your aliases. I think that's probably the right thing to do,
and I've made an issue on Pexpect for it:
> 1) What happens to the % and %% magic mechanism? Would I be able to use
that also if the underlying kernel is bash?
No, they're implemented in the IPython kernel. Other kernels may choose to
add some similar interactive conveniences to their language, but the bash
kernel doesn't do anything like that.
> How would I go about starting a new notebook with my kernel?
The mechanisms to do that aren't finished yet, but if you want to be the
early bird catching the bugs, run my PR:
> 3) Of course, a notebook should know about which kernel it is written
for. Can I assume that the design is such that the notebook contains this
information or what is the overall picture?
Yes, this information is (in that PR) stored in the notebook metadata, and
it starts the correct kernel when you open a notebook if the relevant
metadata is there.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev