[IPython-dev] Implementing inline images in a kernel

Brian Granger ellisonbg at gmail.com
Wed Jan 29 03:26:05 EST 2014


The %julia magic works in an entirely blocking manner. All of the
widget stuff works through asynchronous messaging.

Here is a perfect illustration: what if you run the following in calico:

import time
for i in range(10):
    print i
    time.sleep(1)

It should print 1 integer with a 1 second delay in between. But if
Calico is talking to the Python backend through a blocking API, you
won't see anything for 10 seconds, and then you will see all of it.

On Wed, Jan 29, 2014 at 12:14 AM, Doug Blank <doug.blank at gmail.com> wrote:
> On Wed, Jan 29, 2014 at 3:10 AM, Brian Granger <ellisonbg at gmail.com> wrote:
>>
>> > That's interesting... IJulia using the Python VM... Then, this is very
>> > similar to Calico. Because all of the languages share memory, I was able
>> > to
>> > put a global object in there. I have now written display(), HTML(),
>> > Image(),
>> > and Audio(), and all is working very well. HTML, Image, and Audio all
>> > have a
>> > specially named method (similar to Python's __rep__) that when called,
>> > returns the dictionary of mime-types and strings, and display() sends
>> > the
>> > proper message. Demo to follow...
>>
>> That is absolutely similar to the Calico idea. But keep in mind,
>> running Julia through the %julia magic will *never* allow things like
>> the widgets or tab completion to work. Only the true native Julia
>> kernel will allow that.
>>
>
> Why can't the Julia-using-the-PythonVM magic use the widgets or tab
> completion? What is the limitation?
>
> -Doug
>
>>
>>
>> > -Doug
>> >
>> >>
>> >> Cheers,
>> >>
>> >> f
>> >>
>> >>
>> >> --
>> >> Fernando Perez (@fperez_org; http://fperez.org)
>> >> fperez.net-at-gmail: mailing lists only (I ignore this when swamped!)
>> >> fernando.perez-at-berkeley: contact me here for any direct mail
>> >>
>> >> _______________________________________________
>> >> 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
>> >
>>
>>
>>
>> --
>> Brian E. Granger
>> Cal Poly State University, San Luis Obispo
>> bgranger at calpoly.edu and ellisonbg at gmail.com
>> _______________________________________________
>> 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
>



-- 
Brian E. Granger
Cal Poly State University, San Luis Obispo
bgranger at calpoly.edu and ellisonbg at gmail.com



More information about the IPython-dev mailing list