[IPython-dev] Passing Arguments to Kernels

Matthias BUSSONNIER bussonniermatthias at gmail.com
Sun Dec 29 05:55:42 EST 2013


Le 29 déc. 2013 à 04:25, Andrew Gibiansky a écrit :

> Hello All,
> 
> I need to invoke `ipython console` and `ipython notebook` in such a way so that they pass some of their arguments down to the kernel that they eventually spawn. Is there a way to do this?

1) This is one of the things we are thinking about for future version of IPython Notebook, in particular we want with the notebook sever
    to be able to choose which kernel you would like to launch with a notebook. (to avoid spawning 1 server/kernel type)
    but this is challenging as javascript depend on kernel type.

> I see that in start_kernel in KernelManager the keyword arguments and connection_file are substituted into the values defined by KernelManager.kernel_cmd, but I am not sure how these keyword arguments get populated.

2) The only place where I see this get through is IPython/consoleapp.py:331
 IPythonConsoleApp seem to have `kernel_argv = List(Unicode)` but is not configurable, and use a 
  specific Python-only logic in some places (same file) 


So for now I would say the only way is to edit the kernel command in profile, but we are working on that, 
you are welcomed to join the discussion, (I'm not sure there is already a place for that).
-- 
M




More information about the IPython-dev mailing list