[IPython-dev] testing ipython-zmq

Brian Granger ellisonbg@gmail....
Tue Jun 15 16:56:52 CDT 2010


Omar,

2010/6/15 Omar Andrés Zapata Mesa <andresete.chaos@gmail.com>:
> Thanks Brian.
> I am working in this moment in how to support magics,
> the idea is write a class MagicFronted
> that rewrite the magics funtions but some run locals commands and other will
> be send to kernel.

This is a great question.  The other issue is that some magic
functions that run on the kernel won't always work.  That is, some
magics will require a kernel that is running on the same host as the
frontend.  But, I think by default the stardard magics (using %) and
the command line (!) should all happen on the kernel.  The magics that
run on the frontend will be pretty limited right?  I guess just using
the %frontend syntax for those initially is a good idea.  I would just
start to play around with things.

Brian

> like InteractiveShell Inherited from Magic then InteractiveShellFrontend
> should inherit from MagicFrontend.
> some magics like command running with "!"  should run locally and not in the
> kernel you can try !kate or some graphic application and it will be executed
> in the kernel, stopping the others process.
> What you think about this?
> have you some idea to me?
>
>
> El 15 de junio de 2010 15:30, Brian Granger <ellisonbg@gmail.com> escribió:
>>
>> Omar,
>>
>> This looks very interesting and promising.  I will try to look at it
>> further and try it out soon.
>>
>> Cheers,
>>
>> Brian
>>
>> 2010/6/12 Omar Andrés Zapata Mesa <andresete.chaos@gmail.com>:
>> > hi all.
>> > some code of ipython-zmq is ready in github repo.
>> > you can see it this way.
>> > install firts pyzmq read howto here:
>> > http://www.zeromq.org/bindings:python
>> > get ipython-zmq experimental code
>> > $git clone github.com/omazapa/ipython.git
>> > like root
>> > #cd ipython
>> > #python setup.py build
>> > #python setup.py install
>> > like a user.
>> > you need open two terminals
>> > terminal One:
>> > $cd ipython/IPython/core/
>> > $python iplib_kernel.py
>> > terminal two:
>> > $cd ipython/IPython/core/
>> > $python iplib_frontend.py
>> > Features:
>> > -> zmq communication (using json)
>> > -> tab completion (support magics commands, alias and imported modules
>> > very
>> > fine)
>> > -> ipython prompt indentation
>> > -> colors (no in tracebacks yet)
>> > -> ipython output capture ie:
>> > In [1] : 2
>> > Out [3] : 2
>> > In [2] :_3
>> > Out [4] : 2
>> > -> some magics commands are working fine but we need to restructured to
>> > two
>> > processes
>> >
>> > I think we need write some magics to frontend and kernel
>> > I suggest for now:
>> > %kernel history
>> > %kernel reset (restore to empty kernel)
>> > %kernel quit (close the kernel)
>> > %kernel start (start a new kernel)
>> > %kernel save_status session_name  (save code and variables in a file
>> > asigned
>> > to session_file  )
>> > %kernel load_status session_name  (load code and variables fron
>> > session_name
>> > )
>> > %kernel restore  (restore last log, it if kernel fail and crash )
>> > %frontend quit
>> > %frontend colors colors_type
>> > Note: remember that it is just a experimental code.
>> > Best wishes.
>> > _______________________________________________
>> > IPython-dev mailing list
>> > IPython-dev@scipy.org
>> > http://mail.scipy.org/mailman/listinfo/ipython-dev
>> >
>> >
>>
>>
>>
>> --
>> Brian E. Granger, Ph.D.
>> Assistant Professor of Physics
>> Cal Poly State University, San Luis Obispo
>> bgranger@calpoly.edu
>> ellisonbg@gmail.com
>
>



-- 
Brian E. Granger, Ph.D.
Assistant Professor of Physics
Cal Poly State University, San Luis Obispo
bgranger@calpoly.edu
ellisonbg@gmail.com


More information about the IPython-dev mailing list