[IPython-dev] Simple Kernel Example

Matthias BUSSONNIER bussonniermatthias at gmail.com
Mon Jan 20 06:09:02 EST 2014


Le 17 janv. 2014 à 18:11, Doug Blank a écrit :

> Thanks for the information; I very much appreciate being explicit :)
> 
> If there is a page somewhere that I can edit to put this kind of
> helpful information, I'd be glad to help. There are no hints in the
> ipython_config.py'e 500 lines of comments that you shouldn't import
> anything, nor that the KernelManager is available through c. In fact,
> the word "kernel" does not appear in in that file.
> 

it should be in `ipython_notebook_config.py` ~ lines 383 

# The Popen Command to launch the kernel. Override this if you have a custom
# c.KernelManager.kernel_cmd = []


or in  $ ipython notebook --help-all 
KernelManager options
---------------------
...
--KernelManager.kernel_cmd=<List>
    Default: []
    The Popen Command to launch the kernel. Override this if you have a custom
…

Docs [1] should tell you :

	You can then configure class attributes like this:
	c.InteractiveShell.automagic = False

That are simple key/Value attributes set on c

It might not be explicit enough that `c` auto create attributes if needed, and might need to be clarified though.

Technically you can import stuff in your config.py files, but the goal of the config.py file is just to populate the `c` object with config files, 
importing and setting the values directly on class members is doable, but might not be what you want to do.

Also this means that most config file could be expressed as plain data, and in fact we do support json config files in 2.0

Haven't looked at your simple_kernel.py yet. 

-- 
M






[1] : http://ipython.org/ipython-doc/dev/config/intro.html#python-config-files




> -Doug
> 
>> --
>> M
>> 
>>> 
>>> -Doug
>>> _______________________________________________
>>> IPython-dev mailing list
>>> IPython-dev at scipy.org
>>> http://mail.scipy.org/mailman/listinfo/ipython-dev
>> 
>> _______________________________________________
>> IPython-dev mailing list
>> IPython-dev at scipy.org
>> http://mail.scipy.org/mailman/listinfo/ipython-dev
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140120/3ef1c5b8/attachment.html>


More information about the IPython-dev mailing list