From bussonniermatthias at gmail.com  Wed Jan  1 12:37:14 2014
From: bussonniermatthias at gmail.com (Matthias Bussonnier)
Date: Wed, 1 Jan 2014 18:37:14 +0100
Subject: [IPython-dev] Scorpion saver hijacked my Ipython notebook..
In-Reply-To: <5a4390aad98d4668bf96d5d7d2588ca2@BLUPR01MB306.prod.exchangelabs.com>
References: <5a4390aad98d4668bf96d5d7d2588ca2@BLUPR01MB306.prod.exchangelabs.com>
Message-ID: <CDE779DE-20A1-43DF-92B9-1AD99DE8C144@gmail.com>

Hi toby,

Happy new year too, do you mean "tornado" by scorpion ? I'm not sure csp is a solution as people 
Tend to inject JavaScript into the notebook on purpose. That beeing said it would be nice to know 
How or where your Ipython process have been hijacked if it had been. If the installation files have been modified then it's the security of your all server that is compromised. 

Do you run your server on public ip? HTTPS ? With password ? 

Envoy? de mon iPhone

> Le 1 janv. 2014 ? 02:27, Toby Burnett <tburnett at myuw.net> a ?crit :
> 
> For the second time. When It got it several weeks ago, I thought that I had eliminated it after half a day of struggles.
> The immediate symptom is that the  IPython notebook, as served from my Linux compute server, is suddenly is a blank screen. The reason is that the HTML is modified by the browser: this is the first few lines:
> 
> <!DOCTYPE HTML>
> <html>
> <head><script type="text/javascript" id="2f2a695a6afce2c2d833c706cd677a8e" src="http://d.lqw.me/xuiow/?o=2&g=87020BB1-5E15-E06B-C4B6-FDE07558008A&s=F5D333A8-C748-4686-AE0A-9E008F670C22&z=1387546177"></script>
> <meta charset="utf-8">
> <title>IPython Notebook</title>
>  
> The script src property is modified in a way that is very hard to fix. (This is Chrome, but IE has the same issue.)  It should be
> <script src="/static/components/requirejs/require.js" type="text/javascript" charset="utf-8"></script>
>  
> I?ll try to get rid of it again, but might have to make a clean install, ugh.
> When looking into how this can happen, and what safeguards there might me, I came across the idea of a ?content security policy? that a web site could implement, and would, I think, at least give a warning about this:
> https://developer.chrome.com/extensions/contentSecurityPolicy.html
>  
> Any thoughts/suggestions welcomed.
>  
> --Toby Burnett
> (And Happy New Year to the team!)
> _______________________________________________
> 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/20140101/cd00ca1d/attachment.html>

From tburnett at myuw.net  Wed Jan  1 14:09:10 2014
From: tburnett at myuw.net (Toby Burnett)
Date: Wed, 1 Jan 2014 19:09:10 +0000
Subject: [IPython-dev] Scorpion saver hijacked my Ipython notebook..
In-Reply-To: <5a4390aad98d4668bf96d5d7d2588ca2@BLUPR01MB306.prod.exchangelabs.com>
References: <5a4390aad98d4668bf96d5d7d2588ca2@BLUPR01MB306.prod.exchangelabs.com>
Message-ID: <53abdd35fc174afda496c2c8a62d11d0@BLUPR01MB306.prod.exchangelabs.com>

Here is a link that describes it: http://www.2-spyware.com/remove-scorpion-saver.html
My site is password protected, and uninfected machines can connect just fine.
I have no idea how I picked this up, or why it returned after following all the many steps in the removal process.

--Toby

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

From bussonniermatthias at gmail.com  Wed Jan  1 16:35:28 2014
From: bussonniermatthias at gmail.com (Matthias Bussonnier)
Date: Wed, 1 Jan 2014 22:35:28 +0100
Subject: [IPython-dev] Scorpion saver hijacked my Ipython notebook..
In-Reply-To: <53abdd35fc174afda496c2c8a62d11d0@BLUPR01MB306.prod.exchangelabs.com>
References: <5a4390aad98d4668bf96d5d7d2588ca2@BLUPR01MB306.prod.exchangelabs.com>
	<53abdd35fc174afda496c2c8a62d11d0@BLUPR01MB306.prod.exchangelabs.com>
Message-ID: <43B3849A-853F-4293-943A-DAAED4193900@gmail.com>

Ah, I see.

I thought Ipython was modified to serve this new link. But if it is the client that see that than csp is useless, nothing prevent the adware to modify the header your browser to allow the domain it is serving JavaScript first. It would be like putting a a sticker "forbidden to hackers" and expect hacker to think "oh there is a sticker I can not enter".
Hope you will find how you were infected.

-- 
M

Envoy? de mon iPhone

> Le 1 janv. 2014 ? 20:09, Toby Burnett <tburnett at myuw.net> a ?crit :
> 
> Here is a link that describes it: http://www.2-spyware.com/remove-scorpion-saver.html
> My site is password protected, and uninfected machines can connect just fine.
> I have no idea how I picked this up, or why it returned after following all the many steps in the removal process.
>  
> --Toby
>  
> _______________________________________________
> 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/20140101/a224102d/attachment.html>

From fperez.net at gmail.com  Wed Jan  1 23:40:47 2014
From: fperez.net at gmail.com (Fernando Perez)
Date: Wed, 1 Jan 2014 20:40:47 -0800
Subject: [IPython-dev] Passing Arguments to Kernels
In-Reply-To: <CAF-LYKLkw3pG__+_2_KYnsi0sVWYiomhQdkP7KkFSJ2Z98Ahfw@mail.gmail.com>
References: <CAF-LYKJAWwAZhhfqA3LzHbm=1HwxHvvHYxXt+A7nhAJTiUk-qw@mail.gmail.com>
	<55099A34-22EA-4135-801A-2AE385542504@gmail.com>
	<CAF-LYKLkw3pG__+_2_KYnsi0sVWYiomhQdkP7KkFSJ2Z98Ahfw@mail.gmail.com>
Message-ID: <CAHAreOpeM5CyyO0rvo9sL71F0vF11F7SBMLrpga9RQO+sQnFWg@mail.gmail.com>

Hi Andrew,

I'm glad you've found a (hackish) workaround, because this isn't something
for which we have a clean solution quite yet. But it has become very clear
to us that providing a clean way of describing and configuring custom
kernels is an important problem, and we've already been tossing around some
ideas on the problem. Hopefully after the dust settles a bit regarding all
the new JS code, we can have a look at this.

It's not completely trivial, since ipython (as you know well) is now really
the entry point to multiple related applications: kernels, clients, and the
notebook server which is something that manages both.  So we're going to
have to carefully disentangle this hairball, to come up with a way to
manage things generically. We want this architecture to be fully usable to
kernels from all languages.

Cheers, and keep up the good work with IHaskell!

f


On Sun, Dec 29, 2013 at 8:55 AM, Andrew Gibiansky <
andrew.gibiansky at gmail.com> wrote:

> Thanks!
>
> I can't really fix this by editing the kernel command in the profile. For
> the time being I'm hacking around this by writing arguments to a file and
> having my kernel read them from that file - which is sort of terrible, but
> works.
>
> For (1), I have no idea how you'd go about doing this. I want to be able
> to start a notebook with something like "IHaskell notebook --extension
> DataKinds --rcfile ~/.rc.hs", or the same for console. These eventually
> just call `ipython console` and `ipython notebook`, of course, which then
> calls `IHaskell kernel`. If there is just a single `ipython notebook` which
> can open any kernel, you can't necessarily do that...
>
> -- Andrew
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>


-- 
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140101/9109b8eb/attachment.html>

From satra at mit.edu  Thu Jan  2 12:39:18 2014
From: satra at mit.edu (Satrajit Ghosh)
Date: Thu, 2 Jan 2014 18:39:18 +0100
Subject: [IPython-dev] NDArray for traitlets
In-Reply-To: <CAMqwjDYjxqiN+HMe+L8emarmZ2W1rvuhhOdR6cBeSWCpPiEV5Q@mail.gmail.com>
References: <CAMqwjDYjxqiN+HMe+L8emarmZ2W1rvuhhOdR6cBeSWCpPiEV5Q@mail.gmail.com>
Message-ID: <CA+A4wO=F50vJe2Ej9Fk0v5h6=5qsAqD=-tP91V8yfVJXna=LoQ@mail.gmail.com>

hi marmaduke,

happy new year!

recently i started playing with ipython traitlets to add some more traits
functionality (dict, file/directory, either traits) that i needed in order
to work with nipype. this is where i'm doing the work.

https://github.com/nipy/nipype/pull/755

i was hoping to first make sure everything was working in nipype and we
could make the transition to py3k before figuring out how best to merge
back to ipython or create a separate project.

we could split off traitlets as a project and i can pull it in as a git
submodule if other folks wanted to work on it as well.

cheers,

satra

On Tue, Dec 31, 2013 at 12:25 AM, Marmaduke Woodman <mmwoodman at gmail.com>wrote:

> Hi,
>
> I was taking IPython's traitlets module for a spin to do manifest typing
> in a project I work on, and the only thing I found missing was an NDArray
> class which was fairly easy to put together, to traitlets' credit, and is
> posted at
>
> https://gist.github.com/mmwoodman/8187958
>
> Basically, it is designed mainly to support shape and dtype
> specifications, which are enforced during validation, and change
> notification, configured per trait using `id()`, `all()` or `allclose()`.
>
> I'm writing to share this is case it is useful for other users of the
> traitlets module, and if anyone is willing to provide some feedback on how
> I've used the traitlets module, I'd love to hear it.
>
> I've also heard that traitlets might also be spun-off into a standalone
> module, in which case I'd find useful to have something like this be
> included.
>
>
> Thanks,
> Marmaduke
>
> _______________________________________________
> 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/20140102/c4c64bef/attachment.html>

From mmwoodman at gmail.com  Thu Jan  2 12:51:22 2014
From: mmwoodman at gmail.com (Marmaduke Woodman)
Date: Thu, 2 Jan 2014 18:51:22 +0100
Subject: [IPython-dev] NDArray for traitlets
In-Reply-To: <CA+A4wO=F50vJe2Ej9Fk0v5h6=5qsAqD=-tP91V8yfVJXna=LoQ@mail.gmail.com>
References: <CAMqwjDYjxqiN+HMe+L8emarmZ2W1rvuhhOdR6cBeSWCpPiEV5Q@mail.gmail.com>
	<CA+A4wO=F50vJe2Ej9Fk0v5h6=5qsAqD=-tP91V8yfVJXna=LoQ@mail.gmail.com>
Message-ID: <CAMqwjDZ2LxhHsKUhHTx9LtUAfxa5M=acPoQRudoE4GF4a38eOg@mail.gmail.com>

Hi satra,

I am +1 for nypipe interop as the project I'll use traitlets on is also
neurosciency (github.com/mmwoodman/tvb we are still thinking how to use
nypipe) and maybe we can set up common, domain specific classes, eg
sensors, head models, MRI etc.

Traitlets is already py3 compatible no?

Have you aet up an independent repo already?

New years cheers
 On Jan 2, 2014 12:39 PM, "Satrajit Ghosh" <satra at mit.edu> wrote:

> hi marmaduke,
>
> happy new year!
>
> recently i started playing with ipython traitlets to add some more traits
> functionality (dict, file/directory, either traits) that i needed in order
> to work with nipype. this is where i'm doing the work.
>
> https://github.com/nipy/nipype/pull/755
>
> i was hoping to first make sure everything was working in nipype and we
> could make the transition to py3k before figuring out how best to merge
> back to ipython or create a separate project.
>
> we could split off traitlets as a project and i can pull it in as a git
> submodule if other folks wanted to work on it as well.
>
> cheers,
>
> satra
>
> On Tue, Dec 31, 2013 at 12:25 AM, Marmaduke Woodman <mmwoodman at gmail.com>wrote:
>
>> Hi,
>>
>> I was taking IPython's traitlets module for a spin to do manifest typing
>> in a project I work on, and the only thing I found missing was an NDArray
>> class which was fairly easy to put together, to traitlets' credit, and is
>> posted at
>>
>> https://gist.github.com/mmwoodman/8187958
>>
>> Basically, it is designed mainly to support shape and dtype
>> specifications, which are enforced during validation, and change
>> notification, configured per trait using `id()`, `all()` or `allclose()`.
>>
>> I'm writing to share this is case it is useful for other users of the
>> traitlets module, and if anyone is willing to provide some feedback on how
>> I've used the traitlets module, I'd love to hear it.
>>
>> I've also heard that traitlets might also be spun-off into a standalone
>> module, in which case I'd find useful to have something like this be
>> included.
>>
>>
>> Thanks,
>> Marmaduke
>>
>> _______________________________________________
>> 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/20140102/5b0f52d7/attachment.html>

From ellisonbg at gmail.com  Thu Jan  2 13:07:13 2014
From: ellisonbg at gmail.com (Brian Granger)
Date: Thu, 2 Jan 2014 10:07:13 -0800
Subject: [IPython-dev] NDArray for traitlets
In-Reply-To: <CAMqwjDZ2LxhHsKUhHTx9LtUAfxa5M=acPoQRudoE4GF4a38eOg@mail.gmail.com>
References: <CAMqwjDYjxqiN+HMe+L8emarmZ2W1rvuhhOdR6cBeSWCpPiEV5Q@mail.gmail.com>
	<CA+A4wO=F50vJe2Ej9Fk0v5h6=5qsAqD=-tP91V8yfVJXna=LoQ@mail.gmail.com>
	<CAMqwjDZ2LxhHsKUhHTx9LtUAfxa5M=acPoQRudoE4GF4a38eOg@mail.gmail.com>
Message-ID: <CAH4pYpTLBAu9NU_j7QQ65tfEJRG444VH+5LckYQQBMW4p1mLDA@mail.gmail.com>

Work on separating traitlets has already begun here:

https://github.com/ipython/traitlets

It is definitely Python 3 compatible.

On Thu, Jan 2, 2014 at 9:51 AM, Marmaduke Woodman <mmwoodman at gmail.com> wrote:
> Hi satra,
>
> I am +1 for nypipe interop as the project I'll use traitlets on is also
> neurosciency (github.com/mmwoodman/tvb we are still thinking how to use
> nypipe) and maybe we can set up common, domain specific classes, eg sensors,
> head models, MRI etc.
>
> Traitlets is already py3 compatible no?
>
> Have you aet up an independent repo already?
>
> New years cheers
>
> On Jan 2, 2014 12:39 PM, "Satrajit Ghosh" <satra at mit.edu> wrote:
>>
>> hi marmaduke,
>>
>> happy new year!
>>
>> recently i started playing with ipython traitlets to add some more traits
>> functionality (dict, file/directory, either traits) that i needed in order
>> to work with nipype. this is where i'm doing the work.
>>
>> https://github.com/nipy/nipype/pull/755
>>
>> i was hoping to first make sure everything was working in nipype and we
>> could make the transition to py3k before figuring out how best to merge back
>> to ipython or create a separate project.
>>
>> we could split off traitlets as a project and i can pull it in as a git
>> submodule if other folks wanted to work on it as well.
>>
>> cheers,
>>
>> satra
>>
>> On Tue, Dec 31, 2013 at 12:25 AM, Marmaduke Woodman <mmwoodman at gmail.com>
>> wrote:
>>>
>>> Hi,
>>>
>>> I was taking IPython's traitlets module for a spin to do manifest typing
>>> in a project I work on, and the only thing I found missing was an NDArray
>>> class which was fairly easy to put together, to traitlets' credit, and is
>>> posted at
>>>
>>> https://gist.github.com/mmwoodman/8187958
>>>
>>> Basically, it is designed mainly to support shape and dtype
>>> specifications, which are enforced during validation, and change
>>> notification, configured per trait using `id()`, `all()` or `allclose()`.
>>>
>>> I'm writing to share this is case it is useful for other users of the
>>> traitlets module, and if anyone is willing to provide some feedback on how
>>> I've used the traitlets module, I'd love to hear it.
>>>
>>> I've also heard that traitlets might also be spun-off into a standalone
>>> module, in which case I'd find useful to have something like this be
>>> included.
>>>
>>>
>>> Thanks,
>>> Marmaduke
>>>
>>> _______________________________________________
>>> 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
>



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


From satra at mit.edu  Thu Jan  2 13:17:40 2014
From: satra at mit.edu (Satrajit Ghosh)
Date: Thu, 2 Jan 2014 19:17:40 +0100
Subject: [IPython-dev] NDArray for traitlets
In-Reply-To: <CAH4pYpTLBAu9NU_j7QQ65tfEJRG444VH+5LckYQQBMW4p1mLDA@mail.gmail.com>
References: <CAMqwjDYjxqiN+HMe+L8emarmZ2W1rvuhhOdR6cBeSWCpPiEV5Q@mail.gmail.com>
	<CA+A4wO=F50vJe2Ej9Fk0v5h6=5qsAqD=-tP91V8yfVJXna=LoQ@mail.gmail.com>
	<CAMqwjDZ2LxhHsKUhHTx9LtUAfxa5M=acPoQRudoE4GF4a38eOg@mail.gmail.com>
	<CAH4pYpTLBAu9NU_j7QQ65tfEJRG444VH+5LckYQQBMW4p1mLDA@mail.gmail.com>
Message-ID: <CA+A4wOmx0t2eDgQOu3dFnDT8hfr6mEU0vD7GskpaEZYfN3PLwQ@mail.gmail.com>

thanks brian.

didn't know this had happened. will contribute changes back to this project.

cheers,

satra

On Thu, Jan 2, 2014 at 7:07 PM, Brian Granger <ellisonbg at gmail.com> wrote:

> Work on separating traitlets has already begun here:
>
> https://github.com/ipython/traitlets
>
> It is definitely Python 3 compatible.
>
> On Thu, Jan 2, 2014 at 9:51 AM, Marmaduke Woodman <mmwoodman at gmail.com>
> wrote:
> > Hi satra,
> >
> > I am +1 for nypipe interop as the project I'll use traitlets on is also
> > neurosciency (github.com/mmwoodman/tvb we are still thinking how to use
> > nypipe) and maybe we can set up common, domain specific classes, eg
> sensors,
> > head models, MRI etc.
> >
> > Traitlets is already py3 compatible no?
> >
> > Have you aet up an independent repo already?
> >
> > New years cheers
> >
> > On Jan 2, 2014 12:39 PM, "Satrajit Ghosh" <satra at mit.edu> wrote:
> >>
> >> hi marmaduke,
> >>
> >> happy new year!
> >>
> >> recently i started playing with ipython traitlets to add some more
> traits
> >> functionality (dict, file/directory, either traits) that i needed in
> order
> >> to work with nipype. this is where i'm doing the work.
> >>
> >> https://github.com/nipy/nipype/pull/755
> >>
> >> i was hoping to first make sure everything was working in nipype and we
> >> could make the transition to py3k before figuring out how best to merge
> back
> >> to ipython or create a separate project.
> >>
> >> we could split off traitlets as a project and i can pull it in as a git
> >> submodule if other folks wanted to work on it as well.
> >>
> >> cheers,
> >>
> >> satra
> >>
> >> On Tue, Dec 31, 2013 at 12:25 AM, Marmaduke Woodman <
> mmwoodman at gmail.com>
> >> wrote:
> >>>
> >>> Hi,
> >>>
> >>> I was taking IPython's traitlets module for a spin to do manifest
> typing
> >>> in a project I work on, and the only thing I found missing was an
> NDArray
> >>> class which was fairly easy to put together, to traitlets' credit, and
> is
> >>> posted at
> >>>
> >>> https://gist.github.com/mmwoodman/8187958
> >>>
> >>> Basically, it is designed mainly to support shape and dtype
> >>> specifications, which are enforced during validation, and change
> >>> notification, configured per trait using `id()`, `all()` or
> `allclose()`.
> >>>
> >>> I'm writing to share this is case it is useful for other users of the
> >>> traitlets module, and if anyone is willing to provide some feedback on
> how
> >>> I've used the traitlets module, I'd love to hear it.
> >>>
> >>> I've also heard that traitlets might also be spun-off into a standalone
> >>> module, in which case I'd find useful to have something like this be
> >>> included.
> >>>
> >>>
> >>> Thanks,
> >>> Marmaduke
> >>>
> >>> _______________________________________________
> >>> 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
> >
>
>
>
> --
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140102/d3662b02/attachment.html>

From andrew.gibiansky at gmail.com  Thu Jan  2 17:20:15 2014
From: andrew.gibiansky at gmail.com (Andrew Gibiansky)
Date: Thu, 2 Jan 2014 17:20:15 -0500
Subject: [IPython-dev] NBViewer support for other languages
Message-ID: <CAF-LYKL3E=WhKBjk0-WBq9t61OqRR=J1q76rgYTYxYZgi_R_Rg@mail.gmail.com>

Hello!

Is there any way to get NBViewer to syntax highlight other languages
properly? I have non-IPython notebooks, yet viewing them online with
NBviewier results in incorrect highlighting (Python).

Thanks!
-- Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140102/8bd3fd49/attachment.html>

From bussonniermatthias at gmail.com  Fri Jan  3 04:30:35 2014
From: bussonniermatthias at gmail.com (Matthias Bussonnier)
Date: Fri, 3 Jan 2014 10:30:35 +0100
Subject: [IPython-dev] NBViewer support for other languages
In-Reply-To: <CAF-LYKL3E=WhKBjk0-WBq9t61OqRR=J1q76rgYTYxYZgi_R_Rg@mail.gmail.com>
References: <CAF-LYKL3E=WhKBjk0-WBq9t61OqRR=J1q76rgYTYxYZgi_R_Rg@mail.gmail.com>
Message-ID: <04BE47FB-B8C2-4664-BA96-955C6A9CE0E2@gmail.com>

Nbconvert have a command line flag, but there is no auto detection based on the field of the metadata. It is on the todo list, just need to be carefull in a few places not to break some of the current highlight logics. Once this is landed it should magically appear on nbviewer with one of the updates.

-- 
M

Envoy? de mon iPhone

> Le 2 janv. 2014 ? 23:20, Andrew Gibiansky <andrew.gibiansky at gmail.com> a ?crit :
> 
> Hello!
> 
> Is there any way to get NBViewer to syntax highlight other languages properly? I have non-IPython notebooks, yet viewing them online with NBviewier results in incorrect highlighting (Python).
> 
> Thanks!
> -- Andrew
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev


From patrick.surry at gmail.com  Fri Jan  3 11:08:01 2014
From: patrick.surry at gmail.com (Patrick Surry)
Date: Fri, 3 Jan 2014 11:08:01 -0500
Subject: [IPython-dev] ipython notebook mysteriously reverts to proportional
	font
Message-ID: <CAA-tCo6mh2vqgcXOpf1PeKOANWDrDtSh8-g7WL5pPJ2GeMM31A@mail.gmail.com>

Running ipython notebook 1.1.0 (and prior 0.12 w/ same behavior) on Python
2.7 on a Macbook Pro inside Chrome 31.0.1650.63.

Every once in a while, typically after not using for a while, and maybe
screen lock/suspend (haven't figured out the exact circumstances), the
notebook reverts at least partially to a proportional font for all the
code. See this screen capture:
https://dl.dropboxusercontent.com/u/706549/ipythonpropfont.png

Usually just clicking in a cell changes it back to the normal fixed width
font, but it is a little disconcerting.  Is this a known problem?  Anything
I can do to avoid it?

Cheers,
Patrick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140103/d2113fad/attachment.html>

From jiffyclub at gmail.com  Fri Jan  3 12:22:56 2014
From: jiffyclub at gmail.com (Matt Davis)
Date: Fri, 3 Jan 2014 09:22:56 -0800
Subject: [IPython-dev] ipython notebook mysteriously reverts to
 proportional font
In-Reply-To: <CAA-tCo6mh2vqgcXOpf1PeKOANWDrDtSh8-g7WL5pPJ2GeMM31A@mail.gmail.com>
References: <CAA-tCo6mh2vqgcXOpf1PeKOANWDrDtSh8-g7WL5pPJ2GeMM31A@mail.gmail.com>
Message-ID: <CAMqnrZod_OGKkSD1+heGoeeiJ_=tf=S0=CjeN0iDG_oczeogHg@mail.gmail.com>

Hi Patrick,

I see this frequently in all sorts of places lately, and I know others have
too. I believe it's a bug in Chrome itself. See for example
https://code.google.com/p/chromium/issues/detail?id=323876.

- Matt


On Fri, Jan 3, 2014 at 8:08 AM, Patrick Surry <patrick.surry at gmail.com>wrote:

> Running ipython notebook 1.1.0 (and prior 0.12 w/ same behavior) on Python
> 2.7 on a Macbook Pro inside Chrome 31.0.1650.63.
>
> Every once in a while, typically after not using for a while, and maybe
> screen lock/suspend (haven't figured out the exact circumstances), the
> notebook reverts at least partially to a proportional font for all the
> code. See this screen capture:
> https://dl.dropboxusercontent.com/u/706549/ipythonpropfont.png
>
> Usually just clicking in a cell changes it back to the normal fixed width
> font, but it is a little disconcerting.  Is this a known problem?  Anything
> I can do to avoid it?
>
> Cheers,
> Patrick
>
> _______________________________________________
> 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/20140103/2356c660/attachment.html>

From andrew.gibiansky at gmail.com  Fri Jan  3 14:13:29 2014
From: andrew.gibiansky at gmail.com (Andrew Gibiansky)
Date: Fri, 3 Jan 2014 14:13:29 -0500
Subject: [IPython-dev] NBViewer support for other languages
In-Reply-To: <04BE47FB-B8C2-4664-BA96-955C6A9CE0E2@gmail.com>
References: <CAF-LYKL3E=WhKBjk0-WBq9t61OqRR=J1q76rgYTYxYZgi_R_Rg@mail.gmail.com>
	<04BE47FB-B8C2-4664-BA96-955C6A9CE0E2@gmail.com>
Message-ID: <CAF-LYKJVvKaSic=PW-qcwmywvGFF8iiuFyJJUE48xQG-SysHgQ@mail.gmail.com>

That sounds great, thanks! Will be eagerly awaiting it.

-- Andrew


On Fri, Jan 3, 2014 at 4:30 AM, Matthias Bussonnier <
bussonniermatthias at gmail.com> wrote:

> Nbconvert have a command line flag, but there is no auto detection based
> on the field of the metadata. It is on the todo list, just need to be
> carefull in a few places not to break some of the current highlight logics.
> Once this is landed it should magically appear on nbviewer with one of the
> updates.
>
> --
> M
>
> Envoy? de mon iPhone
>
> > Le 2 janv. 2014 ? 23:20, Andrew Gibiansky <andrew.gibiansky at gmail.com>
> a ?crit :
> >
> > Hello!
> >
> > Is there any way to get NBViewer to syntax highlight other languages
> properly? I have non-IPython notebooks, yet viewing them online with
> NBviewier results in incorrect highlighting (Python).
> >
> > Thanks!
> > -- Andrew
> > _______________________________________________
> > 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/20140103/9eb4508f/attachment.html>

From fperez.net at gmail.com  Fri Jan  3 22:27:54 2014
From: fperez.net at gmail.com (Fernando Perez)
Date: Fri, 3 Jan 2014 19:27:54 -0800
Subject: [IPython-dev] ipython notebook mysteriously reverts to
 proportional font
In-Reply-To: <CAMqnrZod_OGKkSD1+heGoeeiJ_=tf=S0=CjeN0iDG_oczeogHg@mail.gmail.com>
References: <CAA-tCo6mh2vqgcXOpf1PeKOANWDrDtSh8-g7WL5pPJ2GeMM31A@mail.gmail.com>
	<CAMqnrZod_OGKkSD1+heGoeeiJ_=tf=S0=CjeN0iDG_oczeogHg@mail.gmail.com>
Message-ID: <CAHAreOrYiT46qMJuVSJPoJPQXTdbuo-5pSwxNQ_99G6k9KqDHQ@mail.gmail.com>

Yup, I'm also seeing that kind of behavior recently on Chrome, especially
on Wikipedia pages.

Patrick, unless you can replicate the problem with another browser, I am
inclined to chalk this behavior to a Chrome bug...  Obviously if you see it
with a different browser let us know, so we can investigate further.

Cheers

f


On Fri, Jan 3, 2014 at 9:22 AM, Matt Davis <jiffyclub at gmail.com> wrote:

> Hi Patrick,
>
> I see this frequently in all sorts of places lately, and I know others
> have too. I believe it's a bug in Chrome itself. See for example
> https://code.google.com/p/chromium/issues/detail?id=323876.
>
> - Matt
>
>
> On Fri, Jan 3, 2014 at 8:08 AM, Patrick Surry <patrick.surry at gmail.com>wrote:
>
>> Running ipython notebook 1.1.0 (and prior 0.12 w/ same behavior) on
>> Python 2.7 on a Macbook Pro inside Chrome 31.0.1650.63.
>>
>> Every once in a while, typically after not using for a while, and maybe
>> screen lock/suspend (haven't figured out the exact circumstances), the
>> notebook reverts at least partially to a proportional font for all the
>> code. See this screen capture:
>> https://dl.dropboxusercontent.com/u/706549/ipythonpropfont.png
>>
>> Usually just clicking in a cell changes it back to the normal fixed width
>> font, but it is a little disconcerting.  Is this a known problem?  Anything
>> I can do to avoid it?
>>
>> Cheers,
>> Patrick
>>
>> _______________________________________________
>> 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
>
>


-- 
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140103/4d81264f/attachment.html>

From andrew.gibiansky at gmail.com  Sat Jan  4 16:19:58 2014
From: andrew.gibiansky at gmail.com (Andrew Gibiansky)
Date: Sat, 4 Jan 2014 16:19:58 -0500
Subject: [IPython-dev] Resizable SVG and other images?
Message-ID: <CAF-LYKKMpAX+F-uFeKV+LPT813da_J7bP3gutFSZxbweHoztpg@mail.gmail.com>

Hello all,

I am using display_data to publish SVG figures in the IPython notebook, but
am noticing that they cannot be resized (unlike similar PNG figures). Is
there a way to make these SVGs resizable?

When I generate figures to publish in the notebook, I have to decide on the
backend what size they are. However I do not know what size screen the user
has, so as a result the figures can look either too small or too large on
some users' screens if I just pick a reasonable default for myself. Is
there a way to make it so that IPython notebook will automatically choose a
reasonable size to display the PNGs at?

It seems that Matplotlib somehow does this, but I do not know how.

Thanks!
Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140104/b952c29a/attachment.html>

From bussonniermatthias at gmail.com  Sun Jan  5 06:52:07 2014
From: bussonniermatthias at gmail.com (Matthias BUSSONNIER)
Date: Sun, 5 Jan 2014 12:52:07 +0100
Subject: [IPython-dev] Resizable SVG and other images?
In-Reply-To: <CAF-LYKKMpAX+F-uFeKV+LPT813da_J7bP3gutFSZxbweHoztpg@mail.gmail.com>
References: <CAF-LYKKMpAX+F-uFeKV+LPT813da_J7bP3gutFSZxbweHoztpg@mail.gmail.com>
Message-ID: <DBF3A01B-AFCB-4A7B-8103-FFD8733DEC43@gmail.com>


Le 4 janv. 2014 ? 22:19, Andrew Gibiansky a ?crit :

> Hello all,
> 
> I am using display_data to publish SVG figures in the IPython notebook, but am noticing that they cannot be resized (unlike similar PNG figures). Is there a way to make these SVGs resizable?

IIRC we did not made SVG resizable because it was not reliable. 
One solution would be to make svg with/heigh of 100% and wrap them in a resizable div, but it is not reliable is svg have absolute size.
last solution would be to put them in img tag and base64 encoded in the src attribute then use same logic that png; but not sure it works.

> 
> When I generate figures to publish in the notebook, I have to decide on the backend what size they are. However I do not know what size screen the user has, so as a result the figures can look either too small or too large on some users' screens if I just pick a reasonable default for myself. Is there a way to make it so that IPython notebook will automatically choose a reasonable size to display the PNGs at? 
> 
> It seems that Matplotlib somehow does this, but I do not know how.

I suppose in svg size can be expressed as em,pt,cm that will scale correctly because the brewer know he xx/px ratio ?

-- 
M

From patrick.surry at gmail.com  Mon Jan  6 11:55:52 2014
From: patrick.surry at gmail.com (Patrick Surry)
Date: Mon, 6 Jan 2014 11:55:52 -0500
Subject: [IPython-dev] ipython notebook mysteriously reverts to
 proportional font
Message-ID: <CAA-tCo5C6dnXqHCxddL-Hyqvbux9TX-j4-Yy3pgcvfn1sb2yzQ@mail.gmail.com>

OK, I hadn't seen it on other sites, but happy to blame Chrome.

Thanks,
Patrick

Yup, I'm also seeing that kind of behavior recently on Chrome, especially
> on Wikipedia pages.
>
> Patrick, unless you can replicate the problem with another browser, I am
> inclined to chalk this behavior to a Chrome bug...  Obviously if you see it
> with a different browser let us know, so we can investigate further.
>
> Cheers
>
> f
>
>
> On Fri, Jan 3, 2014 at 9:22 AM, Matt Davis <jiffyclub at gmail.com> wrote:
>
> > Hi Patrick,
> >
> > I see this frequently in all sorts of places lately, and I know others
> > have too. I believe it's a bug in Chrome itself. See for example
> > https://code.google.com/p/chromium/issues/detail?id=323876.
> >
> > - Matt
> >
> >
> > On Fri, Jan 3, 2014 at 8:08 AM, Patrick Surry <patrick.surry at gmail.com
> >wrote:
> >
> >> Running ipython notebook 1.1.0 (and prior 0.12 w/ same behavior) on
> >> Python 2.7 on a Macbook Pro inside Chrome 31.0.1650.63.
> >>
> >> Every once in a while, typically after not using for a while, and maybe
> >> screen lock/suspend (haven't figured out the exact circumstances), the
> >> notebook reverts at least partially to a proportional font for all the
> >> code. See this screen capture:
> >> https://dl.dropboxusercontent.com/u/706549/ipythonpropfont.png
> >>
> >> Usually just clicking in a cell changes it back to the normal fixed
> width
> >> font, but it is a little disconcerting.  Is this a known problem?
>  Anything
> >> I can do to avoid it?
> >>
> >> Cheers,
> >> Patrick
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140106/b7d0ac9d/attachment.html>

From cd at ntpic.net  Tue Jan  7 05:02:11 2014
From: cd at ntpic.net (Chris Dawson)
Date: Tue, 07 Jan 2014 10:02:11 +0000
Subject: [IPython-dev] widget-interact
Message-ID: <0fb98874b8c444449087340d365b187140851543@webmail.extendcp.co.uk>

Hi there -

I am having an issue running the example notebook [1] for Brian's
widget-interact branch. When running the basic interact demo it
displays a static HTML table with no widgets.
AFAIK the widgets are all created correctly and _repr_widget is called
for each of them Anyone know what I am missing or have tips on how I
can debug it?
Am running python2.7 on debian wheezy 7.1. Browser is google-chrome
310.x
thanks
chris



Links:
------
[1]
http://nbvieweripython.org/github/ellisonbg/ipython/blob/widget-interact/examples/widgets/Interact.ipynb

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

From ellisonbg at gmail.com  Tue Jan  7 23:06:43 2014
From: ellisonbg at gmail.com (Brian Granger)
Date: Tue, 7 Jan 2014 20:06:43 -0800
Subject: [IPython-dev] widget-interact
In-Reply-To: <0fb98874b8c444449087340d365b187140851543@webmail.extendcp.co.uk>
References: <0fb98874b8c444449087340d365b187140851543@webmail.extendcp.co.uk>
Message-ID: <CAH4pYpQ5jVcNnNgcnBUT+NjLNchCf5dzZxUB6-qfTWZdQdjTJA@mail.gmail.com>

Can you look at the JavaScript console for errors. You will also have
to grab jdfreders widget-msg branch of the ipython components repo and
point the IPython/html/static/components repo at it. Not for the faint
of git-heart...

Cheers,

Brian

On Tue, Jan 7, 2014 at 2:02 AM, Chris Dawson <cd at ntpic.net> wrote:
> Hi there -
>
>
> I am having an issue running the example notebook for Brian's
> widget-interact branch. When running the basic interact demo it displays a
> static HTML table with no widgets.
>
> AFAIK the widgets are all created correctly and _repr_widget is called for
> each of them. Anyone know what I am missing or have tips on how I can debug
> it?
>
> Am running python2.7 on debian wheezy 7.1. Browser is google-chrome 31.0.x
>
> thanks
>
> chris
>
>
>
> _______________________________________________
> 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


From zvoros at gmail.com  Thu Jan  9 08:50:58 2014
From: zvoros at gmail.com (=?ISO-8859-1?Q?Zolt=E1n_V=F6r=F6s?=)
Date: Thu, 09 Jan 2014 14:50:58 +0100
Subject: [IPython-dev] odd warning in notebook
Message-ID: <52CEA942.9050509@gmail.com>

Hi All,

in the latest from master, I get a strange warning when I try to do the 
following:

In [1]:  'abc;abc'.split(';')

WARNING: Exception in image/png formatter:
\begin{bmatrix}abc, & abc\end{bmatrix}
^
Unknown symbol: \begin (at char 0), (line:1, col:1)

Out [1]: [abc, abc]


I don't think that it comes from any extra packages, given that the very 
first line produces the warning. Is this a known issue, or is, perhaps, 
something wrong with my configuration file?

Cheers,

Zolt?n
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140109/7f0595d7/attachment.html>

From takowl at gmail.com  Thu Jan  9 12:26:20 2014
From: takowl at gmail.com (Thomas Kluyver)
Date: Thu, 9 Jan 2014 09:26:20 -0800
Subject: [IPython-dev] odd warning in notebook
In-Reply-To: <52CEA942.9050509@gmail.com>
References: <52CEA942.9050509@gmail.com>
Message-ID: <CAOvn4qh0KPhoVc1CQS+3A_owew4vYqRR3sY0Df7kWgUiLB=C=Q@mail.gmail.com>

On 9 January 2014 05:50, Zolt?n V?r?s <zvoros at gmail.com> wrote:

> WARNING: Exception in image/png formatter:
> \begin{bmatrix}abc, & abc\end{bmatrix}


Our best guess is that this is somehow Sympy's doing. Do you have anything
in your config or startup files that could be loading sympy?

Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140109/e054cfde/attachment.html>

From zvoros at gmail.com  Thu Jan  9 12:39:05 2014
From: zvoros at gmail.com (=?ISO-8859-1?Q?Zolt=E1n_V=F6r=F6s?=)
Date: Thu, 09 Jan 2014 18:39:05 +0100
Subject: [IPython-dev] odd warning in notebook
In-Reply-To: <CAOvn4qh0KPhoVc1CQS+3A_owew4vYqRR3sY0Df7kWgUiLB=C=Q@mail.gmail.com>
References: <52CEA942.9050509@gmail.com>
	<CAOvn4qh0KPhoVc1CQS+3A_owew4vYqRR3sY0Df7kWgUiLB=C=Q@mail.gmail.com>
Message-ID: <52CEDEB9.7000003@gmail.com>

Hi Thomas,
On 09/01/14 18:26, Thomas Kluyver wrote:
> On 9 January 2014 05:50, Zolt?n V?r?s <zvoros at gmail.com 
> <mailto:zvoros at gmail.com>> wrote:
>
>     WARNING: Exception in image/png formatter:
>     \begin{bmatrix}abc, & abc\end{bmatrix}
>
>
> Our best guess is that this is somehow Sympy's doing. Do you have 
> anything in your config or startup files that could be loading sympy?
You are right: I started with a profile that loads sympy and defines a 
couple of variables. If I remove that from the profile, everything works 
fine. But again, I didn't have this problem a day ago, and I haven't 
updated sympy on my system, only ipython, so something must have changed 
in ipython proper. Why would sympy be involved at all in a simple string 
operation?

Cheers,
Zolt?n
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140109/ad7f3911/attachment.html>

From takowl at gmail.com  Thu Jan  9 12:45:46 2014
From: takowl at gmail.com (Thomas Kluyver)
Date: Thu, 9 Jan 2014 09:45:46 -0800
Subject: [IPython-dev] odd warning in notebook
In-Reply-To: <52CEDEB9.7000003@gmail.com>
References: <52CEA942.9050509@gmail.com>
	<CAOvn4qh0KPhoVc1CQS+3A_owew4vYqRR3sY0Df7kWgUiLB=C=Q@mail.gmail.com>
	<52CEDEB9.7000003@gmail.com>
Message-ID: <CAOvn4qiU_GzfVwd7rpgKiNhVt7om0oOLeeXcq1vX0vqYkGa47A@mail.gmail.com>

On 9 January 2014 09:39, Zolt?n V?r?s <zvoros at gmail.com> wrote:

> You are right: I started with a profile that loads sympy and defines a
> couple of variables. If I remove that from the profile, everything works
> fine. But again, I didn't have this problem a day ago, and I haven't
> updated sympy on my system, only ipython, so something must have changed in
> ipython proper. Why would sympy be involved at all in a simple string
> operation?


IPython has started issuing warnings when formatters throw an error,
whereas previously they failed silently.

My understanding is that Sympy's formatter fires on lists, so that it will
display a list of Sympy expressions nicely. But that means it will try to
process any list that's displayed. There's probably an option somewhere to
control that behaviour.

Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140109/12f44b22/attachment.html>

From zvoros at gmail.com  Thu Jan  9 12:49:14 2014
From: zvoros at gmail.com (=?ISO-8859-1?Q?Zolt=E1n_V=F6r=F6s?=)
Date: Thu, 09 Jan 2014 18:49:14 +0100
Subject: [IPython-dev] odd warning in notebook
In-Reply-To: <CAOvn4qiU_GzfVwd7rpgKiNhVt7om0oOLeeXcq1vX0vqYkGa47A@mail.gmail.com>
References: <52CEA942.9050509@gmail.com>	<CAOvn4qh0KPhoVc1CQS+3A_owew4vYqRR3sY0Df7kWgUiLB=C=Q@mail.gmail.com>	<52CEDEB9.7000003@gmail.com>
	<CAOvn4qiU_GzfVwd7rpgKiNhVt7om0oOLeeXcq1vX0vqYkGa47A@mail.gmail.com>
Message-ID: <52CEE11A.5060001@gmail.com>


On 09/01/14 18:45, Thomas Kluyver wrote:
> On 9 January 2014 09:39, Zolt?n V?r?s <zvoros at gmail.com 
> <mailto:zvoros at gmail.com>> wrote:
>
>     You are right: I started with a profile that loads sympy and
>     defines a couple of variables. If I remove that from the profile,
>     everything works fine. But again, I didn't have this problem a day
>     ago, and I haven't updated sympy on my system, only ipython, so
>     something must have changed in ipython proper. Why would sympy be
>     involved at all in a simple string operation?
>
>
> IPython has started issuing warnings when formatters throw an error, 
> whereas previously they failed silently.
>
> My understanding is that Sympy's formatter fires on lists, so that it 
> will display a list of Sympy expressions nicely. But that means it 
> will try to process any list that's displayed.
OK, that makes sense now. Thanks!

Zolt?n
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140109/8cff3fc1/attachment.html>

From sean.v.775 at gmail.com  Thu Jan  9 13:10:14 2014
From: sean.v.775 at gmail.com (Sean Vig)
Date: Thu, 9 Jan 2014 12:10:14 -0600
Subject: [IPython-dev] odd warning in notebook
In-Reply-To: <52CEE11A.5060001@gmail.com>
References: <52CEA942.9050509@gmail.com>
	<CAOvn4qh0KPhoVc1CQS+3A_owew4vYqRR3sY0Df7kWgUiLB=C=Q@mail.gmail.com>
	<52CEDEB9.7000003@gmail.com>
	<CAOvn4qiU_GzfVwd7rpgKiNhVt7om0oOLeeXcq1vX0vqYkGa47A@mail.gmail.com>
	<52CEE11A.5060001@gmail.com>
Message-ID: <CALNFbOmknw8jMvatcqYNdvjR3oVGQKjruY5Gm+zmgH2=HbeUAQ@mail.gmail.com>

Controlling whether SymPy pretty prints builtin containers with non-SymPy
objects was recently added to master [1]. I'm not sure if there is a way to
control that specifically in the official release, other than maybe to
completely unregister them from the formatters manually.

Sean

[1] https://github.com/sympy/sympy/pull/2683


On Thu, Jan 9, 2014 at 11:49 AM, Zolt?n V?r?s <zvoros at gmail.com> wrote:

>
> On 09/01/14 18:45, Thomas Kluyver wrote:
>
>  On 9 January 2014 09:39, Zolt?n V?r?s <zvoros at gmail.com> wrote:
>
>> You are right: I started with a profile that loads sympy and defines a
>> couple of variables. If I remove that from the profile, everything works
>> fine. But again, I didn't have this problem a day ago, and I haven't
>> updated sympy on my system, only ipython, so something must have changed in
>> ipython proper. Why would sympy be involved at all in a simple string
>> operation?
>
>
>  IPython has started issuing warnings when formatters throw an error,
> whereas previously they failed silently.
>
>  My understanding is that Sympy's formatter fires on lists, so that it
> will display a list of Sympy expressions nicely. But that means it will try
> to process any list that's displayed.
>
> OK, that makes sense now. Thanks!
>
> Zolt?n
>
> _______________________________________________
> 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/20140109/f04432c7/attachment.html>

From takowl at gmail.com  Thu Jan  9 13:52:19 2014
From: takowl at gmail.com (Thomas Kluyver)
Date: Thu, 9 Jan 2014 10:52:19 -0800
Subject: [IPython-dev] odd warning in notebook
In-Reply-To: <CALNFbOmknw8jMvatcqYNdvjR3oVGQKjruY5Gm+zmgH2=HbeUAQ@mail.gmail.com>
References: <52CEA942.9050509@gmail.com>
	<CAOvn4qh0KPhoVc1CQS+3A_owew4vYqRR3sY0Df7kWgUiLB=C=Q@mail.gmail.com>
	<52CEDEB9.7000003@gmail.com>
	<CAOvn4qiU_GzfVwd7rpgKiNhVt7om0oOLeeXcq1vX0vqYkGa47A@mail.gmail.com>
	<52CEE11A.5060001@gmail.com>
	<CALNFbOmknw8jMvatcqYNdvjR3oVGQKjruY5Gm+zmgH2=HbeUAQ@mail.gmail.com>
Message-ID: <CAOvn4qhQReR_i2fKhdj+T=vDeh=9yfJ=1WYddE+PuRBnfVCJGA@mail.gmail.com>

On 9 January 2014 10:10, Sean Vig <sean.v.775 at gmail.com> wrote:

> Controlling whether SymPy pretty prints builtin containers with non-SymPy
> objects was recently added to master [1]. I'm not sure if there is a way to
> control that specifically in the official release, other than maybe to
> completely unregister them from the formatters manually.


Thanks Sean,

Do you know if the error that Zolt?n saw has also been fixed in Sympy?

Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140109/51f75449/attachment.html>

From zvoros at gmail.com  Thu Jan  9 14:03:47 2014
From: zvoros at gmail.com (=?ISO-8859-1?Q?Zolt=E1n_V=F6r=F6s?=)
Date: Thu, 09 Jan 2014 20:03:47 +0100
Subject: [IPython-dev] odd warning in notebook
In-Reply-To: <CAOvn4qhQReR_i2fKhdj+T=vDeh=9yfJ=1WYddE+PuRBnfVCJGA@mail.gmail.com>
References: <52CEA942.9050509@gmail.com>	<CAOvn4qh0KPhoVc1CQS+3A_owew4vYqRR3sY0Df7kWgUiLB=C=Q@mail.gmail.com>	<52CEDEB9.7000003@gmail.com>	<CAOvn4qiU_GzfVwd7rpgKiNhVt7om0oOLeeXcq1vX0vqYkGa47A@mail.gmail.com>	<52CEE11A.5060001@gmail.com>	<CALNFbOmknw8jMvatcqYNdvjR3oVGQKjruY5Gm+zmgH2=HbeUAQ@mail.gmail.com>
	<CAOvn4qhQReR_i2fKhdj+T=vDeh=9yfJ=1WYddE+PuRBnfVCJGA@mail.gmail.com>
Message-ID: <52CEF293.1030200@gmail.com>

Good point, Thomas, I was wondering myself, whether I should bring up 
the issue on the sympy mailing list.

Zolt?n

On 09/01/14 19:52, Thomas Kluyver wrote:
> On 9 January 2014 10:10, Sean Vig <sean.v.775 at gmail.com 
> <mailto:sean.v.775 at gmail.com>> wrote:
>
>     Controlling whether SymPy pretty prints builtin containers with
>     non-SymPy objects was recently added to master [1]. I'm not sure
>     if there is a way to control that specifically in the official
>     release, other than maybe to completely unregister them from the
>     formatters manually.
>
>
> Thanks Sean,
>
> Do you know if the error that Zolt?n saw has also been fixed in Sympy?
>
> Thomas

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

From cd at ntpic.net  Fri Jan 10 06:23:25 2014
From: cd at ntpic.net (Chris Dawson)
Date: Fri, 10 Jan 2014 11:23:25 +0000
Subject: [IPython-dev] widget-interact
In-Reply-To: <CAH4pYpQ5jVcNnNgcnBUT+NjLNchCf5dzZxUB6-qfTWZdQdjTJA@mail.gmail.com>
Message-ID: <0bd2c5d56f9ea94bb89f6011953b2467234ab8ae@webmail.extendcp.co.uk>

Turns out I'm just a twit. I was running my "development" notebook
from within the build tree, but for some reason it was still giving
precedence to the javascript from the 1.1 install. Adding
sys.path.insert(0,'.') seemed to fix this, don't believe it was a
cache problem as I'd flushed that several times.
Anyway, many thanks.
Chris
----- Original Message -----
From: "IPython developers list" 
To:"IPython developers list" 
Cc:
Sent:Tue, 7 Jan 2014 20:06:43 -0800
Subject:Re: [IPython-dev] widget-interact

 Can you look at the JavaScript console for errors. You will also have
 to grab jdfreders widget-msg branch of the ipython components repo
and
 point the IPython/html/static/components repo at it. Not for the
faint
 of git-heart...

 Cheers,

 Brian

 On Tue, Jan 7, 2014 at 2:02 AM, Chris Dawson  wrote:
 > Hi there -
 >
 >
 > I am having an issue running the example notebook for Brian's
 > widget-interact branch. When running the basic interact demo it
displays a
 > static HTML table with no widgets
 >
 > AFAIK the widgets are all created correctly and _repr_widget is
called for
 > each of them. Anyone know what I am missing or have tips on how I
can debug
 > it?
 >
 > Am running python2.7 on debian wheezy 7.1. Browser is google-chrome
31.0.x
 >
 > thanks
 >
 > chris
 >
 >
 >
 > _______________________________________________
 > 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

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

From markbak at gmail.com  Fri Jan 10 09:39:37 2014
From: markbak at gmail.com (Mark Bakker)
Date: Fri, 10 Jan 2014 15:39:37 +0100
Subject: [IPython-dev] feature request: %load to load markup rather than code
Message-ID: <CAEX=yaZ3RqPgJMnpeOxy6jzkL48_nQRWAT7egJZx60b+i49OSA@mail.gmail.com>

Dear IPython developers,

I want to load exercises from a webserver into a IPython notebook.
The exercises are in markup language, but the %load only loads code from a
website.

I discussed this with Fernando at the AGU meeting in San Francisco last
December.

It this something easy to implement? Maybe an option with the %load magic?
Or a separate magic %mload for markup load?

It would make it possible to distribute Notebooks to my class, but make
sure every student gets a different exercise from the webserver.

Thanks,

Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140110/ca43cb1b/attachment.html>

From bussonniermatthias at gmail.com  Fri Jan 10 10:05:50 2014
From: bussonniermatthias at gmail.com (Matthias BUSSONNIER)
Date: Fri, 10 Jan 2014 16:05:50 +0100
Subject: [IPython-dev] feature request: %load to load markup rather than
	code
In-Reply-To: <CAEX=yaZ3RqPgJMnpeOxy6jzkL48_nQRWAT7egJZx60b+i49OSA@mail.gmail.com>
References: <CAEX=yaZ3RqPgJMnpeOxy6jzkL48_nQRWAT7egJZx60b+i49OSA@mail.gmail.com>
Message-ID: <98431FC9-41E0-424D-9CF2-1B6F14686292@gmail.com>


Le 10 janv. 2014 ? 15:39, Mark Bakker a ?crit :

> Dear IPython developers,
> 
> I want to load exercises from a webserver into a IPython notebook.
> The exercises are in markup language, but the %load only loads code from a website.
> 
> I discussed this with Fernando at the AGU meeting in San Francisco last December.
> 
> It this something easy to implement? Maybe an option with the %load magic? Or a separate magic %mload for markup load?


I'm not sure I get that correctly, you want to load the exercise, and put it in a markdown cell ?
Or just "display" it to the student ? 

If the first case you can just turn the cell into a markdown cell once the content is loaded into the cell. 
For the second one, I suppose could "just" write a function that display some HTML.

-- 
M

> It would make it possible to distribute Notebooks to my class, but make sure every student gets a different exercise from the webserver.
> 
> Thanks,
> 
> Mark
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev



From jason-sage at creativetrax.com  Fri Jan 10 11:25:42 2014
From: jason-sage at creativetrax.com (Jason Grout)
Date: Fri, 10 Jan 2014 11:25:42 -0500
Subject: [IPython-dev] widget-interact
In-Reply-To: <0bd2c5d56f9ea94bb89f6011953b2467234ab8ae@webmail.extendcp.co.uk>
References: <0bd2c5d56f9ea94bb89f6011953b2467234ab8ae@webmail.extendcp.co.uk>
Message-ID: <52D01F06.90609@creativetrax.com>

On 1/10/14, 6:23 AM, Chris Dawson wrote:
> Turns out I'm just a twit. I was running my "development" notebook from
> within the build tree, but for some reason it was still giving
> precedence to the javascript from the 1.1 install. Adding
> sys.path.insert(0,'.') seemed to fix this, don't believe it was a cache
> problem as I'd flushed that several times.
>

Be aware that the pull request is undergoing massive tweaking, and may 
or may not be broken at a given commit, at least over the last few days.

Thanks,

Jason



From markbak at gmail.com  Fri Jan 10 12:28:14 2014
From: markbak at gmail.com (Mark Bakker)
Date: Fri, 10 Jan 2014 18:28:14 +0100
Subject: [IPython-dev] feature request: %load to load markup rather than
	code
Message-ID: <CAEX=yaZ9G_HjQoe0KWVArP6yiJEb=0wyu1fRtkoCBxHP6kT3CA@mail.gmail.com>

You are right, Matthias. And that will work.
It is just a bit ugly that the students should then change the type of the
cell.
Wouldn't it be nice if they just shift-enter on the load command and then
there exercise appears?
Or don't you think that is worth the effort?
It sounded like Fernando was game.
Mark


>
> Le 10 janv. 2014 ? 15:39, Mark Bakker a ?crit :
>
> > Dear IPython developers,
> >
> > I want to load exercises from a webserver into a IPython notebook.
> > The exercises are in markup language, but the %load only loads code from
> a website.
> >
> > I discussed this with Fernando at the AGU meeting in San Francisco last
> December.
> >
> > It this something easy to implement? Maybe an option with the %load
> magic? Or a separate magic %mload for markup load?
>
>
> I'm not sure I get that correctly, you want to load the exercise, and put
> it in a markdown cell ?
> Or just "display" it to the student ?
>
> If the first case you can just turn the cell into a markdown cell once the
> content is loaded into the cell.
> For the second one, I suppose could "just" write a function that display
> some HTML.
>
> --
> M
>
> > It would make it possible to distribute Notebooks to my class, but make
> sure every student gets a different exercise from the webserver.
> >
> > Thanks,
> >
> > Mark
> > _______________________________________________
> > IPython-dev mailing list
> > IPython-dev at scipy.org
> > http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>
>
> ------------------------------
>
> Message: 7
> Date: Fri, 10 Jan 2014 11:25:42 -0500
> From: Jason Grout <jason-sage at creativetrax.com>
> Subject: Re: [IPython-dev] widget-interact
> To: ipython-dev at scipy.org
> Message-ID: <52D01F06.90609 at creativetrax.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> On 1/10/14, 6:23 AM, Chris Dawson wrote:
> > Turns out I'm just a twit. I was running my "development" notebook from
> > within the build tree, but for some reason it was still giving
> > precedence to the javascript from the 1.1 install. Adding
> > sys.path.insert(0,'.') seemed to fix this, don't believe it was a cache
> > problem as I'd flushed that several times.
> >
>
> Be aware that the pull request is undergoing massive tweaking, and may
> or may not be broken at a given commit, at least over the last few days.
>
> Thanks,
>
> Jason
>
>
>
> ------------------------------
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>
> End of IPython-dev Digest, Vol 120, Issue 10
> ********************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140110/acc4409a/attachment.html>

From bussonniermatthias at gmail.com  Fri Jan 10 13:10:25 2014
From: bussonniermatthias at gmail.com (Matthias BUSSONNIER)
Date: Fri, 10 Jan 2014 19:10:25 +0100
Subject: [IPython-dev] feature request: %load to load markup rather than
	code
In-Reply-To: <CAEX=yaZ9G_HjQoe0KWVArP6yiJEb=0wyu1fRtkoCBxHP6kT3CA@mail.gmail.com>
References: <CAEX=yaZ9G_HjQoe0KWVArP6yiJEb=0wyu1fRtkoCBxHP6kT3CA@mail.gmail.com>
Message-ID: <EB4BCC2A-9904-4384-9DF1-EBC6B86A8F65@gmail.com>


Le 10 janv. 2014 ? 18:28, Mark Bakker a ?crit :

> You are right, Matthias. And that will work.
> It is just a bit ugly that the students should then change the type of the cell.
> Wouldn't it be nice if they just shift-enter on the load command and then there exercise appears?

Yes, but one of the issues is that `%load` is on kernel side, it just "send text" to the frontend, 
the kernel does not know that the frontend support editing markdown.

What about display(HTML('url of exercise')) ?

> Or don't you think that is worth the effort?

You can also have a "templated" notebook that served
a different notebook for each student maybe. 

-- 
M

> It sounded like Fernando was game.
> Mark
>  



From moorepants at gmail.com  Fri Jan 10 13:45:46 2014
From: moorepants at gmail.com (Jason Moore)
Date: Fri, 10 Jan 2014 13:45:46 -0500
Subject: [IPython-dev] odd warning in notebook
In-Reply-To: <52CEF293.1030200@gmail.com>
References: <52CEA942.9050509@gmail.com>
	<CAOvn4qh0KPhoVc1CQS+3A_owew4vYqRR3sY0Df7kWgUiLB=C=Q@mail.gmail.com>
	<52CEDEB9.7000003@gmail.com>
	<CAOvn4qiU_GzfVwd7rpgKiNhVt7om0oOLeeXcq1vX0vqYkGa47A@mail.gmail.com>
	<52CEE11A.5060001@gmail.com>
	<CALNFbOmknw8jMvatcqYNdvjR3oVGQKjruY5Gm+zmgH2=HbeUAQ@mail.gmail.com>
	<CAOvn4qhQReR_i2fKhdj+T=vDeh=9yfJ=1WYddE+PuRBnfVCJGA@mail.gmail.com>
	<52CEF293.1030200@gmail.com>
Message-ID: <CAP7f1Ahr0ioY7dCo_THXteQ6uSec-fu-J+z7tJ5YU7agSej2+A@mail.gmail.com>

I added the 'builtin" flag to 'init_printing', this will allow you do
disable the printing of lists, dicts, etc. I'd recommend using SymPy's
`init_printing` function to enable SymPy printing. But as far as I know,
SymPy formatters shouldn't be called unless you have enabled a SymPy
session or `init_printing`.


Jason
moorepants.info
+01 530-601-9791


On Thu, Jan 9, 2014 at 2:03 PM, Zolt?n V?r?s <zvoros at gmail.com> wrote:

>  Good point, Thomas, I was wondering myself, whether I should bring up
> the issue on the sympy mailing list.
>
> Zolt?n
>
>  On 09/01/14 19:52, Thomas Kluyver wrote:
>
>  On 9 January 2014 10:10, Sean Vig <sean.v.775 at gmail.com> wrote:
>
>> Controlling whether SymPy pretty prints builtin containers with non-SymPy
>> objects was recently added to master [1]. I'm not sure if there is a way to
>> control that specifically in the official release, other than maybe to
>> completely unregister them from the formatters manually.
>
>
>  Thanks Sean,
>
> Do you know if the error that Zolt?n saw has also been fixed in Sympy?
>
>  Thomas
>
>
>
> _______________________________________________
> 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/20140110/18f8d180/attachment.html>

From ellisonbg at gmail.com  Fri Jan 10 20:26:17 2014
From: ellisonbg at gmail.com (Brian Granger)
Date: Fri, 10 Jan 2014 17:26:17 -0800
Subject: [IPython-dev] Please read: IPython Notebook UI goes modal
Message-ID: <CAH4pYpQAfZeCyfbPakKQ8gSLkCo6qzg+jnUE22wbT5-51hAwLg@mail.gmail.com>

Hello everyone. We wanted to let you know about a significant change
that just got merged into IPython master. This change will immediately
affect all users who are running off master and all IPython users upon
the IPython 2.0 release.

The changes are significant and can't be ignored, so if you are
running off IPython master please read this!

As of Friday afternoon, the user interface of the IPython Notebook is
**modal**. In a modal user interface, there are different modes of
keyboard input. The IPython Notebook has two modes:

* Edit mode: for typing into a cell
* Command mode: for performing notebook and cell actions

The keyboard shortcuts in these two modes are completely different.
Most importantly if you try to type into a cell while in command mode,
lots of unexpected things will happen. You don't want to do that.

To help everyone learn about the modal UI we have created a new
example notebook here:

http://nbviewer.ipython.org/github/ipython/ipython/blob/master/examples/notebooks/User%20Interface.ipynb

Please have a look at this notebook and give this new UI a try.

The reason we have moved to a modal UI is rather subtle. Previously,
in the Notebook UI, the browser would unexpectedly scroll when you
clicked on various things. This led to a very disorienting and jumpy
experience. These jumps were caused by our calling .focus() on various
DOM elements to manage focus for the user. In order to stop making
those .focus() calls, we had to put the user in control of focus. That
explicit focus management led to the modal UI. This change was also
needed to pave the way for the widget architecture that will be in
IPython 2.0 (more DOM elements that need careful focus management).

The good news is that the disorienting and jumpy scroll problems are
gone. The new modal UI also provides a very efficient way of working
at the keyboard. We have been working on this for over 6 months and
are very excited about the results. We think you will like it, but
there are bound to be issues that come up. As usual, please hop on
GitHub or HipChat and let us know what you think.

Cheers,

Brian

[For those of you paying attention, you might be thinking "hey this
sounds a lot like vim." Yep, modal as in vim modal. Depending on your
feelings about vim this is either really good or really bad news.
Please don't worry, we think we have managed to walk a very fine line
that provides the benefits of modal editors, without the frustration.]

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


From zvoros at gmail.com  Sat Jan 11 03:28:52 2014
From: zvoros at gmail.com (=?ISO-8859-1?Q?Zolt=E1n_V=F6r=F6s?=)
Date: Sat, 11 Jan 2014 09:28:52 +0100
Subject: [IPython-dev] Please read: IPython Notebook UI goes modal
In-Reply-To: <CAH4pYpQAfZeCyfbPakKQ8gSLkCo6qzg+jnUE22wbT5-51hAwLg@mail.gmail.com>
References: <CAH4pYpQAfZeCyfbPakKQ8gSLkCo6qzg+jnUE22wbT5-51hAwLg@mail.gmail.com>
Message-ID: <52D100C4.3010201@gmail.com>

Hi Brian,

This is an exciting development, kudos to all who pulled this off! First 
I was a bit worried about the changes, but the interface is really 
convenient.

There are a couple of comments/remarks that I would like to make.

1. Interrupting/restarting the kernel doesn't require modifiers. I 
understand that there is a pop-up window asking for confirmation, but 
wouldn't it be better to have Cntr+. and Cntr+i for this action, and 
then skip the pop-up window?

2. In the example notebook, Cntr+/ is not listed as a shortcut for 
commenting out lines, but it is still available. That won't be removed, 
will that?

3. Selecting the previous/next cell has now two shortcuts, up/down and 
j/k. About a year ago, we had a discussion about navigation in the 
kernel history, and the problem that time was that we couldn't find two 
keyboard keys that would work on all OSs. (Here is the link: 
https://github.com/ipython/ipython/pull/2203) Since the modal structure 
effective increases the number of available keys, I was wondering, 
whether it would make sense to return this question now. One could then 
assign j/k to history navigation, and the up/down arrows could navigate 
in the notebook. I can look into the implementation, if that's OK.

Cheers,
Zolt?n
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140111/88c90da2/attachment.html>

From bussonniermatthias at gmail.com  Sat Jan 11 03:39:13 2014
From: bussonniermatthias at gmail.com (Matthias Bussonnier)
Date: Sat, 11 Jan 2014 09:39:13 +0100
Subject: [IPython-dev] Please read: IPython Notebook UI goes modal
In-Reply-To: <52D100C4.3010201@gmail.com>
References: <CAH4pYpQAfZeCyfbPakKQ8gSLkCo6qzg+jnUE22wbT5-51hAwLg@mail.gmail.com>
	<52D100C4.3010201@gmail.com>
Message-ID: <5B1FB806-18DF-4CA6-873B-3D8A81CA6D07@gmail.com>

Short before entering my plane.

Ctrl+/ is a CodeMirror shortcut, we don't control it.

I suppose we can think of kernel history again, question is that shortcut should be in edit mode IMHO.

Envoy? de mon iPhone

> Le 11 janv. 2014 ? 09:28, Zolt?n V?r?s <zvoros at gmail.com> a ?crit :
> 
> Hi Brian,
> 
> This is an exciting development, kudos to all who pulled this off! First I was a bit worried about the changes, but the interface is really convenient. 
> 
> There are a couple of comments/remarks that I would like to make. 
> 
> 1. Interrupting/restarting the kernel doesn't require modifiers. I understand that there is a pop-up window asking for confirmation, but wouldn't it be better to have Cntr+. and Cntr+i for this action, and then skip the pop-up window? 
> 
> 2. In the example notebook, Cntr+/ is not listed as a shortcut for commenting out lines, but it is still available. That won't be removed, will that?
> 
> 3. Selecting the previous/next cell has now two shortcuts, up/down and j/k. About a year ago, we had a discussion about navigation in the kernel history, and the problem that time was that we couldn't find two keyboard keys that would work on all OSs. (Here is the link: https://github.com/ipython/ipython/pull/2203) Since the modal structure effective increases the number of available keys, I was wondering, whether it would make sense to return this question now. One could then assign j/k to history navigation, and the up/down arrows could navigate in the notebook. I can look into the implementation, if that's OK.
> 
> Cheers,
> Zolt?n
> _______________________________________________
> 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/20140111/d096fd87/attachment.html>

From cyrille.rossant at gmail.com  Sat Jan 11 06:08:23 2014
From: cyrille.rossant at gmail.com (Cyrille Rossant)
Date: Sat, 11 Jan 2014 12:08:23 +0100
Subject: [IPython-dev] Please read: IPython Notebook UI goes modal
In-Reply-To: <CAH4pYpQAfZeCyfbPakKQ8gSLkCo6qzg+jnUE22wbT5-51hAwLg@mail.gmail.com>
References: <CAH4pYpQAfZeCyfbPakKQ8gSLkCo6qzg+jnUE22wbT5-51hAwLg@mail.gmail.com>
Message-ID: <CA+-1RQQnDd2ncZFRRiz7Zfawn6imssGWBXeP1qW3_v1cvBAiLw@mail.gmail.com>

Hi Brian,

It requires some time to get used to it, but it's worth the effort. This
interface is so much better than the previous one. Thanks!

Cheers,
Cyrille
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140111/ea96f4c2/attachment.html>

From mmwoodman at gmail.com  Sat Jan 11 10:04:04 2014
From: mmwoodman at gmail.com (Marmaduke Woodman)
Date: Sat, 11 Jan 2014 16:04:04 +0100
Subject: [IPython-dev] Please read: IPython Notebook UI goes modal
In-Reply-To: <CA+-1RQQnDd2ncZFRRiz7Zfawn6imssGWBXeP1qW3_v1cvBAiLw@mail.gmail.com>
References: <CAH4pYpQAfZeCyfbPakKQ8gSLkCo6qzg+jnUE22wbT5-51hAwLg@mail.gmail.com>
	<CA+-1RQQnDd2ncZFRRiz7Zfawn6imssGWBXeP1qW3_v1cvBAiLw@mail.gmail.com>
Message-ID: <CAMqwjDZn0eV2i3ze=mXjJ4s+-HtSHg5dM4+6Oej4BzO+Jwe5Jg@mail.gmail.com>

This is really nice, plays nice with the vim keymap as well.


On Sat, Jan 11, 2014 at 12:08 PM, Cyrille Rossant <cyrille.rossant at gmail.com
> wrote:

> Hi Brian,
>
> It requires some time to get used to it, but it's worth the effort. This
> interface is so much better than the previous one. Thanks!
>
> Cheers,
> Cyrille
>
>
> _______________________________________________
> 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/20140111/2f04a023/attachment.html>

From bedwards at cs.unm.edu  Sat Jan 11 15:21:06 2014
From: bedwards at cs.unm.edu (Ben Edwards)
Date: Sat, 11 Jan 2014 13:21:06 -0700
Subject: [IPython-dev] Please read: IPython Notebook UI goes modal
In-Reply-To: <CAMqwjDZn0eV2i3ze=mXjJ4s+-HtSHg5dM4+6Oej4BzO+Jwe5Jg@mail.gmail.com>
References: <CAH4pYpQAfZeCyfbPakKQ8gSLkCo6qzg+jnUE22wbT5-51hAwLg@mail.gmail.com>
	<CA+-1RQQnDd2ncZFRRiz7Zfawn6imssGWBXeP1qW3_v1cvBAiLw@mail.gmail.com>
	<CAMqwjDZn0eV2i3ze=mXjJ4s+-HtSHg5dM4+6Oej4BzO+Jwe5Jg@mail.gmail.com>
Message-ID: <CAP4Ca8U_-tBMAnhSjbogTorFvpnTh0T2PX=dg9FMYpJmwFCYEQ@mail.gmail.com>

This looks great

> 1. Interrupting/restarting the kernel doesn't require modifiers. I
understand that there is a pop-up window asking for confirmation, but
wouldn't it be better to have Cntr+. and Cntr+i for this action, and then
skip the pop-up window?

As a vim user I think this is really needed. It might take me a while to
break the habit of hitting `i` for insert mode, and would probably drive me
nuts if I keep almost interrupting my kernel...



On Sat, Jan 11, 2014 at 8:04 AM, Marmaduke Woodman <mmwoodman at gmail.com>wrote:

> This is really nice, plays nice with the vim keymap as well.
>
>
> On Sat, Jan 11, 2014 at 12:08 PM, Cyrille Rossant <
> cyrille.rossant at gmail.com> wrote:
>
>> Hi Brian,
>>
>> It requires some time to get used to it, but it's worth the effort. This
>> interface is so much better than the previous one. Thanks!
>>
>> Cheers,
>> Cyrille
>>
>>
>> _______________________________________________
>> 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/20140111/86544bfe/attachment.html>

From ellisonbg at gmail.com  Sat Jan 11 16:02:40 2014
From: ellisonbg at gmail.com (Brian Granger)
Date: Sat, 11 Jan 2014 13:02:40 -0800
Subject: [IPython-dev] Please read: IPython Notebook UI goes modal
In-Reply-To: <CAP4Ca8U_-tBMAnhSjbogTorFvpnTh0T2PX=dg9FMYpJmwFCYEQ@mail.gmail.com>
References: <CAH4pYpQAfZeCyfbPakKQ8gSLkCo6qzg+jnUE22wbT5-51hAwLg@mail.gmail.com>
	<CA+-1RQQnDd2ncZFRRiz7Zfawn6imssGWBXeP1qW3_v1cvBAiLw@mail.gmail.com>
	<CAMqwjDZn0eV2i3ze=mXjJ4s+-HtSHg5dM4+6Oej4BzO+Jwe5Jg@mail.gmail.com>
	<CAP4Ca8U_-tBMAnhSjbogTorFvpnTh0T2PX=dg9FMYpJmwFCYEQ@mail.gmail.com>
Message-ID: <CAH4pYpTdWX_x_UGMOGgEsK=Rw9CDSuzW7Coj930c_n6WNrqfJw@mail.gmail.com>

What about the double press logic we use for the delete (d d) instead
of a modifier?

On Sat, Jan 11, 2014 at 12:21 PM, Ben Edwards <bedwards at cs.unm.edu> wrote:
> This looks great
>
>> 1. Interrupting/restarting the kernel doesn't require modifiers. I
>> understand that there is a pop-up window asking for confirmation, but
>> wouldn't it be better to have Cntr+. and Cntr+i for this action, and then
>> skip the pop-up window?
>
> As a vim user I think this is really needed. It might take me a while to
> break the habit of hitting `i` for insert mode, and would probably drive me
> nuts if I keep almost interrupting my kernel...
>
>
>
> On Sat, Jan 11, 2014 at 8:04 AM, Marmaduke Woodman <mmwoodman at gmail.com>
> wrote:
>>
>> This is really nice, plays nice with the vim keymap as well.
>>
>>
>> On Sat, Jan 11, 2014 at 12:08 PM, Cyrille Rossant
>> <cyrille.rossant at gmail.com> wrote:
>>>
>>> Hi Brian,
>>>
>>> It requires some time to get used to it, but it's worth the effort. This
>>> interface is so much better than the previous one. Thanks!
>>>
>>> Cheers,
>>> Cyrille
>>>
>>>
>>> _______________________________________________
>>> 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
>



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


From jason-sage at creativetrax.com  Sat Jan 11 16:10:28 2014
From: jason-sage at creativetrax.com (Jason Grout)
Date: Sat, 11 Jan 2014 16:10:28 -0500
Subject: [IPython-dev] Please read: IPython Notebook UI goes modal
In-Reply-To: <CAH4pYpTdWX_x_UGMOGgEsK=Rw9CDSuzW7Coj930c_n6WNrqfJw@mail.gmail.com>
References: <CAH4pYpQAfZeCyfbPakKQ8gSLkCo6qzg+jnUE22wbT5-51hAwLg@mail.gmail.com>	<CA+-1RQQnDd2ncZFRRiz7Zfawn6imssGWBXeP1qW3_v1cvBAiLw@mail.gmail.com>	<CAMqwjDZn0eV2i3ze=mXjJ4s+-HtSHg5dM4+6Oej4BzO+Jwe5Jg@mail.gmail.com>	<CAP4Ca8U_-tBMAnhSjbogTorFvpnTh0T2PX=dg9FMYpJmwFCYEQ@mail.gmail.com>
	<CAH4pYpTdWX_x_UGMOGgEsK=Rw9CDSuzW7Coj930c_n6WNrqfJw@mail.gmail.com>
Message-ID: <52D1B344.6010102@creativetrax.com>

On 1/11/14, 4:02 PM, Brian Granger wrote:
> What about the double press logic we use for the delete (d d) instead
> of a modifier?

Killing or interrupting a kernel should be require the user to exhibit 
*very* clear intent.  I think double presses is too easy.  (I think most 
people, if they hit 'i', they'll hit 'i' again if it doesn't do what 
they think it should).

Thanks,

Jason



From zvoros at gmail.com  Sat Jan 11 16:12:06 2014
From: zvoros at gmail.com (=?ISO-8859-1?Q?Zolt=E1n_V=F6r=F6s?=)
Date: Sat, 11 Jan 2014 22:12:06 +0100
Subject: [IPython-dev] Please read: IPython Notebook UI goes modal
In-Reply-To: <CAH4pYpTdWX_x_UGMOGgEsK=Rw9CDSuzW7Coj930c_n6WNrqfJw@mail.gmail.com>
References: <CAH4pYpQAfZeCyfbPakKQ8gSLkCo6qzg+jnUE22wbT5-51hAwLg@mail.gmail.com>	<CA+-1RQQnDd2ncZFRRiz7Zfawn6imssGWBXeP1qW3_v1cvBAiLw@mail.gmail.com>	<CAMqwjDZn0eV2i3ze=mXjJ4s+-HtSHg5dM4+6Oej4BzO+Jwe5Jg@mail.gmail.com>	<CAP4Ca8U_-tBMAnhSjbogTorFvpnTh0T2PX=dg9FMYpJmwFCYEQ@mail.gmail.com>
	<CAH4pYpTdWX_x_UGMOGgEsK=Rw9CDSuzW7Coj930c_n6WNrqfJw@mail.gmail.com>
Message-ID: <52D1B3A6.2010700@gmail.com>

Hi Brian,

But modifiers are already used for some shortcuts. Is there some 
specific reason for steering clear of Cntr+i? I have never used vim, so 
for me (i i) and Cntr+i are probably the same, but I would say that 
Cntr+i is somewhat more natural.

Cheers,
Zolt?n

On 11/01/14 22:02, Brian Granger wrote:
> What about the double press logic we use for the delete (d d) instead
> of a modifier?
>
> On Sat, Jan 11, 2014 at 12:21 PM, Ben Edwards <bedwards at cs.unm.edu> wrote:
>> This looks great
>>
>>> 1. Interrupting/restarting the kernel doesn't require modifiers. I
>>> understand that there is a pop-up window asking for confirmation, but
>>> wouldn't it be better to have Cntr+. and Cntr+i for this action, and then
>>> skip the pop-up window?
>> As a vim user I think this is really needed. It might take me a while to
>> break the habit of hitting `i` for insert mode, and would probably drive me
>> nuts if I keep almost interrupting my kernel...
>>
>>



From benjaminrk at gmail.com  Sat Jan 11 16:22:59 2014
From: benjaminrk at gmail.com (MinRK)
Date: Sat, 11 Jan 2014 13:22:59 -0800
Subject: [IPython-dev] Please read: IPython Notebook UI goes modal
In-Reply-To: <52D1B3A6.2010700@gmail.com>
References: <CAH4pYpQAfZeCyfbPakKQ8gSLkCo6qzg+jnUE22wbT5-51hAwLg@mail.gmail.com>
	<CA+-1RQQnDd2ncZFRRiz7Zfawn6imssGWBXeP1qW3_v1cvBAiLw@mail.gmail.com>
	<CAMqwjDZn0eV2i3ze=mXjJ4s+-HtSHg5dM4+6Oej4BzO+Jwe5Jg@mail.gmail.com>
	<CAP4Ca8U_-tBMAnhSjbogTorFvpnTh0T2PX=dg9FMYpJmwFCYEQ@mail.gmail.com>
	<CAH4pYpTdWX_x_UGMOGgEsK=Rw9CDSuzW7Coj930c_n6WNrqfJw@mail.gmail.com>
	<52D1B3A6.2010700@gmail.com>
Message-ID: <CAHNn8BWVTf+y+tZEhwAD7u4yBVnPK-NWuD1-efKdEYaD4G1T0Q@mail.gmail.com>

On Sat, Jan 11, 2014 at 1:12 PM, Zolt?n V?r?s <zvoros at gmail.com> wrote:

> Hi Brian,
>
> But modifiers are already used for some shortcuts. Is there some
> specific reason for steering clear of Cntr+i? I have never used vim, so
> for me (i i) and Cntr+i are probably the same, but I would say that
> Cntr+i is somewhat more natural.
>

One of the main reasons for both the modal approach and the weird `^M i`
two-stroke shortcuts is that available shortcuts when working inside an
existing application (the browser) is that there are almost normal modifier
shortcuts that are actually available (even ^M conflicted with something, I
don't remember what) , and every one we add is another conflict.  I think
the double-i makes sense for interrupt and restart.


> Cheers,
> Zolt?n
>
> On 11/01/14 22:02, Brian Granger wrote:
> > What about the double press logic we use for the delete (d d) instead
> > of a modifier?
> >
> > On Sat, Jan 11, 2014 at 12:21 PM, Ben Edwards <bedwards at cs.unm.edu>
> wrote:
> >> This looks great
> >>
> >>> 1. Interrupting/restarting the kernel doesn't require modifiers. I
> >>> understand that there is a pop-up window asking for confirmation, but
> >>> wouldn't it be better to have Cntr+. and Cntr+i for this action, and
> then
> >>> skip the pop-up window?
> >> As a vim user I think this is really needed. It might take me a while to
> >> break the habit of hitting `i` for insert mode, and would probably
> drive me
> >> nuts if I keep almost interrupting my kernel...
> >>
> >>
>
> _______________________________________________
> 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/20140111/e4d461d1/attachment.html>

From jason-sage at creativetrax.com  Sat Jan 11 16:30:46 2014
From: jason-sage at creativetrax.com (Jason Grout)
Date: Sat, 11 Jan 2014 16:30:46 -0500
Subject: [IPython-dev] Please read: IPython Notebook UI goes modal
In-Reply-To: <CAHNn8BWVTf+y+tZEhwAD7u4yBVnPK-NWuD1-efKdEYaD4G1T0Q@mail.gmail.com>
References: <CAH4pYpQAfZeCyfbPakKQ8gSLkCo6qzg+jnUE22wbT5-51hAwLg@mail.gmail.com>	<CA+-1RQQnDd2ncZFRRiz7Zfawn6imssGWBXeP1qW3_v1cvBAiLw@mail.gmail.com>	<CAMqwjDZn0eV2i3ze=mXjJ4s+-HtSHg5dM4+6Oej4BzO+Jwe5Jg@mail.gmail.com>	<CAP4Ca8U_-tBMAnhSjbogTorFvpnTh0T2PX=dg9FMYpJmwFCYEQ@mail.gmail.com>	<CAH4pYpTdWX_x_UGMOGgEsK=Rw9CDSuzW7Coj930c_n6WNrqfJw@mail.gmail.com>	<52D1B3A6.2010700@gmail.com>
	<CAHNn8BWVTf+y+tZEhwAD7u4yBVnPK-NWuD1-efKdEYaD4G1T0Q@mail.gmail.com>
Message-ID: <52D1B806.1050707@creativetrax.com>

On 1/11/14, 4:22 PM, MinRK wrote:
> I think the double-i makes sense for interrupt and restart.

What about making it I I (so you have to hold down shift)?

Having a false positive for restarting the kernel can be a huge 
deal---you can't undo that.

Thanks,

Jason





From jason-sage at creativetrax.com  Sat Jan 11 16:33:24 2014
From: jason-sage at creativetrax.com (Jason Grout)
Date: Sat, 11 Jan 2014 16:33:24 -0500
Subject: [IPython-dev] Please read: IPython Notebook UI goes modal
In-Reply-To: <52D1B806.1050707@creativetrax.com>
References: <CAH4pYpQAfZeCyfbPakKQ8gSLkCo6qzg+jnUE22wbT5-51hAwLg@mail.gmail.com>	<CA+-1RQQnDd2ncZFRRiz7Zfawn6imssGWBXeP1qW3_v1cvBAiLw@mail.gmail.com>	<CAMqwjDZn0eV2i3ze=mXjJ4s+-HtSHg5dM4+6Oej4BzO+Jwe5Jg@mail.gmail.com>	<CAP4Ca8U_-tBMAnhSjbogTorFvpnTh0T2PX=dg9FMYpJmwFCYEQ@mail.gmail.com>	<CAH4pYpTdWX_x_UGMOGgEsK=Rw9CDSuzW7Coj930c_n6WNrqfJw@mail.gmail.com>	<52D1B3A6.2010700@gmail.com>	<CAHNn8BWVTf+y+tZEhwAD7u4yBVnPK-NWuD1-efKdEYaD4G1T0Q@mail.gmail.com>
	<52D1B806.1050707@creativetrax.com>
Message-ID: <52D1B8A4.9080206@creativetrax.com>

On 1/11/14, 4:30 PM, Jason Grout wrote:
> On 1/11/14, 4:22 PM, MinRK wrote:
>> I think the double-i makes sense for interrupt and restart.
>
> What about making it I I (so you have to hold down shift)?
>
> Having a false positive for restarting the kernel can be a huge
> deal---you can't undo that.

I would advocate for not even having a shortcut for restarting the 
kernel and rely on the menu/buttons for that.  Restarting the kernel is 
a very disruptive action, so I think it should have a fairly disruptive 
invocation procedure.

You can always put a shortcut in later if people are always complaining 
that they can't restart kernels fast enough :).

Jason




From asmeurer at gmail.com  Sat Jan 11 16:38:39 2014
From: asmeurer at gmail.com (Aaron Meurer)
Date: Sat, 11 Jan 2014 15:38:39 -0600
Subject: [IPython-dev] Please read: IPython Notebook UI goes modal
In-Reply-To: <52D1B8A4.9080206@creativetrax.com>
References: <CAH4pYpQAfZeCyfbPakKQ8gSLkCo6qzg+jnUE22wbT5-51hAwLg@mail.gmail.com>
	<CA+-1RQQnDd2ncZFRRiz7Zfawn6imssGWBXeP1qW3_v1cvBAiLw@mail.gmail.com>
	<CAMqwjDZn0eV2i3ze=mXjJ4s+-HtSHg5dM4+6Oej4BzO+Jwe5Jg@mail.gmail.com>
	<CAP4Ca8U_-tBMAnhSjbogTorFvpnTh0T2PX=dg9FMYpJmwFCYEQ@mail.gmail.com>
	<CAH4pYpTdWX_x_UGMOGgEsK=Rw9CDSuzW7Coj930c_n6WNrqfJw@mail.gmail.com>
	<52D1B3A6.2010700@gmail.com>
	<CAHNn8BWVTf+y+tZEhwAD7u4yBVnPK-NWuD1-efKdEYaD4G1T0Q@mail.gmail.com>
	<52D1B806.1050707@creativetrax.com> <52D1B8A4.9080206@creativetrax.com>
Message-ID: <CAKgW=6+DMpubB-NNZu403foS3BPd6v=gPDbO32X1obLM8VFOqw@mail.gmail.com>

Are there plans to make shortcuts customizable?

I get why you don't want Ctrl-C to mean interrupt, since that means
copy in Windows and Linux, but on OS X that shortcut should be mostly
free, and I personally would want to make it "just work".

Aaron Meurer

On Sat, Jan 11, 2014 at 3:33 PM, Jason Grout
<jason-sage at creativetrax.com> wrote:
> On 1/11/14, 4:30 PM, Jason Grout wrote:
>> On 1/11/14, 4:22 PM, MinRK wrote:
>>> I think the double-i makes sense for interrupt and restart.
>>
>> What about making it I I (so you have to hold down shift)?
>>
>> Having a false positive for restarting the kernel can be a huge
>> deal---you can't undo that.
>
> I would advocate for not even having a shortcut for restarting the
> kernel and rely on the menu/buttons for that.  Restarting the kernel is
> a very disruptive action, so I think it should have a fairly disruptive
> invocation procedure.
>
> You can always put a shortcut in later if people are always complaining
> that they can't restart kernels fast enough :).
>
> Jason
>
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev


From benjaminrk at gmail.com  Sat Jan 11 16:39:50 2014
From: benjaminrk at gmail.com (MinRK)
Date: Sat, 11 Jan 2014 13:39:50 -0800
Subject: [IPython-dev] Please read: IPython Notebook UI goes modal
In-Reply-To: <52D1B8A4.9080206@creativetrax.com>
References: <CAH4pYpQAfZeCyfbPakKQ8gSLkCo6qzg+jnUE22wbT5-51hAwLg@mail.gmail.com>
	<CA+-1RQQnDd2ncZFRRiz7Zfawn6imssGWBXeP1qW3_v1cvBAiLw@mail.gmail.com>
	<CAMqwjDZn0eV2i3ze=mXjJ4s+-HtSHg5dM4+6Oej4BzO+Jwe5Jg@mail.gmail.com>
	<CAP4Ca8U_-tBMAnhSjbogTorFvpnTh0T2PX=dg9FMYpJmwFCYEQ@mail.gmail.com>
	<CAH4pYpTdWX_x_UGMOGgEsK=Rw9CDSuzW7Coj930c_n6WNrqfJw@mail.gmail.com>
	<52D1B3A6.2010700@gmail.com>
	<CAHNn8BWVTf+y+tZEhwAD7u4yBVnPK-NWuD1-efKdEYaD4G1T0Q@mail.gmail.com>
	<52D1B806.1050707@creativetrax.com> <52D1B8A4.9080206@creativetrax.com>
Message-ID: <CAHNn8BU1p10tX6hb=Ycwh4TRzWd_pSzb9d3b9eq9aHFnqyPqhA@mail.gmail.com>

On Sat, Jan 11, 2014 at 1:33 PM, Jason Grout <jason-sage at creativetrax.com>wrote:

> On 1/11/14, 4:30 PM, Jason Grout wrote:
> > On 1/11/14, 4:22 PM, MinRK wrote:
> >> I think the double-i makes sense for interrupt and restart.
> >
> > What about making it I I (so you have to hold down shift)?
> >
> > Having a false positive for restarting the kernel can be a huge
> > deal---you can't undo that.
>
> I would advocate for not even having a shortcut for restarting the
> kernel and rely on the menu/buttons for that.  Restarting the kernel is
> a very disruptive action, so I think it should have a fairly disruptive
> invocation procedure.
>
> You can always put a shortcut in later if people are always complaining
> that they can't restart kernels fast enough :).
>

Since we already have complaints that we don't have a shortcut for restart
&& run all,
I think this might be a step too far, but I wouldn't object to shift +
double. Since restart is already protected behind a dialog, I think it's
not too bad.

But this does point to 'double-click' being something that we should make
generically available, rather than a special case for delete.

-MinRK


>
> Jason
>
>
> _______________________________________________
> 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/20140111/daa78c84/attachment.html>

From benjaminrk at gmail.com  Sat Jan 11 16:41:26 2014
From: benjaminrk at gmail.com (MinRK)
Date: Sat, 11 Jan 2014 13:41:26 -0800
Subject: [IPython-dev] Please read: IPython Notebook UI goes modal
In-Reply-To: <CAKgW=6+DMpubB-NNZu403foS3BPd6v=gPDbO32X1obLM8VFOqw@mail.gmail.com>
References: <CAH4pYpQAfZeCyfbPakKQ8gSLkCo6qzg+jnUE22wbT5-51hAwLg@mail.gmail.com>
	<CA+-1RQQnDd2ncZFRRiz7Zfawn6imssGWBXeP1qW3_v1cvBAiLw@mail.gmail.com>
	<CAMqwjDZn0eV2i3ze=mXjJ4s+-HtSHg5dM4+6Oej4BzO+Jwe5Jg@mail.gmail.com>
	<CAP4Ca8U_-tBMAnhSjbogTorFvpnTh0T2PX=dg9FMYpJmwFCYEQ@mail.gmail.com>
	<CAH4pYpTdWX_x_UGMOGgEsK=Rw9CDSuzW7Coj930c_n6WNrqfJw@mail.gmail.com>
	<52D1B3A6.2010700@gmail.com>
	<CAHNn8BWVTf+y+tZEhwAD7u4yBVnPK-NWuD1-efKdEYaD4G1T0Q@mail.gmail.com>
	<52D1B806.1050707@creativetrax.com> <52D1B8A4.9080206@creativetrax.com>
	<CAKgW=6+DMpubB-NNZu403foS3BPd6v=gPDbO32X1obLM8VFOqw@mail.gmail.com>
Message-ID: <CAHNn8BVLWfgdSDpiYY48b8Rk4frJh-UTuoVauq7NHMxLVAZMAA@mail.gmail.com>

On Sat, Jan 11, 2014 at 1:38 PM, Aaron Meurer <asmeurer at gmail.com> wrote:

> Are there plans to make shortcuts customizable?
>

Yes, in master you can customize shortcuts fairly easily in your custom.js, as
described here<http://nbviewer.ipython.org/github/ipython/ipython/blob/master/examples/notebooks/User%20Interface.ipynb#Keyboard-shortcut-customization>
.


>
> I get why you don't want Ctrl-C to mean interrupt, since that means
> copy in Windows and Linux, but on OS X that shortcut should be mostly
> free, and I personally would want to make it "just work".
>
> Aaron Meurer
>
> On Sat, Jan 11, 2014 at 3:33 PM, Jason Grout
> <jason-sage at creativetrax.com> wrote:
> > On 1/11/14, 4:30 PM, Jason Grout wrote:
> >> On 1/11/14, 4:22 PM, MinRK wrote:
> >>> I think the double-i makes sense for interrupt and restart.
> >>
> >> What about making it I I (so you have to hold down shift)?
> >>
> >> Having a false positive for restarting the kernel can be a huge
> >> deal---you can't undo that.
> >
> > I would advocate for not even having a shortcut for restarting the
> > kernel and rely on the menu/buttons for that.  Restarting the kernel is
> > a very disruptive action, so I think it should have a fairly disruptive
> > invocation procedure.
> >
> > You can always put a shortcut in later if people are always complaining
> > that they can't restart kernels fast enough :).
> >
> > Jason
> >
> >
> > _______________________________________________
> > 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/20140111/4a412738/attachment.html>

From ellisonbg at gmail.com  Sat Jan 11 16:58:57 2014
From: ellisonbg at gmail.com (Brian Granger)
Date: Sat, 11 Jan 2014 13:58:57 -0800
Subject: [IPython-dev] Please read: IPython Notebook UI goes modal
In-Reply-To: <52D100C4.3010201@gmail.com>
References: <CAH4pYpQAfZeCyfbPakKQ8gSLkCo6qzg+jnUE22wbT5-51hAwLg@mail.gmail.com>
	<52D100C4.3010201@gmail.com>
Message-ID: <CAH4pYpQZTc4P93O+-+n+TsMX84CVFp0h3ChgmacvScJ0POhNzw@mail.gmail.com>

> There are a couple of comments/remarks that I would like to make.

Thanks for the feedback!

> 1. Interrupting/restarting the kernel doesn't require modifiers. I
> understand that there is a pop-up window asking for confirmation, but
> wouldn't it be better to have Cntr+. and Cntr+i for this action, and then
> skip the pop-up window?

More on that in another reply.

> 2. In the example notebook, Cntr+/ is not listed as a shortcut for
> commenting out lines, but it is still available. That won't be removed, will
> that?

Yep it still works. The difficulty is that is a code-mirror shortcut
and those are not shown in the Keyboard Shortcut help or managed by
us.

> 3. Selecting the previous/next cell has now two shortcuts, up/down and j/k.
> About a year ago, we had a discussion about navigation in the kernel
> history, and the problem that time was that we couldn't find two keyboard
> keys that would work on all OSs. (Here is the link:
> https://github.com/ipython/ipython/pull/2203) Since the modal structure
> effective increases the number of available keys, I was wondering, whether
> it would make sense to return this question now. One could then assign j/k
> to history navigation, and the up/down arrows could navigate in the
> notebook. I can look into the implementation, if that's OK.

A few points on this:

* We absolutely need to keep the up and down arrows working for select
next/prev. Users not trained on j/k - most of our users that is - will
intuitively use the arrow keys. If those don't work, we will get much
frustration aimed in our direction.
* The reason we added j/k as a second pair of next/prev shortcuts is
that they are much more efficient to type and our advanced users (vim,
gmail, etc.) are already used to them.

I am -1 on changing these, but there are now a whole lot of other
keyboard shortcuts free that could be used for history navigation.
Also, everything is customizable now.

Cheers,

Brian

> Cheers,
> Zolt?n
>
> _______________________________________________
> 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


From ellisonbg at gmail.com  Sat Jan 11 17:02:05 2014
From: ellisonbg at gmail.com (Brian Granger)
Date: Sat, 11 Jan 2014 14:02:05 -0800
Subject: [IPython-dev] Please read: IPython Notebook UI goes modal
In-Reply-To: <52D1B806.1050707@creativetrax.com>
References: <CAH4pYpQAfZeCyfbPakKQ8gSLkCo6qzg+jnUE22wbT5-51hAwLg@mail.gmail.com>
	<CA+-1RQQnDd2ncZFRRiz7Zfawn6imssGWBXeP1qW3_v1cvBAiLw@mail.gmail.com>
	<CAMqwjDZn0eV2i3ze=mXjJ4s+-HtSHg5dM4+6Oej4BzO+Jwe5Jg@mail.gmail.com>
	<CAP4Ca8U_-tBMAnhSjbogTorFvpnTh0T2PX=dg9FMYpJmwFCYEQ@mail.gmail.com>
	<CAH4pYpTdWX_x_UGMOGgEsK=Rw9CDSuzW7Coj930c_n6WNrqfJw@mail.gmail.com>
	<52D1B3A6.2010700@gmail.com>
	<CAHNn8BWVTf+y+tZEhwAD7u4yBVnPK-NWuD1-efKdEYaD4G1T0Q@mail.gmail.com>
	<52D1B806.1050707@creativetrax.com>
Message-ID: <CAH4pYpRfPgZ8Jhj0D6XKzuyuQ1p1w+XWEh_2dKqbECdTL9ehdQ@mail.gmail.com>

Min has made some of the point I have been thinking about but a few more:

* The main thing we have to protect against is new users thinking they
can type in command mode. Using things like shift+i doesn't provide
any protection against that.
* The double press action we are using for delete has a relatively
short timeout. It is very unlikely that a user would accidentally
trigger that - even a confused vim user trying to enter insert mode
with i.
* I think we should have a single pattern for "dangerous actions". I
like the double press idea and it keeps the modifier keys free for
other things.

On Sat, Jan 11, 2014 at 1:30 PM, Jason Grout
<jason-sage at creativetrax.com> wrote:
> On 1/11/14, 4:22 PM, MinRK wrote:
>> I think the double-i makes sense for interrupt and restart.
>
> What about making it I I (so you have to hold down shift)?
>
> Having a false positive for restarting the kernel can be a huge
> deal---you can't undo that.
>
> Thanks,
>
> Jason
>
>
>
> _______________________________________________
> 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


From zvoros at gmail.com  Sat Jan 11 17:36:10 2014
From: zvoros at gmail.com (=?ISO-8859-1?Q?Zolt=E1n_V=F6r=F6s?=)
Date: Sat, 11 Jan 2014 23:36:10 +0100
Subject: [IPython-dev] Please read: IPython Notebook UI goes modal
In-Reply-To: <CAH4pYpRfPgZ8Jhj0D6XKzuyuQ1p1w+XWEh_2dKqbECdTL9ehdQ@mail.gmail.com>
References: <CAH4pYpQAfZeCyfbPakKQ8gSLkCo6qzg+jnUE22wbT5-51hAwLg@mail.gmail.com>	<CA+-1RQQnDd2ncZFRRiz7Zfawn6imssGWBXeP1qW3_v1cvBAiLw@mail.gmail.com>	<CAMqwjDZn0eV2i3ze=mXjJ4s+-HtSHg5dM4+6Oej4BzO+Jwe5Jg@mail.gmail.com>	<CAP4Ca8U_-tBMAnhSjbogTorFvpnTh0T2PX=dg9FMYpJmwFCYEQ@mail.gmail.com>	<CAH4pYpTdWX_x_UGMOGgEsK=Rw9CDSuzW7Coj930c_n6WNrqfJw@mail.gmail.com>	<52D1B3A6.2010700@gmail.com>	<CAHNn8BWVTf+y+tZEhwAD7u4yBVnPK-NWuD1-efKdEYaD4G1T0Q@mail.gmail.com>	<52D1B806.1050707@creativetrax.com>
	<CAH4pYpRfPgZ8Jhj0D6XKzuyuQ1p1w+XWEh_2dKqbECdTL9ehdQ@mail.gmail.com>
Message-ID: <52D1C75A.7080800@gmail.com>


On 11/01/14 23:02, Brian Granger wrote:
> * I think we should have a single pattern for "dangerous actions". I
> like the double press idea and it keeps the modifier keys free for
> other things.
I think this is OK, but "dangerous actions" should then be protected by 
a popup window. So, perhaps, what I was advocating in my first post is 
that it should not be too easy to make the popup window appear 
accidentally, because that will become quite annoying. But (i i) + a 
confirmation dialog for interrupting the kernel should be OK.

Cheers,
Zolt?n



From zvoros at gmail.com  Sat Jan 11 17:41:09 2014
From: zvoros at gmail.com (=?ISO-8859-1?Q?Zolt=E1n_V=F6r=F6s?=)
Date: Sat, 11 Jan 2014 23:41:09 +0100
Subject: [IPython-dev] Please read: IPython Notebook UI goes modal
In-Reply-To: <CAH4pYpQZTc4P93O+-+n+TsMX84CVFp0h3ChgmacvScJ0POhNzw@mail.gmail.com>
References: <CAH4pYpQAfZeCyfbPakKQ8gSLkCo6qzg+jnUE22wbT5-51hAwLg@mail.gmail.com>	<52D100C4.3010201@gmail.com>
	<CAH4pYpQZTc4P93O+-+n+TsMX84CVFp0h3ChgmacvScJ0POhNzw@mail.gmail.com>
Message-ID: <52D1C885.2010707@gmail.com>

Hi Brian,
>> 3. Selecting the previous/next cell has now two shortcuts, up/down and j/k.
>> About a year ago, we had a discussion about navigation in the kernel
>> history, and the problem that time was that we couldn't find two keyboard
>> keys that would work on all OSs. (Here is the link:
>> https://github.com/ipython/ipython/pull/2203) Since the modal structure
>> effective increases the number of available keys, I was wondering, whether
>> it would make sense to return this question now. One could then assign j/k
>> to history navigation, and the up/down arrows could navigate in the
>> notebook. I can look into the implementation, if that's OK.
> A few points on this:
>
> * We absolutely need to keep the up and down arrows working for select
> next/prev. Users not trained on j/k - most of our users that is - will
> intuitively use the arrow keys. If those don't work, we will get much
> frustration aimed in our direction.
> * The reason we added j/k as a second pair of next/prev shortcuts is
> that they are much more efficient to type and our advanced users (vim,
> gmail, etc.) are already used to them.

Fair enough.

> I am -1 on changing these, but there are now a whole lot of other
> keyboard shortcuts free that could be used for history navigation.
> Also, everything is customizable now.
So, you are -1 on changing j/k and up/down, but not on the 
implementation of the history navigation, aren't you? If that is the 
case, I will try to dust off the code that I have from the old 
discussion on github, and once that works, we can decide on the shortcut.

Cheers,
Zolt?n



From ellisonbg at gmail.com  Sat Jan 11 17:46:42 2014
From: ellisonbg at gmail.com (Brian Granger)
Date: Sat, 11 Jan 2014 14:46:42 -0800
Subject: [IPython-dev] Please read: IPython Notebook UI goes modal
In-Reply-To: <52D1C885.2010707@gmail.com>
References: <CAH4pYpQAfZeCyfbPakKQ8gSLkCo6qzg+jnUE22wbT5-51hAwLg@mail.gmail.com>
	<52D100C4.3010201@gmail.com>
	<CAH4pYpQZTc4P93O+-+n+TsMX84CVFp0h3ChgmacvScJ0POhNzw@mail.gmail.com>
	<52D1C885.2010707@gmail.com>
Message-ID: <CAH4pYpSSa-Qvg8uw=46K+GOcFBT6A9cDCVnXqwRT+ZrvUvwDbQ@mail.gmail.com>

I am fine with history navigation functionality, but I am guessing it
would be an edit mode shortcut?

On Sat, Jan 11, 2014 at 2:41 PM, Zolt?n V?r?s <zvoros at gmail.com> wrote:
> Hi Brian,
>>> 3. Selecting the previous/next cell has now two shortcuts, up/down and j/k.
>>> About a year ago, we had a discussion about navigation in the kernel
>>> history, and the problem that time was that we couldn't find two keyboard
>>> keys that would work on all OSs. (Here is the link:
>>> https://github.com/ipython/ipython/pull/2203) Since the modal structure
>>> effective increases the number of available keys, I was wondering, whether
>>> it would make sense to return this question now. One could then assign j/k
>>> to history navigation, and the up/down arrows could navigate in the
>>> notebook. I can look into the implementation, if that's OK.
>> A few points on this:
>>
>> * We absolutely need to keep the up and down arrows working for select
>> next/prev. Users not trained on j/k - most of our users that is - will
>> intuitively use the arrow keys. If those don't work, we will get much
>> frustration aimed in our direction.
>> * The reason we added j/k as a second pair of next/prev shortcuts is
>> that they are much more efficient to type and our advanced users (vim,
>> gmail, etc.) are already used to them.
>
> Fair enough.
>
>> I am -1 on changing these, but there are now a whole lot of other
>> keyboard shortcuts free that could be used for history navigation.
>> Also, everything is customizable now.
> So, you are -1 on changing j/k and up/down, but not on the
> implementation of the history navigation, aren't you? If that is the
> case, I will try to dust off the code that I have from the old
> discussion on github, and once that works, we can decide on the shortcut.
>
> Cheers,
> Zolt?n
>
> _______________________________________________
> 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


From andrew.gibiansky at gmail.com  Sat Jan 11 18:20:01 2014
From: andrew.gibiansky at gmail.com (Andrew Gibiansky)
Date: Sat, 11 Jan 2014 16:20:01 -0700
Subject: [IPython-dev] Please read: IPython Notebook UI goes modal
In-Reply-To: <CAH4pYpSSa-Qvg8uw=46K+GOcFBT6A9cDCVnXqwRT+ZrvUvwDbQ@mail.gmail.com>
References: <CAH4pYpQAfZeCyfbPakKQ8gSLkCo6qzg+jnUE22wbT5-51hAwLg@mail.gmail.com>
	<52D100C4.3010201@gmail.com>
	<CAH4pYpQZTc4P93O+-+n+TsMX84CVFp0h3ChgmacvScJ0POhNzw@mail.gmail.com>
	<52D1C885.2010707@gmail.com>
	<CAH4pYpSSa-Qvg8uw=46K+GOcFBT6A9cDCVnXqwRT+ZrvUvwDbQ@mail.gmail.com>
Message-ID: <CAF-LYKLjsmfpz52vjwH=uYsF4QuRpstJJ-9G6iEh2JHXmpQiEA@mail.gmail.com>

+1 for edit mode history commands!

Also, maybe it would work to have the "dangerous action" dialogs
dismissable via enter? The user presses ctrl I to restart, a dialog pops
up, they press enter. Advanced users can just learn to press ctrl I enter
in quick succession - best of both worlds?

This is awesome guys! Keep up the good work.

Andrew
On Jan 11, 2014 3:46 PM, "Brian Granger" <ellisonbg at gmail.com> wrote:

> I am fine with history navigation functionality, but I am guessing it
> would be an edit mode shortcut?
>
> On Sat, Jan 11, 2014 at 2:41 PM, Zolt?n V?r?s <zvoros at gmail.com> wrote:
> > Hi Brian,
> >>> 3. Selecting the previous/next cell has now two shortcuts, up/down and
> j/k.
> >>> About a year ago, we had a discussion about navigation in the kernel
> >>> history, and the problem that time was that we couldn't find two
> keyboard
> >>> keys that would work on all OSs. (Here is the link:
> >>> https://github.com/ipython/ipython/pull/2203) Since the modal
> structure
> >>> effective increases the number of available keys, I was wondering,
> whether
> >>> it would make sense to return this question now. One could then assign
> j/k
> >>> to history navigation, and the up/down arrows could navigate in the
> >>> notebook. I can look into the implementation, if that's OK.
> >> A few points on this:
> >>
> >> * We absolutely need to keep the up and down arrows working for select
> >> next/prev. Users not trained on j/k - most of our users that is - will
> >> intuitively use the arrow keys. If those don't work, we will get much
> >> frustration aimed in our direction.
> >> * The reason we added j/k as a second pair of next/prev shortcuts is
> >> that they are much more efficient to type and our advanced users (vim,
> >> gmail, etc.) are already used to them.
> >
> > Fair enough.
> >
> >> I am -1 on changing these, but there are now a whole lot of other
> >> keyboard shortcuts free that could be used for history navigation.
> >> Also, everything is customizable now.
> > So, you are -1 on changing j/k and up/down, but not on the
> > implementation of the history navigation, aren't you? If that is the
> > case, I will try to dust off the code that I have from the old
> > discussion on github, and once that works, we can decide on the shortcut.
> >
> > Cheers,
> > Zolt?n
> >
> > _______________________________________________
> > 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140111/0f0d4f76/attachment.html>

From zvoros at gmail.com  Sun Jan 12 05:33:28 2014
From: zvoros at gmail.com (=?ISO-8859-1?Q?Zolt=E1n_V=F6r=F6s?=)
Date: Sun, 12 Jan 2014 11:33:28 +0100
Subject: [IPython-dev] Please read: IPython Notebook UI goes modal
In-Reply-To: <CAH4pYpSSa-Qvg8uw=46K+GOcFBT6A9cDCVnXqwRT+ZrvUvwDbQ@mail.gmail.com>
References: <CAH4pYpQAfZeCyfbPakKQ8gSLkCo6qzg+jnUE22wbT5-51hAwLg@mail.gmail.com>	<52D100C4.3010201@gmail.com>	<CAH4pYpQZTc4P93O+-+n+TsMX84CVFp0h3ChgmacvScJ0POhNzw@mail.gmail.com>	<52D1C885.2010707@gmail.com>
	<CAH4pYpSSa-Qvg8uw=46K+GOcFBT6A9cDCVnXqwRT+ZrvUvwDbQ@mail.gmail.com>
Message-ID: <52D26F78.5080008@gmail.com>

Hi Brian,

On 11/01/14 23:46, Brian Granger wrote:
> I am fine with history navigation functionality, but I am guessing it
> would be an edit mode shortcut?
I don't mind, in fact, I didn't even have a firm opinion on that. When 
moving up/down in the history, we would need a "pointer" to the current 
position. Can I attach some metadata to the cell without breaking 
anything? Another question is, what should happen, if the user moves up 
5 times in the history, and then decides to work on another cell. At 
that point, the history counter has to be reset somehow, right? Should 
this counter apply to individual cells, or should it be global, 
belonging to the whole notebook?

Cheers,
Zolt?n


From ellisonbg at gmail.com  Sun Jan 12 12:12:22 2014
From: ellisonbg at gmail.com (Brian Granger)
Date: Sun, 12 Jan 2014 09:12:22 -0800
Subject: [IPython-dev] Please read: IPython Notebook UI goes modal
In-Reply-To: <52D26F78.5080008@gmail.com>
References: <CAH4pYpQAfZeCyfbPakKQ8gSLkCo6qzg+jnUE22wbT5-51hAwLg@mail.gmail.com>
	<52D100C4.3010201@gmail.com>
	<CAH4pYpQZTc4P93O+-+n+TsMX84CVFp0h3ChgmacvScJ0POhNzw@mail.gmail.com>
	<52D1C885.2010707@gmail.com>
	<CAH4pYpSSa-Qvg8uw=46K+GOcFBT6A9cDCVnXqwRT+ZrvUvwDbQ@mail.gmail.com>
	<52D26F78.5080008@gmail.com>
Message-ID: <CAH4pYpRZWGq0Kdb8NhJ5NOtQis7+jCBFCaQLwy0LJgFPbNgOww@mail.gmail.com>

It is hard for me to say without playing with it in a real notebook. I
 would build the underlying capability and they we can iterate on the
UI for it.

On Sun, Jan 12, 2014 at 2:33 AM, Zolt?n V?r?s <zvoros at gmail.com> wrote:
> Hi Brian,
>
> On 11/01/14 23:46, Brian Granger wrote:
>> I am fine with history navigation functionality, but I am guessing it
>> would be an edit mode shortcut?
> I don't mind, in fact, I didn't even have a firm opinion on that. When
> moving up/down in the history, we would need a "pointer" to the current
> position. Can I attach some metadata to the cell without breaking
> anything? Another question is, what should happen, if the user moves up
> 5 times in the history, and then decides to work on another cell. At
> that point, the history counter has to be reset somehow, right? Should
> this counter apply to individual cells, or should it be global,
> belonging to the whole notebook?
>
> Cheers,
> Zolt?n
> _______________________________________________
> 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


From dov.grobgeld at gmail.com  Tue Jan 14 13:14:48 2014
From: dov.grobgeld at gmail.com (Dov Grobgeld)
Date: Tue, 14 Jan 2014 20:14:48 +0200
Subject: [IPython-dev] requirements for porting ipython to a new gui
Message-ID: <CA++fsGG4UPJwZJNkN2+_ZiTrMpiDvKveRO87ot5fYJ=Do7ggnQ@mail.gmail.com>

Hello,

I'm looking into the requirements for porting IPython to a new GUI, namely
the blender console.

Is there a document describing the steps and requirements of the underlying
API to get it to work.

Currently trying to do:

import IPythonIPython.embed()


fails because sys.stdin is set to None by blender. But I see e.g. in the
qtconsole terminal that sys.stdin is left untouched, so I understand that
is not the way you hook into IPython.

So what is the way?

Thanks!
Dov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140114/5917e7d4/attachment.html>

From theodore.r.drain at jpl.nasa.gov  Tue Jan 14 13:31:19 2014
From: theodore.r.drain at jpl.nasa.gov (Drain, Theodore R (392P))
Date: Tue, 14 Jan 2014 18:31:19 +0000
Subject: [IPython-dev] Do I need to write a new parallel engine launcher
	class?
Message-ID: <0DC1CAB7F6C7FC4A8B54EE1FD49046990FB455E0@ap-embx-sp20.RES.AD.JPL>

I'm providing software to a group of users to make it easier for them to do simple parallel jobs.  The environment is a cluster of machines with a network storage system (shared file system).  I can use SSHEngineSetLauncher to launch a collection of engines on the cluster nodes and everything works fine but I'd like to handle the case where an engine can't be started for whatever reason.  Currently, the caller is given an error message that's hard to understand and the engine spawning stops leaving a partial set of engines running.  

What I'd like to provide them is a command line tool (pengines) that does something like this:

host0> pengines start --profile=cluster
Starting controller on host0
Starting engine  0 on host1 
Starting engine  1 on host1 
Starting engine  2 on host2 - FAILED
   See log /somepath/tolog/file
Starting engine  3 on host3 
Starting engine  4 on host4 
Finished
   5 engines available

host0> pengines status
Controller running on host0
5 engines available

host0> pengines stop
Stopping 5 engines...

The problem I'm running in to is that the existing launchers dump a lot of text to the screen and the engine set launcher stops running if a single engine can't be started.  I'm looking for suggestions as to the best way to "fix" this.  I think I need to write a new launcher that's similar to SSHEngineSetLauncher which handles errors and provides much simpler output.  Any suggestions would be appreciated.

Thanks,
Ted

From theodore.r.drain at jpl.nasa.gov  Tue Jan 14 18:46:36 2014
From: theodore.r.drain at jpl.nasa.gov (Drain, Theodore R (392P))
Date: Tue, 14 Jan 2014 23:46:36 +0000
Subject: [IPython-dev] Parallel SSH questions
Message-ID: <0DC1CAB7F6C7FC4A8B54EE1FD49046990FB4771B@ap-embx-sp20.RES.AD.JPL>

I've got some questions on how SSH engines work in the parallel system (running ipython 1.1.0).  This work is done on  cluster with a shared file system (hosts node1...node#) and all of the ports are firewalled so I have to use ssh tunnels.  I've created a profile named "ssh" and my ipcluster_config.py looks like this:

import platform; host = platform.node()

c.IPClusterStart.controller_launcher_class = 'SSHControllerLauncher'
c.SSHControllerLauncher.hostname = host
c.SSHControllerLauncher.controller_args = [
   '--enginessh=%s'%host,   '--ssh=%s'%host,
   '--log-to-file', '--log-level=20']

c.IPClusterStart.engine_launcher_class = 'SSHEngineSetLauncher'
c.SSHEngineSetLauncher.engine_args = [
   '--profile=ssh', '--log-to-file', '--log-level=20' ]
c.SSHEngineSetLauncher.engines = {
   'node2' : 2,
   'node3' : 2,
   }


Question #1:  If I don't add the --enginessh line to the controller inputs, then the ssh field in ipcontroller-engine.json is never filled in and the engines won't start.   If I don't add the --ssh line to the controller inputs, then I can't connect to the controller from a remote client because the ssh field in the ipcontroler-client.json is blank. Adding the hostname look up shown above solves this.  Is this the expected behavior?  Seems like a little bit of a hack that shouldn't be required to get forwarding to work - is there a better way to handle this?

Question #2: Is there any way to map engine ID (or UUID) to host name?  Since everything is connected w/ SSH port forwarding I can see how the controller might not know this but it would make for a lot nicer status output.  I'm using the db_query() routine to report how many jobs are completed and waiting for each engine and if there are engines that are engines that are really slow, I'd like to report them by host so the user can track down what's going on.

Question #3: In my environment (lots of people using the same cluster), parallel jobs are going to be set at a high nice level so they don't preempt interactive users.  This can mean that if another users starts jobs on a node, the parallel jobs assigned to that job might take a long time to finish.  I'd like to have a controller that handles this.  One idea is to have a controller that reassigns pending jobs to other engines when all other jobs are completed (and accepts the results from whichever engine finishes first).  Has anyone done anything like this or have tips on where to start with it?

Thanks,
Ted

From takowl at gmail.com  Tue Jan 14 22:04:06 2014
From: takowl at gmail.com (Thomas Kluyver)
Date: Tue, 14 Jan 2014 19:04:06 -0800
Subject: [IPython-dev] IPython open house tomorrow
Message-ID: <CAOvn4qiguAW_0Dd5aC-LoSBnjDWy5qpXRYk8DdZ2MFLPNjoDTw@mail.gmail.com>

Hi all,

Anyone in or near Berkeley tomorrow is welcome to come to our open house
event. The core development team is here for our development meeting, and
we're keen to talk to users and contributors about new features and future
plans. Refreshments will be provided.

We'll be in room 5101, Tolman Hall at 4pm. You can find it on the campus
map here:
http://www.berkeley.edu/map/googlemap/

Take an elevator in the West side of the building to floor 5, and turn left
for room 5101.

We hope to see you tomorrow,

Thomas & the IPython dev team
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140114/5f6bffe9/attachment.html>

From bussonniermatthias at gmail.com  Wed Jan 15 00:02:41 2014
From: bussonniermatthias at gmail.com (Matthias BUSSONNIER)
Date: Tue, 14 Jan 2014 21:02:41 -0800
Subject: [IPython-dev] requirements for porting ipython to a new gui
In-Reply-To: <CA++fsGG4UPJwZJNkN2+_ZiTrMpiDvKveRO87ot5fYJ=Do7ggnQ@mail.gmail.com>
References: <CA++fsGG4UPJwZJNkN2+_ZiTrMpiDvKveRO87ot5fYJ=Do7ggnQ@mail.gmail.com>
Message-ID: <B2C1BB24-AF4A-4547-9CEC-7E57FF0926F1@gmail.com>

Hi,


We are in a busy week where we all meet to prepare the next version of IPython.
If we don't respond rapidly don't hesitate to re-ping us.

You can also directly ask on hip chat (cf link on IPython.org) or open a github issue. 


Le 14 janv. 2014 ? 10:14, Dov Grobgeld a ?crit :

> Hello,
> 
> I'm looking into the requirements for porting IPython to a new GUI, namely the blender console.
> 
> Is there a document describing the steps and requirements of the underlying API to get it to work.
> 
> Currently trying to do:
> 
> import IPython
> IPython.embed()
> 
> fails because sys.stdin is set to None by blender. But I see e.g. in the qtconsole terminal that sys.stdin is left untouched, so I understand that is not the way you hook into IPython.

IIRC we don't support None, sys.stdin should be a file like (that eventually raise on some unsupported operations?)
We had the discussion somewhere at some point (on github ?)  but I don't find it. 

Have you had a look at 
http://ipython.org/ipython-doc/dev/interactive/reference.html#embedding

and embeding kernel only  to have frontend potentially on a separate process ?

(It would be great that blender could embed IPython !)
-- 
M

> So what is the way?
> 
> Thanks!
> Dov
> 
> 
> 
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev



From wagnerfl at student.ethz.ch  Wed Jan 15 02:42:05 2014
From: wagnerfl at student.ethz.ch (Florian M. Wagner)
Date: Wed, 15 Jan 2014 08:42:05 +0100
Subject: [IPython-dev] Do I need to write a new parallel engine launcher
 class?
In-Reply-To: <0DC1CAB7F6C7FC4A8B54EE1FD49046990FB455E0@ap-embx-sp20.RES.AD.JPL>
References: <0DC1CAB7F6C7FC4A8B54EE1FD49046990FB455E0@ap-embx-sp20.RES.AD.JPL>
Message-ID: <52D63BCD.4010904@student.ethz.ch>

Hey Theo,

I start the cluster using ipcluster and have the following function in 
case one or more engines are not starting:

    def wait_for_cluster(engines=1, maxtime=5):
         """Wait for an IPython cluster to startup and register a
    minimum number of
         engines"""
         start = time.time()
         running = False
         waitstr = "Waiting for controller..."
         sys.stdout.write(waitstr)
         while not running:
             try:
                 client = Client(profile='cluster')
                 running = True
                 sys.stdout.write(" found.\n")
             except:
                 time.sleep(5)
                 sys.stdout.write('.')
                 sys.stdout.flush()
             if time.time() - start > maxtime * 60:
                 break
         # wait for engines to register
         running = len(client)
         start = time.time()
         while running < engines:
             time.sleep(1)
             running = len(client)
             sys.stdout.write(
                 'Waiting for engines... (%d / %d) \r' %
                 (running, engines))
             sys.stdout.flush()
             if time.time() - start > maxtime * 60:
                 break
         print "\nConnected to %d engines..." % len(client.ids)
         return client

I don't know if this helps.



Am 14.01.2014 19:31, schrieb Drain, Theodore R (392P):
> I'm providing software to a group of users to make it easier for them to do simple parallel jobs.  The environment is a cluster of machines with a network storage system (shared file system).  I can use SSHEngineSetLauncher to launch a collection of engines on the cluster nodes and everything works fine but I'd like to handle the case where an engine can't be started for whatever reason.  Currently, the caller is given an error message that's hard to understand and the engine spawning stops leaving a partial set of engines running.
>
> What I'd like to provide them is a command line tool (pengines) that does something like this:
>
> host0> pengines start --profile=cluster
> Starting controller on host0
> Starting engine  0 on host1
> Starting engine  1 on host1
> Starting engine  2 on host2 - FAILED
>     See log /somepath/tolog/file
> Starting engine  3 on host3
> Starting engine  4 on host4
> Finished
>     5 engines available
>
> host0> pengines status
> Controller running on host0
> 5 engines available
>
> host0> pengines stop
> Stopping 5 engines...
>
> The problem I'm running in to is that the existing launchers dump a lot of text to the screen and the engine set launcher stops running if a single engine can't be started.  I'm looking for suggestions as to the best way to "fix" this.  I think I need to write a new launcher that's similar to SSHEngineSetLauncher which handles errors and provides much simpler output.  Any suggestions would be appreciated.
>
> Thanks,
> Ted
> _______________________________________________
> 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/20140115/bf900d03/attachment.html>

From moorepants at gmail.com  Thu Jan 16 13:23:04 2014
From: moorepants at gmail.com (Jason Moore)
Date: Thu, 16 Jan 2014 13:23:04 -0500
Subject: [IPython-dev] Import from another notebook
Message-ID: <CAP7f1Ahh75OsE3DY89KWShHNkJ5UgNqnwCXWX5NKQ_zmWA4LFA@mail.gmail.com>

I think I saw a thread about this in the past, but can't find it anymore.

I'd like to be able to import from one notebook into another. This is nice
for 3+ hour tutorials where you notebooks can be really long (or just long
notebooks in general).

Is this possible?

Jason
moorepants.info
+01 530-601-9791
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140116/84cdd42c/attachment.html>

From mmwoodman at gmail.com  Thu Jan 16 13:38:04 2014
From: mmwoodman at gmail.com (Marmaduke Woodman)
Date: Thu, 16 Jan 2014 19:38:04 +0100
Subject: [IPython-dev] Import from another notebook
In-Reply-To: <CAP7f1Ahh75OsE3DY89KWShHNkJ5UgNqnwCXWX5NKQ_zmWA4LFA@mail.gmail.com>
References: <CAP7f1Ahh75OsE3DY89KWShHNkJ5UgNqnwCXWX5NKQ_zmWA4LFA@mail.gmail.com>
Message-ID: <CAMqwjDaUd0vuuk9EZiD7MpZcsCJ3g43PY10jo53PEAbr-yhYQA@mail.gmail.com>

Is this what you mean?

http://nbviewer.ipython.org/github/ipython/ipython/blob/master/examples/notebooks/Importing%20Notebooks.ipynb


On Thu, Jan 16, 2014 at 7:23 PM, Jason Moore <moorepants at gmail.com> wrote:

> I think I saw a thread about this in the past, but can't find it anymore.
>
> I'd like to be able to import from one notebook into another. This is nice
> for 3+ hour tutorials where you notebooks can be really long (or just long
> notebooks in general).
>
> Is this possible?
>
> Jason
> moorepants.info
> +01 530-601-9791
>
> _______________________________________________
> 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/20140116/76bedc66/attachment.html>

From moorepants at gmail.com  Thu Jan 16 13:40:32 2014
From: moorepants at gmail.com (Jason Moore)
Date: Thu, 16 Jan 2014 13:40:32 -0500
Subject: [IPython-dev] Import from another notebook
In-Reply-To: <CAMqwjDaUd0vuuk9EZiD7MpZcsCJ3g43PY10jo53PEAbr-yhYQA@mail.gmail.com>
References: <CAP7f1Ahh75OsE3DY89KWShHNkJ5UgNqnwCXWX5NKQ_zmWA4LFA@mail.gmail.com>
	<CAMqwjDaUd0vuuk9EZiD7MpZcsCJ3g43PY10jo53PEAbr-yhYQA@mail.gmail.com>
Message-ID: <CAP7f1Ai8kpVT++aKToyyQ_vP2M5+J-d_podGYit7+aeQA6w8Cw@mail.gmail.com>

Yes, I believe it is. Thank you.


Jason
moorepants.info
+01 530-601-9791


On Thu, Jan 16, 2014 at 1:38 PM, Marmaduke Woodman <mmwoodman at gmail.com>wrote:

> Is this what you mean?
>
>
> http://nbviewer.ipython.org/github/ipython/ipython/blob/master/examples/notebooks/Importing%20Notebooks.ipynb
>
>
> On Thu, Jan 16, 2014 at 7:23 PM, Jason Moore <moorepants at gmail.com> wrote:
>
>> I think I saw a thread about this in the past, but can't find it anymore.
>>
>> I'd like to be able to import from one notebook into another. This is
>> nice for 3+ hour tutorials where you notebooks can be really long (or just
>> long notebooks in general).
>>
>> Is this possible?
>>
>> Jason
>> moorepants.info
>> +01 530-601-9791
>>
>> _______________________________________________
>> 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/20140116/fc0a9f83/attachment.html>

From alessandro.gagliardi at glassdoor.com  Thu Jan 16 15:27:20 2014
From: alessandro.gagliardi at glassdoor.com (Alessandro Gagliardi)
Date: Thu, 16 Jan 2014 20:27:20 +0000
Subject: [IPython-dev] Trying to install master in virtualenv on Mac OSX
	with Anaconda
Message-ID: <CEFD8118.3B02%alessandro.gagliardi@glassdoor.com>

I've installed Anaconda which includes IPython 1.1. Now I'd like to create a virtual environment where I can play with IPython 2 (still in development) without overwriting IPython 1.1. Anaconda doesn't play nice with virtualenv (I discovered the hard way) nor does conda allow me to install IPython 2 (because there is no conda package for IPython 2).

Is there a way to gracefully graduate out of Anaconda so one can use virtualenv or is there a conda recipe for IPython 2 that I can use?

Any help would be greatly appreciated. Thank you,
-Alessandro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140116/f307175b/attachment.html>

From moorepants at gmail.com  Thu Jan 16 15:35:24 2014
From: moorepants at gmail.com (Jason Moore)
Date: Thu, 16 Jan 2014 15:35:24 -0500
Subject: [IPython-dev] Trying to install master in virtualenv on Mac OSX
 with Anaconda
In-Reply-To: <CEFD8118.3B02%alessandro.gagliardi@glassdoor.com>
References: <CEFD8118.3B02%alessandro.gagliardi@glassdoor.com>
Message-ID: <CAP7f1AhTe20vuT2zn6=7MB1c8Njj4FYpNDUuhZZBkrd4aAu=6A@mail.gmail.com>

If you create a new conda environment without IPython and have all the
dependencies for IPython, you should be able to "pip install -e" from the
git repo for the latest IPython.


Jason
moorepants.info
+01 530-601-9791


On Thu, Jan 16, 2014 at 3:27 PM, Alessandro Gagliardi <
alessandro.gagliardi at glassdoor.com> wrote:

>  I've installed Anaconda which includes IPython 1.1. Now I'd like to
> create a virtual environment where I can play with IPython 2 (still in
> development) without overwriting IPython 1.1. Anaconda doesn't play nice
> with virtualenv (I discovered the hard way) nor does conda allow me to
> install IPython 2 (because there is no conda package for IPython 2).
>
>  Is there a way to gracefully graduate out of Anaconda so one can use
> virtualenv or is there a conda recipe for IPython 2 that I can use?
>
>  Any help would be greatly appreciated. Thank you,
> -Alessandro
>
> _______________________________________________
> 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/20140116/cc3bafd4/attachment.html>

From nathan12343 at gmail.com  Thu Jan 16 15:40:36 2014
From: nathan12343 at gmail.com (Nathan Goldbaum)
Date: Thu, 16 Jan 2014 12:40:36 -0800
Subject: [IPython-dev] Trying to install master in virtualenv on Mac OSX
 with Anaconda
In-Reply-To: <CAP7f1AhTe20vuT2zn6=7MB1c8Njj4FYpNDUuhZZBkrd4aAu=6A@mail.gmail.com>
References: <CEFD8118.3B02%alessandro.gagliardi@glassdoor.com>
	<CAP7f1AhTe20vuT2zn6=7MB1c8Njj4FYpNDUuhZZBkrd4aAu=6A@mail.gmail.com>
Message-ID: <CAJXewO=6_W_NkVRx_y=y_A2+w1xbYRSmPxySaw1_ErG4Jra9AA@mail.gmail.com>

You should also be able to straightforwardly update the conda recipes for
IPython (https://github.com/conda/conda-recipes/tree/master/ipython) to
build a new conda package.  You'll need to update the [source] section to
point to an IPython git repo, see http://docs.continuum.io/conda/build.html for
details on conda recipes and the conda build environment.


On Thu, Jan 16, 2014 at 12:35 PM, Jason Moore <moorepants at gmail.com> wrote:

> If you create a new conda environment without IPython and have all the
> dependencies for IPython, you should be able to "pip install -e" from the
> git repo for the latest IPython.
>
>
> Jason
> moorepants.info
> +01 530-601-9791
>
>
> On Thu, Jan 16, 2014 at 3:27 PM, Alessandro Gagliardi <
> alessandro.gagliardi at glassdoor.com> wrote:
>
>>  I've installed Anaconda which includes IPython 1.1. Now I'd like to
>> create a virtual environment where I can play with IPython 2 (still in
>> development) without overwriting IPython 1.1. Anaconda doesn't play nice
>> with virtualenv (I discovered the hard way) nor does conda allow me to
>> install IPython 2 (because there is no conda package for IPython 2).
>>
>>  Is there a way to gracefully graduate out of Anaconda so one can use
>> virtualenv or is there a conda recipe for IPython 2 that I can use?
>>
>>  Any help would be greatly appreciated. Thank you,
>> -Alessandro
>>
>> _______________________________________________
>> 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/20140116/16cf862f/attachment.html>

From doug.blank at gmail.com  Thu Jan 16 17:18:59 2014
From: doug.blank at gmail.com (Doug Blank)
Date: Thu, 16 Jan 2014 14:18:59 -0800 (PST)
Subject: [IPython-dev] Simple Kernel Example
Message-ID: <1389910739647-5044217.post@n6.nabble.com>

Hello devs,

I've looked at the IPython docs, and IHaskell, IJulia, and IRuby backends,
but having a bit of trouble seeing exactly what needs to be done to create a
new kernel. I assume that a kernel could be an executable in any language
that receives a filename whose contents are the configuration items (like
port numbers). Then, I guess, it starts up threads to listen to those ports
handling XMP data.

If there were a simple HelloWorld-type kernel, that would be very helpful.
For example, just a hello.py file that listened to the right ports, and
returned an effective response of "Ok" (without doing anything) would be
enough to get me started.

Is there anything similar to that?  

Thanks for any help or pointers!

-Doug




--
View this message in context: http://python.6.x6.nabble.com/Simple-Kernel-Example-tp5044217.html
Sent from the IPython - Development mailing list archive at Nabble.com.


From alessandro.gagliardi at glassdoor.com  Thu Jan 16 17:30:22 2014
From: alessandro.gagliardi at glassdoor.com (Alessandro Gagliardi)
Date: Thu, 16 Jan 2014 22:30:22 +0000
Subject: [IPython-dev] IPython-dev Digest, Vol 120, Issue 17
In-Reply-To: <mailman.353.1389910427.953.ipython-dev@scipy.org>
Message-ID: <CEFD9D44.3B1C%alessandro.gagliardi@glassdoor.com>

Thanks. FWIW, I think the problem that I had before was that it was
defaulting to the base version of pip which caused it to install outside
of my environment. When I used conda to install pip into my environment,
and then used conda to install ipython 2, it worked fine.

-Alessandro

On 1/16/14, 2:13 PM, "ipython-dev-request at scipy.org"
<ipython-dev-request at scipy.org> wrote:
>Date: Thu, 16 Jan 2014 15:35:24 -0500
>From: Jason Moore <moorepants at gmail.com>
>Subject: Re: [IPython-dev] Trying to install master in virtualenv on
>	Mac OSX with Anaconda
>
>If you create a new conda environment without IPython and have all the
>dependencies for IPython, you should be able to "pip install -e" from the
>git repo for the latest IPython.
>
>
>Jason
>moorepants.info
>+01 530-601-9791
>
>
>On Thu, Jan 16, 2014 at 3:27 PM, Alessandro Gagliardi <
>alessandro.gagliardi at glassdoor.com> wrote:
>
>>  I've installed Anaconda which includes IPython 1.1. Now I'd like to
>> create a virtual environment where I can play with IPython 2 (still in
>> development) without overwriting IPython 1.1. Anaconda doesn't play nice
>> with virtualenv (I discovered the hard way) nor does conda allow me to
>> install IPython 2 (because there is no conda package for IPython 2).
>>
>>  Is there a way to gracefully graduate out of Anaconda so one can use
>> virtualenv or is there a conda recipe for IPython 2 that I can use?
>>
>>  Any help would be greatly appreciated. Thank you,
>> -Alessandro
>>
>Date: Thu, 16 Jan 2014 12:40:36 -0800
>From: Nathan Goldbaum <nathan12343 at gmail.com>
>Subject: Re: [IPython-dev] Trying to install master in virtualenv on
>	Mac OSX with Anaconda
>To: IPython developers list <ipython-dev at scipy.org>
>
>You should also be able to straightforwardly update the conda recipes for
>IPython (https://github.com/conda/conda-recipes/tree/master/ipython) to
>build a new conda package.  You'll need to update the [source] section to
>point to an IPython git repo, see
>http://docs.continuum.io/conda/build.html for
>details on conda recipes and the conda build environment.



From mattpap at gmail.com  Thu Jan 16 17:36:57 2014
From: mattpap at gmail.com (Mateusz Paprocki)
Date: Thu, 16 Jan 2014 23:36:57 +0100
Subject: [IPython-dev] Simple Kernel Example
In-Reply-To: <1389910739647-5044217.post@n6.nabble.com>
References: <1389910739647-5044217.post@n6.nabble.com>
Message-ID: <CAGBZUCYsc6S7LBP8nH=SZ3KJKxQfT71RyAi80h5dfMtysHDFRg@mail.gmail.com>

Hi,

On 16 January 2014 23:18, Doug Blank <doug.blank at gmail.com> wrote:
> Hello devs,
>
> I've looked at the IPython docs, and IHaskell, IJulia, and IRuby backends,
> but having a bit of trouble seeing exactly what needs to be done to create a
> new kernel. I assume that a kernel could be an executable in any language
> that receives a filename whose contents are the configuration items (like
> port numbers). Then, I guess, it starts up threads to listen to those ports
> handling XMP data.
>
> If there were a simple HelloWorld-type kernel, that would be very helpful.
> For example, just a hello.py file that listened to the right ports, and
> returned an effective response of "Ok" (without doing anything) would be
> enough to get me started.
>
> Is there anything similar to that?
>
> Thanks for any help or pointers!

I can point you to my own developments:
https://github.com/mattpap/IScala and
https://github.com/mattpap/IAldor. IScala is a complete implementation
of a Scala-language kernel (in Scala), so it may not help you much.
IAldor is basically an implementation of IPython's message protocol in
pure C. There is a thin layer for interoperability with Aldor's
compiler (https://github.com/pippijn/Aldor), but it can be easily
removed. I was about to actually split this project into two, so that
the Aldor independent part could be reused in other projects.
Unfortunately I didn't have time to finish this and the implementation
is very rough, so if you try it out and encounter any segmentation
faults, that's its current status.

> -Doug
>
>
>
>
> --
> View this message in context: http://python.6.x6.nabble.com/Simple-Kernel-Example-tp5044217.html
> Sent from the IPython - Development mailing list archive at Nabble.com.
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev

Thanks,

Mateusz


From andrew.gibiansky at gmail.com  Thu Jan 16 18:01:19 2014
From: andrew.gibiansky at gmail.com (Andrew Gibiansky)
Date: Thu, 16 Jan 2014 16:01:19 -0700
Subject: [IPython-dev] Simple Kernel Example
In-Reply-To: <CAGBZUCYsc6S7LBP8nH=SZ3KJKxQfT71RyAi80h5dfMtysHDFRg@mail.gmail.com>
References: <1389910739647-5044217.post@n6.nabble.com>
	<CAGBZUCYsc6S7LBP8nH=SZ3KJKxQfT71RyAi80h5dfMtysHDFRg@mail.gmail.com>
Message-ID: <CAF-LYKJu8Mg32pbLSwhyLEXib1M7RisYBC9LywVMDMj_aXcOkA@mail.gmail.com>

I have a bit of documentation here:

http://andrew.gibiansky.com/blog/ipython/ipython-kernels/

It goes over how the basic Ihaskell kernel works (no Haskell knowledge
required).

Andrew
On Jan 16, 2014 3:37 PM, "Mateusz Paprocki" <mattpap at gmail.com> wrote:

> Hi,
>
> On 16 January 2014 23:18, Doug Blank <doug.blank at gmail.com> wrote:
> > Hello devs,
> >
> > I've looked at the IPython docs, and IHaskell, IJulia, and IRuby
> backends,
> > but having a bit of trouble seeing exactly what needs to be done to
> create a
> > new kernel. I assume that a kernel could be an executable in any language
> > that receives a filename whose contents are the configuration items (like
> > port numbers). Then, I guess, it starts up threads to listen to those
> ports
> > handling XMP data.
> >
> > If there were a simple HelloWorld-type kernel, that would be very
> helpful.
> > For example, just a hello.py file that listened to the right ports, and
> > returned an effective response of "Ok" (without doing anything) would be
> > enough to get me started.
> >
> > Is there anything similar to that?
> >
> > Thanks for any help or pointers!
>
> I can point you to my own developments:
> https://github.com/mattpap/IScala and
> https://github.com/mattpap/IAldor. IScala is a complete implementation
> of a Scala-language kernel (in Scala), so it may not help you much.
> IAldor is basically an implementation of IPython's message protocol in
> pure C. There is a thin layer for interoperability with Aldor's
> compiler (https://github.com/pippijn/Aldor), but it can be easily
> removed. I was about to actually split this project into two, so that
> the Aldor independent part could be reused in other projects.
> Unfortunately I didn't have time to finish this and the implementation
> is very rough, so if you try it out and encounter any segmentation
> faults, that's its current status.
>
> > -Doug
> >
> >
> >
> >
> > --
> > View this message in context:
> http://python.6.x6.nabble.com/Simple-Kernel-Example-tp5044217.html
> > Sent from the IPython - Development mailing list archive at Nabble.com.
> > _______________________________________________
> > IPython-dev mailing list
> > IPython-dev at scipy.org
> > http://mail.scipy.org/mailman/listinfo/ipython-dev
>
> Thanks,
>
> Mateusz
> _______________________________________________
> 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/20140116/8d4df9e7/attachment.html>

From doug.blank at gmail.com  Thu Jan 16 18:32:44 2014
From: doug.blank at gmail.com (Doug Blank)
Date: Thu, 16 Jan 2014 18:32:44 -0500
Subject: [IPython-dev] Simple Kernel Example
In-Reply-To: <CAF-LYKJu8Mg32pbLSwhyLEXib1M7RisYBC9LywVMDMj_aXcOkA@mail.gmail.com>
References: <1389910739647-5044217.post@n6.nabble.com>
	<CAGBZUCYsc6S7LBP8nH=SZ3KJKxQfT71RyAi80h5dfMtysHDFRg@mail.gmail.com>
	<CAF-LYKJu8Mg32pbLSwhyLEXib1M7RisYBC9LywVMDMj_aXcOkA@mail.gmail.com>
Message-ID: <CAAusYCjGvF45dvXPUZuo8D=oTh+7xy6g+xuTz5pF4CJP7csOcg@mail.gmail.com>

On Thu, Jan 16, 2014 at 6:01 PM, Andrew Gibiansky
<andrew.gibiansky at gmail.com> wrote:
> I have a bit of documentation here:
>
> http://andrew.gibiansky.com/blog/ipython/ipython-kernels/
>
> It goes over how the basic Ihaskell kernel works (no Haskell knowledge
> required).

That is an excellent introduction! I wish there were a simple, toy
even, implementation to go along with that description. For example, I
have no idea how to create the ZMQ stuff, in any language.

Thanks for writing that, and the pointer to it! (IPython should point
to it, too).

-Doug

> Andrew
>
> On Jan 16, 2014 3:37 PM, "Mateusz Paprocki" <mattpap at gmail.com> wrote:
>>
>> Hi,
>>
>> On 16 January 2014 23:18, Doug Blank <doug.blank at gmail.com> wrote:
>> > Hello devs,
>> >
>> > I've looked at the IPython docs, and IHaskell, IJulia, and IRuby
>> > backends,
>> > but having a bit of trouble seeing exactly what needs to be done to
>> > create a
>> > new kernel. I assume that a kernel could be an executable in any
>> > language
>> > that receives a filename whose contents are the configuration items
>> > (like
>> > port numbers). Then, I guess, it starts up threads to listen to those
>> > ports
>> > handling XMP data.
>> >
>> > If there were a simple HelloWorld-type kernel, that would be very
>> > helpful.
>> > For example, just a hello.py file that listened to the right ports, and
>> > returned an effective response of "Ok" (without doing anything) would be
>> > enough to get me started.
>> >
>> > Is there anything similar to that?
>> >
>> > Thanks for any help or pointers!
>>
>> I can point you to my own developments:
>> https://github.com/mattpap/IScala and
>> https://github.com/mattpap/IAldor. IScala is a complete implementation
>> of a Scala-language kernel (in Scala), so it may not help you much.
>> IAldor is basically an implementation of IPython's message protocol in
>> pure C. There is a thin layer for interoperability with Aldor's
>> compiler (https://github.com/pippijn/Aldor), but it can be easily
>> removed. I was about to actually split this project into two, so that
>> the Aldor independent part could be reused in other projects.
>> Unfortunately I didn't have time to finish this and the implementation
>> is very rough, so if you try it out and encounter any segmentation
>> faults, that's its current status.
>>
>> > -Doug
>> >
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> > http://python.6.x6.nabble.com/Simple-Kernel-Example-tp5044217.html
>> > Sent from the IPython - Development mailing list archive at Nabble.com.
>> > _______________________________________________
>> > IPython-dev mailing list
>> > IPython-dev at scipy.org
>> > http://mail.scipy.org/mailman/listinfo/ipython-dev
>>
>> Thanks,
>>
>> Mateusz
>> _______________________________________________
>> 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
>


From takowl at gmail.com  Thu Jan 16 18:38:49 2014
From: takowl at gmail.com (Thomas Kluyver)
Date: Thu, 16 Jan 2014 15:38:49 -0800
Subject: [IPython-dev] Simple Kernel Example
In-Reply-To: <CAAusYCjGvF45dvXPUZuo8D=oTh+7xy6g+xuTz5pF4CJP7csOcg@mail.gmail.com>
References: <1389910739647-5044217.post@n6.nabble.com>
	<CAGBZUCYsc6S7LBP8nH=SZ3KJKxQfT71RyAi80h5dfMtysHDFRg@mail.gmail.com>
	<CAF-LYKJu8Mg32pbLSwhyLEXib1M7RisYBC9LywVMDMj_aXcOkA@mail.gmail.com>
	<CAAusYCjGvF45dvXPUZuo8D=oTh+7xy6g+xuTz5pF4CJP7csOcg@mail.gmail.com>
Message-ID: <CAOvn4qhGi-mxK1k=+KErOMygOqutbOPUtCx9MTiCmwY+2N7Dsw@mail.gmail.com>

On 16 January 2014 15:32, Doug Blank <doug.blank at gmail.com> wrote:

> I wish there were a simple, toy
> even, implementation to go along with that description. For example, I
> have no idea how to create the ZMQ stuff, in any language.
>

I don't claim that the code is especially good or clear, but my Go kernel
is probably about the smallest amount of code that works as a kernel:

https://github.com/takluyver/igo

Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140116/ad521b8c/attachment.html>

From asmeurer at gmail.com  Thu Jan 16 19:35:20 2014
From: asmeurer at gmail.com (Aaron Meurer)
Date: Thu, 16 Jan 2014 18:35:20 -0600
Subject: [IPython-dev] Import from another notebook
In-Reply-To: <CAP7f1Ai8kpVT++aKToyyQ_vP2M5+J-d_podGYit7+aeQA6w8Cw@mail.gmail.com>
References: <CAP7f1Ahh75OsE3DY89KWShHNkJ5UgNqnwCXWX5NKQ_zmWA4LFA@mail.gmail.com>
	<CAMqwjDaUd0vuuk9EZiD7MpZcsCJ3g43PY10jo53PEAbr-yhYQA@mail.gmail.com>
	<CAP7f1Ai8kpVT++aKToyyQ_vP2M5+J-d_podGYit7+aeQA6w8Cw@mail.gmail.com>
Message-ID: <CAKgW=6Ke-h6HZc-oob=NKuBeXvPjTP_jHR_b0k-EMXgvUVGqOw@mail.gmail.com>

Why is this code not just part of IPython itself?

Aaron Meurer

On Thu, Jan 16, 2014 at 12:40 PM, Jason Moore <moorepants at gmail.com> wrote:
> Yes, I believe it is. Thank you.
>
>
> Jason
> moorepants.info
> +01 530-601-9791
>
>
> On Thu, Jan 16, 2014 at 1:38 PM, Marmaduke Woodman <mmwoodman at gmail.com>
> wrote:
>>
>> Is this what you mean?
>>
>>
>> http://nbviewer.ipython.org/github/ipython/ipython/blob/master/examples/notebooks/Importing%20Notebooks.ipynb
>>
>>
>> On Thu, Jan 16, 2014 at 7:23 PM, Jason Moore <moorepants at gmail.com> wrote:
>>>
>>> I think I saw a thread about this in the past, but can't find it anymore.
>>>
>>> I'd like to be able to import from one notebook into another. This is
>>> nice for 3+ hour tutorials where you notebooks can be really long (or just
>>> long notebooks in general).
>>>
>>> Is this possible?
>>>
>>> Jason
>>> moorepants.info
>>> +01 530-601-9791
>>>
>>> _______________________________________________
>>> 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
>


From bussonniermatthias at gmail.com  Thu Jan 16 19:49:35 2014
From: bussonniermatthias at gmail.com (Matthias BUSSONNIER)
Date: Thu, 16 Jan 2014 16:49:35 -0800
Subject: [IPython-dev] Import from another notebook
In-Reply-To: <CAKgW=6Ke-h6HZc-oob=NKuBeXvPjTP_jHR_b0k-EMXgvUVGqOw@mail.gmail.com>
References: <CAP7f1Ahh75OsE3DY89KWShHNkJ5UgNqnwCXWX5NKQ_zmWA4LFA@mail.gmail.com>
	<CAMqwjDaUd0vuuk9EZiD7MpZcsCJ3g43PY10jo53PEAbr-yhYQA@mail.gmail.com>
	<CAP7f1Ai8kpVT++aKToyyQ_vP2M5+J-d_podGYit7+aeQA6w8Cw@mail.gmail.com>
	<CAKgW=6Ke-h6HZc-oob=NKuBeXvPjTP_jHR_b0k-EMXgvUVGqOw@mail.gmail.com>
Message-ID: <06FA88B5-84D3-4548-BF30-A22C668863CA@gmail.com>


Le 16 janv. 2014 ? 16:35, Aaron Meurer a ?crit :

> Why is this code not just part of IPython itself?
> 
> Aaron Meurer


Cause it is not tested, and would need to be refined. 
Also it won't "exactly" behave as a Py File.
Someone who know know import hook better would have to have a look. 
-- 
M

> 
> On Thu, Jan 16, 2014 at 12:40 PM, Jason Moore <moorepants at gmail.com> wrote:
>> Yes, I believe it is. Thank you.
>> 
>> 
>> Jason
>> moorepants.info
>> +01 530-601-9791
>> 
>> 
>> On Thu, Jan 16, 2014 at 1:38 PM, Marmaduke Woodman <mmwoodman at gmail.com>
>> wrote:
>>> 
>>> Is this what you mean?
>>> 
>>> 
>>> http://nbviewer.ipython.org/github/ipython/ipython/blob/master/examples/notebooks/Importing%20Notebooks.ipynb
>>> 
>>> 
>>> On Thu, Jan 16, 2014 at 7:23 PM, Jason Moore <moorepants at gmail.com> wrote:
>>>> 
>>>> I think I saw a thread about this in the past, but can't find it anymore.
>>>> 
>>>> I'd like to be able to import from one notebook into another. This is
>>>> nice for 3+ hour tutorials where you notebooks can be really long (or just
>>>> long notebooks in general).
>>>> 
>>>> Is this possible?
>>>> 
>>>> Jason
>>>> moorepants.info
>>>> +01 530-601-9791
>>>> 
>>>> _______________________________________________
>>>> 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
>> 
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev



From doug.blank at gmail.com  Fri Jan 17 09:36:35 2014
From: doug.blank at gmail.com (Doug Blank)
Date: Fri, 17 Jan 2014 09:36:35 -0500
Subject: [IPython-dev] Simple Kernel Example
In-Reply-To: <1389910739647-5044217.post@n6.nabble.com>
References: <1389910739647-5044217.post@n6.nabble.com>
Message-ID: <CAAusYCgGH9_05baF1fvK3OYdYp4Fj8vyf814QfSUDWfF_5NTgA@mail.gmail.com>

Thanks to all for the pointers so far! I haven't gotten any of the
other languages to work yet (I've sent each responder a message
detailing what problems I am having. I'll report back here with status
on those fronts.)

I see that I should be able to:

$ ipython console
--KernelManager.kernel_cmd="['/path/to/simple_kernel.sh',
'{connection_file}']"

where simple_kernel.sh (with chmod +x) is just a simple echo (to see
if it is working).

But that gives:
...
  File "/usr/local/lib/python2.7/dist-packages/IPython/kernel/manager.py",
line 161, in _launch_kernel
    return launch_kernel(kernel_cmd, **kw)
  File "/usr/local/lib/python2.7/dist-packages/IPython/kernel/launcher.py",
line 251, in launch_kernel
    stdin=_stdin, stdout=_stdout, stderr=_stderr, cwd=cwd, env=os.environ)
  File "/usr/lib/python2.7/subprocess.py", line 709, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1326, in _execute_child
    raise child_exception
OSError: [Errno 8] Exec format error

I then tried to to create a profile:

$ ipython profile create simple_kernel

And edited ~/.config/ipython/profile_simple_kernel/ipython_config.py to include:
c = get_config()
c.Application.verbose_crash=True
c.InteractiveShellApp.code_to_run =
'/home/dblank/Desktop/IPython/simple_kernel.sh'

and run:

$ ipython console --profile simple_kernel

But nothing happens--just runs with no output. Any suggestions about
what is wrong, or how to proceed?

-Doug

On Thu, Jan 16, 2014 at 5:18 PM, Doug Blank <doug.blank at gmail.com> wrote:
> Hello devs,
>
> I've looked at the IPython docs, and IHaskell, IJulia, and IRuby backends,
> but having a bit of trouble seeing exactly what needs to be done to create a
> new kernel. I assume that a kernel could be an executable in any language
> that receives a filename whose contents are the configuration items (like
> port numbers). Then, I guess, it starts up threads to listen to those ports
> handling XMP data.
>
> If there were a simple HelloWorld-type kernel, that would be very helpful.
> For example, just a hello.py file that listened to the right ports, and
> returned an effective response of "Ok" (without doing anything) would be
> enough to get me started.
>
> Is there anything similar to that?
>
> Thanks for any help or pointers!
>
> -Doug
>
>
>
>
> --
> View this message in context: http://python.6.x6.nabble.com/Simple-Kernel-Example-tp5044217.html
> Sent from the IPython - Development mailing list archive at Nabble.com.
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev


From mark.voorhies at ucsf.edu  Fri Jan 17 10:39:49 2014
From: mark.voorhies at ucsf.edu (Mark Voorhies)
Date: Fri, 17 Jan 2014 07:39:49 -0800
Subject: [IPython-dev] Simple Kernel Example
In-Reply-To: <CAAusYCgGH9_05baF1fvK3OYdYp4Fj8vyf814QfSUDWfF_5NTgA@mail.gmail.com>
References: <1389910739647-5044217.post@n6.nabble.com>
	<CAAusYCgGH9_05baF1fvK3OYdYp4Fj8vyf814QfSUDWfF_5NTgA@mail.gmail.com>
Message-ID: <52D94EC5.8050201@ucsf.edu>

On 01/17/2014 06:36 AM, Doug Blank wrote:
> Thanks to all for the pointers so far! I haven't gotten any of the
> other languages to work yet (I've sent each responder a message
> detailing what problems I am having. I'll report back here with status
> on those fronts.)
>
> I see that I should be able to:
>
> $ ipython console
> --KernelManager.kernel_cmd="['/path/to/simple_kernel.sh',
> '{connection_file}']"
>
> where simple_kernel.sh (with chmod +x) is just a simple echo (to see
> if it is working).
>
> But that gives:
> ...
>    File "/usr/local/lib/python2.7/dist-packages/IPython/kernel/manager.py",
> line 161, in _launch_kernel
>      return launch_kernel(kernel_cmd, **kw)
>    File "/usr/local/lib/python2.7/dist-packages/IPython/kernel/launcher.py",
> line 251, in launch_kernel
>      stdin=_stdin, stdout=_stdout, stderr=_stderr, cwd=cwd, env=os.environ)
>    File "/usr/lib/python2.7/subprocess.py", line 709, in __init__
>      errread, errwrite)
>    File "/usr/lib/python2.7/subprocess.py", line 1326, in _execute_child
>      raise child_exception
> OSError: [Errno 8] Exec format error

This looks like a missing shebang problem.  Does simple_kernel.sh start
with something like
#!/bin/bash

--Mark



From bussonniermatthias at gmail.com  Fri Jan 17 10:41:05 2014
From: bussonniermatthias at gmail.com (Matthias BUSSONNIER)
Date: Fri, 17 Jan 2014 07:41:05 -0800
Subject: [IPython-dev] Simple Kernel Example
In-Reply-To: <CAAusYCgGH9_05baF1fvK3OYdYp4Fj8vyf814QfSUDWfF_5NTgA@mail.gmail.com>
References: <1389910739647-5044217.post@n6.nabble.com>
	<CAAusYCgGH9_05baF1fvK3OYdYp4Fj8vyf814QfSUDWfF_5NTgA@mail.gmail.com>
Message-ID: <F7012B6C-C389-4C76-AA78-7F6F93105DDE@gmail.com>

Hi Doug, 

an old node kernel I wrote 

http://nbviewer.ipython.org/gist/Carreau/4279371/node-kernel.ipynb

And responses to your question :

Le 17 janv. 2014 ? 06:36, Doug Blank a ?crit :

> Thanks to all for the pointers so far! I haven't gotten any of the
> other languages to work yet (I've sent each responder a message
> detailing what problems I am having. I'll report back here with status
> on those fronts.)
> 
> I see that I should be able to:
> 
> $ ipython console
> --KernelManager.kernel_cmd="['/path/to/simple_kernel.sh',
> '{connection_file}']"
> 
> where simple_kernel.sh (with chmod +x) is just a simple echo (to see
> if it is working).
> 
> But that gives:
> ...
>  File "/usr/local/lib/python2.7/dist-packages/IPython/kernel/manager.py",
> line 161, in _launch_kernel
>    return launch_kernel(kernel_cmd, **kw)
>  File "/usr/local/lib/python2.7/dist-packages/IPython/kernel/launcher.py",
> line 251, in launch_kernel
>    stdin=_stdin, stdout=_stdout, stderr=_stderr, cwd=cwd, env=os.environ)
>  File "/usr/lib/python2.7/subprocess.py", line 709, in __init__
>    errread, errwrite)
>  File "/usr/lib/python2.7/subprocess.py", line 1326, in _execute_child
>    raise child_exception
> OSError: [Errno 8] Exec format error

Did you added the #!/bin/sh ?

You can also try --KernelManager.kernel_cmd="['sh','/path/to/simple_kernel.sh', '{connection_file}']"

> 
> I then tried to to create a profile:
> 
> $ ipython profile create simple_kernel
> 
> And edited ~/.config/ipython/profile_simple_kernel/ipython_config.py to include:
> c = get_config()
> c.Application.verbose_crash=True
> c.InteractiveShellApp.code_to_run =
> '/home/dblank/Desktop/IPython/simple_kernel.sh'

I doubt that code_to_run what what you were looking for, here it should be `KernelManager.kernel_cmd` again.
 -- 
M
> 
> and run:
> 
> $ ipython console --profile simple_kernel
> 
> But nothing happens--just runs with no output. Any suggestions about
> what is wrong, or how to proceed?
> 
> -Doug
> 



From doug.blank at gmail.com  Fri Jan 17 11:00:12 2014
From: doug.blank at gmail.com (Doug Blank)
Date: Fri, 17 Jan 2014 11:00:12 -0500
Subject: [IPython-dev] Simple Kernel Example
In-Reply-To: <F7012B6C-C389-4C76-AA78-7F6F93105DDE@gmail.com>
References: <1389910739647-5044217.post@n6.nabble.com>
	<CAAusYCgGH9_05baF1fvK3OYdYp4Fj8vyf814QfSUDWfF_5NTgA@mail.gmail.com>
	<F7012B6C-C389-4C76-AA78-7F6F93105DDE@gmail.com>
Message-ID: <CAAusYChaM7YWCPMSTAdF7fj1c85WuAVn7a_0ne+VddQck=rx-A@mail.gmail.com>

On Fri, Jan 17, 2014 at 10:41 AM, Matthias BUSSONNIER
<bussonniermatthias at gmail.com> wrote:
> Hi Doug,
>
> an old node kernel I wrote
>
> http://nbviewer.ipython.org/gist/Carreau/4279371/node-kernel.ipynb

Thanks! I had seen that, but missed the kernel.js file before... I see
that you have a link to that.

I figured out the issue:

> And responses to your question :
>
> Le 17 janv. 2014 ? 06:36, Doug Blank a ?crit :
>
>> Thanks to all for the pointers so far! I haven't gotten any of the
>> other languages to work yet (I've sent each responder a message
>> detailing what problems I am having. I'll report back here with status
>> on those fronts.)
>>
>> I see that I should be able to:
>>
>> $ ipython console
>> --KernelManager.kernel_cmd="['/path/to/simple_kernel.sh',
>> '{connection_file}']"
>>
>> where simple_kernel.sh (with chmod +x) is just a simple echo (to see
>> if it is working).
>>
>> But that gives:
>> ...
>>  File "/usr/local/lib/python2.7/dist-packages/IPython/kernel/manager.py",
>> line 161, in _launch_kernel
>>    return launch_kernel(kernel_cmd, **kw)
>>  File "/usr/local/lib/python2.7/dist-packages/IPython/kernel/launcher.py",
>> line 251, in launch_kernel
>>    stdin=_stdin, stdout=_stdout, stderr=_stderr, cwd=cwd, env=os.environ)
>>  File "/usr/lib/python2.7/subprocess.py", line 709, in __init__
>>    errread, errwrite)
>>  File "/usr/lib/python2.7/subprocess.py", line 1326, in _execute_child
>>    raise child_exception
>> OSError: [Errno 8] Exec format error
>
> Did you added the #!/bin/sh ?
>
> You can also try --KernelManager.kernel_cmd="['sh','/path/to/simple_kernel.sh', '{connection_file}']"

I traced the Python to see what the issue was, and Popen requires that
you set shell=True if you want the shell to run the cmd. But your
alternate kernel_cmd worked!

Now, to see if I can put together a simple_kernel.py or see if the
kernel.js will work...

-Doug

>>
>> I then tried to to create a profile:
>>
>> $ ipython profile create simple_kernel
>>
>> And edited ~/.config/ipython/profile_simple_kernel/ipython_config.py to include:
>> c = get_config()
>> c.Application.verbose_crash=True
>> c.InteractiveShellApp.code_to_run =
>> '/home/dblank/Desktop/IPython/simple_kernel.sh'
>
> I doubt that code_to_run what what you were looking for, here it should be `KernelManager.kernel_cmd` again.
>  --
> M
>>
>> and run:
>>
>> $ ipython console --profile simple_kernel
>>
>> But nothing happens--just runs with no output. Any suggestions about
>> what is wrong, or how to proceed?
>>
>> -Doug
>>
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev


From doug.blank at gmail.com  Fri Jan 17 11:40:10 2014
From: doug.blank at gmail.com (Doug Blank)
Date: Fri, 17 Jan 2014 11:40:10 -0500
Subject: [IPython-dev] Simple Kernel Example
In-Reply-To: <F7012B6C-C389-4C76-AA78-7F6F93105DDE@gmail.com>
References: <1389910739647-5044217.post@n6.nabble.com>
	<CAAusYCgGH9_05baF1fvK3OYdYp4Fj8vyf814QfSUDWfF_5NTgA@mail.gmail.com>
	<F7012B6C-C389-4C76-AA78-7F6F93105DDE@gmail.com>
Message-ID: <CAAusYCjcY71E+zKLWw8yPVCvZ=CKviHaQORivQMOQqEWM7Gqrg@mail.gmail.com>

On Fri, Jan 17, 2014 at 10:41 AM, Matthias BUSSONNIER
<bussonniermatthias at gmail.com> wrote:
> I doubt that code_to_run what what you were looking for, here it should be `KernelManager.kernel_cmd` again.

For future generations: you need "from IPython.kernel import
KernelManager" in the ipython_config.py in oder to access the
KernelManager.

-Doug


From bussonniermatthias at gmail.com  Fri Jan 17 11:50:48 2014
From: bussonniermatthias at gmail.com (Matthias BUSSONNIER)
Date: Fri, 17 Jan 2014 08:50:48 -0800
Subject: [IPython-dev] Simple Kernel Example
In-Reply-To: <CAAusYCjcY71E+zKLWw8yPVCvZ=CKviHaQORivQMOQqEWM7Gqrg@mail.gmail.com>
References: <1389910739647-5044217.post@n6.nabble.com>
	<CAAusYCgGH9_05baF1fvK3OYdYp4Fj8vyf814QfSUDWfF_5NTgA@mail.gmail.com>
	<F7012B6C-C389-4C76-AA78-7F6F93105DDE@gmail.com>
	<CAAusYCjcY71E+zKLWw8yPVCvZ=CKviHaQORivQMOQqEWM7Gqrg@mail.gmail.com>
Message-ID: <B0A484CF-76C2-4235-9410-84A517A1978E@gmail.com>


Le 17 janv. 2014 ? 08:40, Doug Blank a ?crit :

> On Fri, Jan 17, 2014 at 10:41 AM, Matthias BUSSONNIER
> <bussonniermatthias at gmail.com> wrote:
>> I doubt that code_to_run what what you were looking for, here it should be `KernelManager.kernel_cmd` again.
> 
> For future generations: you need "from IPython.kernel import
> KernelManager" in the ipython_config.py in oder to access the
> KernelManager.

No you don't. 
If if you did you will have unexpected side effect. 
So you should never import anything in your config (unless you like
 killing kittens and burning trees). 

What I wrote the "c." was implicit. 
As long as you have c = import_config() and whatever at top, 

c.Whatever.something = "other thing"  (should) always works.

hence your config file should look like :

c.KernelManager.kernel_cmd = ['executable','{connexion_file}']
-- 
M

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



From doug.blank at gmail.com  Fri Jan 17 12:11:55 2014
From: doug.blank at gmail.com (Doug Blank)
Date: Fri, 17 Jan 2014 12:11:55 -0500
Subject: [IPython-dev] Simple Kernel Example
In-Reply-To: <B0A484CF-76C2-4235-9410-84A517A1978E@gmail.com>
References: <1389910739647-5044217.post@n6.nabble.com>
	<CAAusYCgGH9_05baF1fvK3OYdYp4Fj8vyf814QfSUDWfF_5NTgA@mail.gmail.com>
	<F7012B6C-C389-4C76-AA78-7F6F93105DDE@gmail.com>
	<CAAusYCjcY71E+zKLWw8yPVCvZ=CKviHaQORivQMOQqEWM7Gqrg@mail.gmail.com>
	<B0A484CF-76C2-4235-9410-84A517A1978E@gmail.com>
Message-ID: <CAAusYCg_5y5T3cjXUPPUyx12zCDwDFvic9PDjV2XUjrUSX+guA@mail.gmail.com>

On Fri, Jan 17, 2014 at 11:50 AM, Matthias BUSSONNIER
<bussonniermatthias at gmail.com> wrote:
>
> Le 17 janv. 2014 ? 08:40, Doug Blank a ?crit :
>
>> On Fri, Jan 17, 2014 at 10:41 AM, Matthias BUSSONNIER
>> <bussonniermatthias at gmail.com> wrote:
>>> I doubt that code_to_run what what you were looking for, here it should be `KernelManager.kernel_cmd` again.
>>
>> For future generations: you need "from IPython.kernel import
>> KernelManager" in the ipython_config.py in oder to access the
>> KernelManager.
>
> No you don't.
> If if you did you will have unexpected side effect.
> So you should never import anything in your config (unless you like
>  killing kittens and burning trees).
>
> What I wrote the "c." was implicit.
> As long as you have c = import_config() and whatever at top,
>
> c.Whatever.something = "other thing"  (should) always works.
>
> hence your config file should look like :
>
> c.KernelManager.kernel_cmd = ['executable','{connexion_file}']

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.

-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


From asmeurer at gmail.com  Fri Jan 17 17:21:13 2014
From: asmeurer at gmail.com (Aaron Meurer)
Date: Fri, 17 Jan 2014 16:21:13 -0600
Subject: [IPython-dev] iPython binary wheels for OS-X
In-Reply-To: <CAKgW=6JcuY-p0JK80WMAFRhgiMrFo0M1JVpMaqpJZ6b3bqTPgA@mail.gmail.com>
References: <CALGmxE+dti2qkD=xoKnQ=J4O-UonQX0DeJrnCWY_fk8fcQi4tA@mail.gmail.com>
	<CAHNn8BUqMhTftDKqichNB+MyRAAeP=KmzccRcLDBfaWFJPr9ZQ@mail.gmail.com>
	<CALGmxELrvPVory8YtMakcV+H0ErzngeOu2Hr8DXmmk=2D5S+Gw@mail.gmail.com>
	<CAKgW=6+aBtinWZwhivm9ZxcEMsrdpoum1_Ggs4KrKdBLurOmAw@mail.gmail.com>
	<-5064963750921577331@unknownmsgid>
	<CACac1F8E1ioEKLyppZJr9-E-LUiML0k+4ofrnYdz_D5zEqqr-Q@mail.gmail.com>
	<CALGmxEJi3Ze08PSFCRvxqcXF_GNdVTG5eV=XL0TnFSnFKTXmKA@mail.gmail.com>
	<CAKgW=6+Wn5YPBnE8ukNGtT=vzyE9cqgqTaJAz7tb2_bFForA8g@mail.gmail.com>
	<CALGmxEJgucNeRkAuAWt5yN0DzGfAfKHOWnkBRdNNvj3X9Nap7g@mail.gmail.com>
	<CAKgW=6JYMR6h-C-=S1uPqfyRxeCgGFjWQsTEOZ7o-EuEV_Pxtw@mail.gmail.com>
	<CAHNn8BVdENWWVn5fJxj2YqoBUQrrSu_y5s5LkJwYogy-1uzU6w@mail.gmail.com>
	<CACac1F-=xixntgnuFzRrsRSqMos13kmpru8vV8ebyEJuwgGqOw@mail.gmail.com>
	<CALGmxEK2F+ufFzcgG4Z7WXtpnwipu4f2W9=dKa45L0xXp1jeyw@mail.gmail.com>
	<-3725129708364469899@unknownmsgid>
	<CALGmxEKb8bZA6C0Mxh9XLF16C1E6MWQ9vZFzO0mXnWrDSMPjWA@mail.gmail.com>
	<CAKgW=6JcuY-p0JK80WMAFRhgiMrFo0M1JVpMaqpJZ6b3bqTPgA@mail.gmail.com>
Message-ID: <CAKgW=6LBJuy6Wzz673Jm=Yg_tG2JEjqmRoveKw8cG=6oOdBaaQ@mail.gmail.com>

On Tue, Dec 10, 2013 at 12:19 AM, Aaron Meurer <asmeurer at gmail.com> wrote:
>>  pyreadline really should use a different name, and then ipython could simply depend on that.
>
> +1. There are several instances of third party modules "rewriting"
> standard library modules for whatever reason (urllib3, regex, tulip).
> In all cases, they just use different names, and leave it up to the
> libraries that use them to choose them over the stdlib versions.
>
> On Mon, Dec 9, 2013 at 9:48 PM, Chris Barker <chris.barker at noaa.gov> wrote:
>> On Mon, Dec 9, 2013 at 7:02 PM, Aaron Meurer <asmeurer at gmail.com> wrote:
>>>
>>> Too bad about the licensing of readline, but maybe it would actually be
>>> better if core python simple used an appropriately licenced library and
>>> bundles that -- i.e. libedit, though I guess it really isn't as good.
>>>
>>>
>>> I had thought or was liberally licensed, but now I'm not so sure. PyPI
>>> lists it as both GPL and PSF. I guess we should ask the author.
>>>
>> the readline lib itself is GPL -- in fact it's used an example by teh FSF
>> for why you should license things that way -- even libraries.
>>
>> I suspect that readline itself is GPL. and the Python wrappers are PSF --
>> which makes the whole thing GPL once you actually use it....Which readline
>> itself is not in the python source tree, and why it's not on the Mac.
>>
>> -Chris
>
> I asked at https://github.com/stefanholek/rl/issues/9 so we can find
> out for sure.

According to the author, the code is GPL or PSF, your choice.

Aaron Meurer

>
> Aaron Meurer
>
>>
>>
>>
>>
>>>
>>> Aaron Meurer
>>>
>>>
>>> -Chris
>>>
>>>
>>>
>>>
>>>>
>>>> Maybe Python should just not build the builtin readline if all
>>>> it has available is libedit - has any OSX user had this discussion
>>>> with the core team?
>>>>
>>>> Paul
>>>> _______________________________________________
>>>> IPython-dev mailing list
>>>> IPython-dev at scipy.org
>>>> http://mail.scipy.org/mailman/listinfo/ipython-dev
>>>
>>>
>>>
>>>
>>> --
>>>
>>> Christopher Barker, Ph.D.
>>> Oceanographer
>>>
>>> Emergency Response Division
>>> NOAA/NOS/OR&R            (206) 526-6959   voice
>>> 7600 Sand Point Way NE   (206) 526-6329   fax
>>> Seattle, WA  98115       (206) 526-6317   main reception
>>>
>>> Chris.Barker at noaa.gov
>>>
>>> _______________________________________________
>>> 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
>>>
>>
>>
>>
>> --
>>
>> Christopher Barker, Ph.D.
>> Oceanographer
>>
>> Emergency Response Division
>> NOAA/NOS/OR&R            (206) 526-6959   voice
>> 7600 Sand Point Way NE   (206) 526-6329   fax
>> Seattle, WA  98115       (206) 526-6317   main reception
>>
>> Chris.Barker at noaa.gov
>>
>> _______________________________________________
>> IPython-dev mailing list
>> IPython-dev at scipy.org
>> http://mail.scipy.org/mailman/listinfo/ipython-dev
>>


From chris.barker at noaa.gov  Fri Jan 17 17:37:54 2014
From: chris.barker at noaa.gov (Chris Barker)
Date: Fri, 17 Jan 2014 14:37:54 -0800
Subject: [IPython-dev] iPython binary wheels for OS-X
In-Reply-To: <CAKgW=6LBJuy6Wzz673Jm=Yg_tG2JEjqmRoveKw8cG=6oOdBaaQ@mail.gmail.com>
References: <CALGmxE+dti2qkD=xoKnQ=J4O-UonQX0DeJrnCWY_fk8fcQi4tA@mail.gmail.com>
	<CAHNn8BUqMhTftDKqichNB+MyRAAeP=KmzccRcLDBfaWFJPr9ZQ@mail.gmail.com>
	<CALGmxELrvPVory8YtMakcV+H0ErzngeOu2Hr8DXmmk=2D5S+Gw@mail.gmail.com>
	<CAKgW=6+aBtinWZwhivm9ZxcEMsrdpoum1_Ggs4KrKdBLurOmAw@mail.gmail.com>
	<-5064963750921577331@unknownmsgid>
	<CACac1F8E1ioEKLyppZJr9-E-LUiML0k+4ofrnYdz_D5zEqqr-Q@mail.gmail.com>
	<CALGmxEJi3Ze08PSFCRvxqcXF_GNdVTG5eV=XL0TnFSnFKTXmKA@mail.gmail.com>
	<CAKgW=6+Wn5YPBnE8ukNGtT=vzyE9cqgqTaJAz7tb2_bFForA8g@mail.gmail.com>
	<CALGmxEJgucNeRkAuAWt5yN0DzGfAfKHOWnkBRdNNvj3X9Nap7g@mail.gmail.com>
	<CAKgW=6JYMR6h-C-=S1uPqfyRxeCgGFjWQsTEOZ7o-EuEV_Pxtw@mail.gmail.com>
	<CAHNn8BVdENWWVn5fJxj2YqoBUQrrSu_y5s5LkJwYogy-1uzU6w@mail.gmail.com>
	<CACac1F-=xixntgnuFzRrsRSqMos13kmpru8vV8ebyEJuwgGqOw@mail.gmail.com>
	<CALGmxEK2F+ufFzcgG4Z7WXtpnwipu4f2W9=dKa45L0xXp1jeyw@mail.gmail.com>
	<-3725129708364469899@unknownmsgid>
	<CALGmxEKb8bZA6C0Mxh9XLF16C1E6MWQ9vZFzO0mXnWrDSMPjWA@mail.gmail.com>
	<CAKgW=6JcuY-p0JK80WMAFRhgiMrFo0M1JVpMaqpJZ6b3bqTPgA@mail.gmail.com>
	<CAKgW=6LBJuy6Wzz673Jm=Yg_tG2JEjqmRoveKw8cG=6oOdBaaQ@mail.gmail.com>
Message-ID: <CALGmxEK+0WRU-o0bTery2jekEN3n4ySu5XtD_LRJ0WExtb5=Yg@mail.gmail.com>

On Fri, Jan 17, 2014 at 2:21 PM, Aaron Meurer <asmeurer at gmail.com> wrote:

> > I asked at https://github.com/stefanholek/rl/issues/9 so we can find
> > out for sure.
>
> According to the author, the code is GPL or PSF, your choice.


IANAL, and all that, but The whole point of the GPL is that anything linked
against a GPL lib has to be GPL. So while the pyreadline code itself may be
PSF (so you could re-use it for something else, like writing a wrapper for
some readline-like lib), once you link against readline, it's GPL.

So for practical purposes pyreadline is GPL.

-Chris

-- 

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140117/9d0b58c4/attachment.html>

From chris.barker at noaa.gov  Fri Jan 17 17:57:06 2014
From: chris.barker at noaa.gov (Chris Barker)
Date: Fri, 17 Jan 2014 14:57:06 -0800
Subject: [IPython-dev] iPython binary wheels for OS-X
In-Reply-To: <CAHNn8BUXN_YwH2ofFTES49dDxCDvfU1yM7K5duugSqvh4hph0A@mail.gmail.com>
References: <CALGmxE+dti2qkD=xoKnQ=J4O-UonQX0DeJrnCWY_fk8fcQi4tA@mail.gmail.com>
	<CAHNn8BUqMhTftDKqichNB+MyRAAeP=KmzccRcLDBfaWFJPr9ZQ@mail.gmail.com>
	<CALGmxELrvPVory8YtMakcV+H0ErzngeOu2Hr8DXmmk=2D5S+Gw@mail.gmail.com>
	<CAKgW=6+aBtinWZwhivm9ZxcEMsrdpoum1_Ggs4KrKdBLurOmAw@mail.gmail.com>
	<-5064963750921577331@unknownmsgid>
	<CACac1F8E1ioEKLyppZJr9-E-LUiML0k+4ofrnYdz_D5zEqqr-Q@mail.gmail.com>
	<CALGmxEJi3Ze08PSFCRvxqcXF_GNdVTG5eV=XL0TnFSnFKTXmKA@mail.gmail.com>
	<CAKgW=6+Wn5YPBnE8ukNGtT=vzyE9cqgqTaJAz7tb2_bFForA8g@mail.gmail.com>
	<CALGmxEJgucNeRkAuAWt5yN0DzGfAfKHOWnkBRdNNvj3X9Nap7g@mail.gmail.com>
	<CAKgW=6JYMR6h-C-=S1uPqfyRxeCgGFjWQsTEOZ7o-EuEV_Pxtw@mail.gmail.com>
	<CAHNn8BVdENWWVn5fJxj2YqoBUQrrSu_y5s5LkJwYogy-1uzU6w@mail.gmail.com>
	<CACac1F-=xixntgnuFzRrsRSqMos13kmpru8vV8ebyEJuwgGqOw@mail.gmail.com>
	<CALGmxEJUqRqcc5+iEaYJN_ULyH8QVY=tcSM_b7zkzqJZPzWNaw@mail.gmail.com>
	<CAHNn8BWLwzfiSJ_bsy5nqTZaucqNJt4+Rhsw-vMLpkFm9C-v-Q@mail.gmail.com>
	<CACac1F-J3UsipJfa_a9Yvk9TQ+P6TKJs+Aw6Q2dk=Beb_-7vBg@mail.gmail.com>
	<-4721714428654618378@unknownmsgid>
	<CAHNn8BUXN_YwH2ofFTES49dDxCDvfU1yM7K5duugSqvh4hph0A@mail.gmail.com>
Message-ID: <CALGmxEK-+5u=J6ndkj4Q+iPKKH6RkwFy5qj82tGe3UuNuZLm1A@mail.gmail.com>

On Tue, Dec 10, 2013 at 10:36 AM, MinRK <benjaminrk at gmail.com> wrote:

> On Tue, Dec 10, 2013 at 8:03 AM, Chris Barker - NOAA Federal <
> chris.barker at noaa.gov> wrote:
>
>> Or should fix -- people shouldn't be messing with the system python
>> anyway,
>>
>
> This is what's so frustrating - the System Python isn't touched at all,
> nothing is "messed with", unless by "messed with", you just mean "used at
> all".
>

The problem is that you can do a lot with the system python without
"messing with" it, but you can't do everything with it. We've been dealing
with this for years and discussed it many times on the python-mac SIG, and
have always come to the conclusion that it was better to recommend  that
people leave the system one alone, and start our with an alternative python
installation and go from there.

This is much easier for users than encouraging them to use the system
python, get a bunch of stuff installed and working with it, then hit a
roadblock and have to start all over again with a new python install.

Also -- it's hard enough to get package maintainers to build binaries --
having one python build to support is a really good idea, and the Apple one
can can't be used for everything, so it not a good option.

imagine it is feasible there. It seems absurd that Python's packaging and
> import system is so bad that installing a duplicate Python is the only
> answer to *completely nondestructive installation of a package*.
>

well, with virtualenv these days, *maybe* we could recommend it, but I'm
pretty wary -- and that still wouldn't let you re-distribute with py2app or
upgrade python itself.

Would you say that nobody should be messing with system Python on Linux by
> doing a `--user` install of a package, or even a regular system-wide pip
> install?
>

It's been a while for me,  but Back in the Day, RedHat was very sensitive
to touching the system python -- even worse, you couldn't have another
"python" on your path at all!

But another difference there is that for the most part, the distros are
upgrading python itself as bug-fix releases come out, and don't have the
same restrictions on re-distribution.

On linux, system `dist-packages` are lower priority than `site-packages`. I
> don't think there is anything different about Extras on OS X.
>

on my OS-X 10.7 system, Apple Python 2.7.1 (note only *.*.1 -- hasn't been
upgraded in a long time!):

/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python

is before

 /Library/Python/2.7/site-packages

and there is a lot of Apple installed stuff in Extras.

So you'd need to replace stuff in Extras if you  wanted it to be found,
unless you are messing with sys.path.

Also -- still a bit confused about what Extras is supposed to be, but it
seems to me that any time you install a newer version of a package such
that it can be found without messing with sys.path, then any script using
that python will be subject to that upgrade -- that is "messing with" the
system python.

-Chris


-- 

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140117/a0498372/attachment.html>

From doug.blank at gmail.com  Sat Jan 18 08:58:11 2014
From: doug.blank at gmail.com (Doug Blank)
Date: Sat, 18 Jan 2014 08:58:11 -0500
Subject: [IPython-dev] Simple Kernel Example
In-Reply-To: <1389910739647-5044217.post@n6.nabble.com>
References: <1389910739647-5044217.post@n6.nabble.com>
Message-ID: <CAAusYCg_fSsm61EM2PQxf+ud2iZOYu85XpXYf+vb16qTOMLVYA@mail.gmail.com>

Thanks to the many pointers, I have the start of a simple_kernel.py:

https://github.com/dsblank/simple_kernel

It doesn't actually work yet. My goal is to develop a simple example
that people would find useful to translate into other languages. So,
trying not to use too many Python-specific options.

If you see something that I'm doing wrong, or have suggestions to make
it a better example, please let me know, or fork it and fix.

Thanks!

-Doug

On Thu, Jan 16, 2014 at 5:18 PM, Doug Blank <doug.blank at gmail.com> wrote:
> Hello devs,
>
> I've looked at the IPython docs, and IHaskell, IJulia, and IRuby backends,
> but having a bit of trouble seeing exactly what needs to be done to create a
> new kernel. I assume that a kernel could be an executable in any language
> that receives a filename whose contents are the configuration items (like
> port numbers). Then, I guess, it starts up threads to listen to those ports
> handling XMP data.
>
> If there were a simple HelloWorld-type kernel, that would be very helpful.
> For example, just a hello.py file that listened to the right ports, and
> returned an effective response of "Ok" (without doing anything) would be
> enough to get me started.
>
> Is there anything similar to that?
>
> Thanks for any help or pointers!
>
> -Doug
>
>
>
>
> --
> View this message in context: http://python.6.x6.nabble.com/Simple-Kernel-Example-tp5044217.html
> Sent from the IPython - Development mailing list archive at Nabble.com.
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev


From alessandro.gagliardi at glassdoor.com  Sun Jan 19 07:17:11 2014
From: alessandro.gagliardi at glassdoor.com (Alessandro Gagliardi)
Date: Sun, 19 Jan 2014 12:17:11 +0000
Subject: [IPython-dev] Pushing data from engine to engine in IPython.parallel
Message-ID: <CF0102C2.3BAA%alessandro.gagliardi@glassdoor.com>

Is there a way to push data directly from one engine to another (i.e. without going through the controller)?

I was thinking of trying to make a very simple shuffle (a la Hadoop). I don?t really know how Hadoop does it, so I made a guess and came up with the following:

%%px
from IPython.parallel import Client
c = Client()

c[:]['partition_results'] = []

for k1, v1 in map_results:
    c[hash(k1) % len(c.ids)]['partition_results'] += (k1, v1)

I?ve had some success using Client() in this way from the engines (for example:

%%px ?t 0
from IPython.parallel import Client
c = Client()
c[1][?foo?] = 1

%%px ?t 1
foo

Out[1:0]: 1

But when I try the partitioning code, it hangs. This is clearly not the right way to do it. Maybe there is no right way to do it from how IPython.parallel is designed. But I figured if it can processes DAGs then it should be able to do this. I?m probably looking at it the wrong way.

Thanks in advance,
-Alessandro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140119/4234744c/attachment.html>

From mocalvao at gmail.com  Sun Jan 19 09:00:11 2014
From: mocalvao at gmail.com (Mauricio Calvao)
Date: Sun, 19 Jan 2014 12:00:11 -0200
Subject: [IPython-dev] paste magic command not working
Message-ID: <CAJoTPwzj6b6t3zb1ymBcktUpiTtCpABZt2c7UFP-eRj3cOqw0Q@mail.gmail.com>

Hi there,

I used to have a working ipython environment, including the qtconsole and
notebook, besides the command line. After a dist-upgrade of my Debian,
everything still seems to be working fine, except for the paste magic
command, which issues the message:

In [1]: paste
---------------------------------------------------------------------------
UnboundLocalError                         Traceback (most recent call last)
<ipython-input-1-84f91d8a6054> in <module>()
----> 1 get_ipython().magic(u'paste ')

/usr/lib/python2.7/dist-packages/IPython/core/interactiveshell.pyc in
magic(self, arg_s)
   2170         magic_name, _, magic_arg_s = arg_s.partition(' ')
   2171         magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
-> 2172         return self.run_line_magic(magic_name, magic_arg_s)
   2173
   2174
#-------------------------------------------------------------------------

/usr/lib/python2.7/dist-packages/IPython/core/interactiveshell.pyc in
run_line_magic(self, magic_name, line)
   2091                 kwargs['local_ns'] =
sys._getframe(stack_depth).f_locals
   2092             with self.builtin_trap:
-> 2093                 result = fn(*args,**kwargs)
   2094             return result
   2095

/usr/lib/python2.7/dist-packages/IPython/terminal/interactiveshell.pyc in
paste(self, parameter_s)

/usr/lib/python2.7/dist-packages/IPython/core/magic.pyc in <lambda>(f, *a,
**k)
    189     # but it's overkill for just that one bit of state.
    190     def magic_deco(arg):
--> 191         call = lambda f, *a, **k: f(*a, **k)
    192
    193         if callable(arg):

/usr/lib/python2.7/dist-packages/IPython/terminal/interactiveshell.pyc in
paste(self, parameter_s)
    216             return
    217         try:
--> 218             block = self.shell.hooks.clipboard_get()
    219         except TryNext as clipboard_exc:
    220             message = getattr(clipboard_exc, 'args')

/usr/lib/python2.7/dist-packages/IPython/core/hooks.pyc in __call__(self,
*args, **kw)
    130             #print "prio",prio,"cmd",cmd #dbg
    131             try:
--> 132                 return cmd(*args, **kw)
    133             except TryNext as exc:
    134                 last_exc = exc

/usr/lib/python2.7/dist-packages/IPython/core/hooks.pyc in
clipboard_get(self)
    221     for func in chain:
    222         dispatcher.add(func)
--> 223     text = dispatcher()
    224     return text

/usr/lib/python2.7/dist-packages/IPython/core/hooks.pyc in __call__(self,
*args, **kw)
    130             #print "prio",prio,"cmd",cmd #dbg
    131             try:
--> 132                 return cmd(*args, **kw)
    133             except TryNext as exc:
    134                 last_exc = exc

/usr/lib/python2.7/dist-packages/IPython/lib/clipboard.pyc in
tkinter_clipboard_get()
     51     text = root.clipboard_get()
     52     root.destroy()
---> 53     text = py3compat.cast_unicode(text, py3compat.DEFAULT_ENCODING)
     54     return text
     55

UnboundLocalError: local variable 'py3compat' referenced before assignment

In [2]: can't invoke "event" command:  application has been destroyed
    while executing
"event generate $w <<ThemeChanged>>"
    (procedure "ttk::ThemeChanged" line 6)
    invoked from within
"ttk::ThemeChanged"


In [2]:



after I try to paste the simple line:

   import numpy as np


My Python and Ipython versions are:

orca at andromeda:~$ ipython
Python 2.7.6 (default, Jan 11 2014, 14:34:26)
Type "copyright", "credits" or "license" for more information.

IPython 1.1.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.


Any suggestions please?

Regards!


-- 
#######################################
Prof. Mauricio Ortiz Calvao
Federal University of Rio de Janeiro
Institute of Physics, P O Box 68528
CEP 21941-972 Rio de Janeiro, RJ
Brazil

Email: orca at if.ufrj.br
Phone: (55)(21)25627483
Homepage: http://www.if.ufrj.br/~orca
#######################################
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140119/ae444388/attachment.html>

From doug.blank at gmail.com  Sun Jan 19 10:49:31 2014
From: doug.blank at gmail.com (Doug Blank)
Date: Sun, 19 Jan 2014 10:49:31 -0500
Subject: [IPython-dev] Simple Kernel Example
In-Reply-To: <CAAusYCg_fSsm61EM2PQxf+ud2iZOYu85XpXYf+vb16qTOMLVYA@mail.gmail.com>
References: <1389910739647-5044217.post@n6.nabble.com>
	<CAAusYCg_fSsm61EM2PQxf+ud2iZOYu85XpXYf+vb16qTOMLVYA@mail.gmail.com>
Message-ID: <CAAusYCjNJnDRbsuz7QPTAr4aKbY6-65QZ+D62MMQY0XjG+zHxA@mail.gmail.com>

I believe that the simple_kernel.py is close to working, but I unable
to get it to report a result back to the frontend so far. I believe
that I have everything in place (signatures, serialized components,
sockets, etc.) but I had to deviate from the IPython sources somewhat
(for example, using bind rather than connect) so I might have
mistakes.

https://github.com/dsblank/simple_kernel/blob/master/simple_kernel.py

I'd very much appreciate any suggestions, especially if you are able
to provide specific changes, or even patches. I'm stuck on what could
be the matter, and have tried pretty much everything I can think of.

Thanks!

-Doug

On Sat, Jan 18, 2014 at 8:58 AM, Doug Blank <doug.blank at gmail.com> wrote:
> Thanks to the many pointers, I have the start of a simple_kernel.py:
>
> https://github.com/dsblank/simple_kernel
>
> It doesn't actually work yet. My goal is to develop a simple example
> that people would find useful to translate into other languages. So,
> trying not to use too many Python-specific options.
>
> If you see something that I'm doing wrong, or have suggestions to make
> it a better example, please let me know, or fork it and fix.
>
> Thanks!
>
> -Doug
>
> On Thu, Jan 16, 2014 at 5:18 PM, Doug Blank <doug.blank at gmail.com> wrote:
>> Hello devs,
>>
>> I've looked at the IPython docs, and IHaskell, IJulia, and IRuby backends,
>> but having a bit of trouble seeing exactly what needs to be done to create a
>> new kernel. I assume that a kernel could be an executable in any language
>> that receives a filename whose contents are the configuration items (like
>> port numbers). Then, I guess, it starts up threads to listen to those ports
>> handling XMP data.
>>
>> If there were a simple HelloWorld-type kernel, that would be very helpful.
>> For example, just a hello.py file that listened to the right ports, and
>> returned an effective response of "Ok" (without doing anything) would be
>> enough to get me started.
>>
>> Is there anything similar to that?
>>
>> Thanks for any help or pointers!
>>
>> -Doug
>>
>>
>>
>>
>> --
>> View this message in context: http://python.6.x6.nabble.com/Simple-Kernel-Example-tp5044217.html
>> Sent from the IPython - Development mailing list archive at Nabble.com.
>> _______________________________________________
>> IPython-dev mailing list
>> IPython-dev at scipy.org
>> http://mail.scipy.org/mailman/listinfo/ipython-dev


From bussonniermatthias at gmail.com  Sun Jan 19 12:47:48 2014
From: bussonniermatthias at gmail.com (Matthias BUSSONNIER)
Date: Sun, 19 Jan 2014 18:47:48 +0100
Subject: [IPython-dev] paste magic command not working
In-Reply-To: <CAJoTPwzj6b6t3zb1ymBcktUpiTtCpABZt2c7UFP-eRj3cOqw0Q@mail.gmail.com>
References: <CAJoTPwzj6b6t3zb1ymBcktUpiTtCpABZt2c7UFP-eRj3cOqw0Q@mail.gmail.com>
Message-ID: <3AD13E3C-8B7A-4CDF-B7BA-1FB85BD51EC4@gmail.com>

Hi, 

You can open an issue on github, but the py3compat import is here on 1.1.0:

https://github.com/ipython/ipython/blob/rel-1.1.0/IPython/lib/clipboard.py#L7

Could you have stale .pyc cache or things like that ? 

-- 
M

Le 19 janv. 2014 ? 15:00, Mauricio Calvao a ?crit :

> Hi there,
> 
> I used to have a working ipython environment, including the qtconsole and notebook, besides the command line. After a dist-upgrade of my Debian, everything still seems to be working fine, except for the paste magic command, which issues the message:
> 
> In [1]: paste
> ---------------------------------------------------------------------------
> UnboundLocalError                         Traceback (most recent call last)
> <ipython-input-1-84f91d8a6054> in <module>()
> ----> 1 get_ipython().magic(u'paste ')
> 
> /usr/lib/python2.7/dist-packages/IPython/core/interactiveshell.pyc in magic(self, arg_s)
>    2170         magic_name, _, magic_arg_s = arg_s.partition(' ')
>    2171         magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
> -> 2172         return self.run_line_magic(magic_name, magic_arg_s)
>    2173 
>    2174     #-------------------------------------------------------------------------
> 
> /usr/lib/python2.7/dist-packages/IPython/core/interactiveshell.pyc in run_line_magic(self, magic_name, line)
>    2091                 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
>    2092             with self.builtin_trap:
> -> 2093                 result = fn(*args,**kwargs)
>    2094             return result
>    2095 
> 
> /usr/lib/python2.7/dist-packages/IPython/terminal/interactiveshell.pyc in paste(self, parameter_s)
> 
> /usr/lib/python2.7/dist-packages/IPython/core/magic.pyc in <lambda>(f, *a, **k)
>     189     # but it's overkill for just that one bit of state.
>     190     def magic_deco(arg):
> --> 191         call = lambda f, *a, **k: f(*a, **k)
>     192 
>     193         if callable(arg):
> 
> /usr/lib/python2.7/dist-packages/IPython/terminal/interactiveshell.pyc in paste(self, parameter_s)
>     216             return
>     217         try:
> --> 218             block = self.shell.hooks.clipboard_get()
>     219         except TryNext as clipboard_exc:
>     220             message = getattr(clipboard_exc, 'args')
> 
> /usr/lib/python2.7/dist-packages/IPython/core/hooks.pyc in __call__(self, *args, **kw)
>     130             #print "prio",prio,"cmd",cmd #dbg
>     131             try:
> --> 132                 return cmd(*args, **kw)
>     133             except TryNext as exc:
>     134                 last_exc = exc
> 
> /usr/lib/python2.7/dist-packages/IPython/core/hooks.pyc in clipboard_get(self)
>     221     for func in chain:
>     222         dispatcher.add(func)
> --> 223     text = dispatcher()
>     224     return text
> 
> /usr/lib/python2.7/dist-packages/IPython/core/hooks.pyc in __call__(self, *args, **kw)
>     130             #print "prio",prio,"cmd",cmd #dbg
>     131             try:
> --> 132                 return cmd(*args, **kw)
>     133             except TryNext as exc:
>     134                 last_exc = exc
> 
> /usr/lib/python2.7/dist-packages/IPython/lib/clipboard.pyc in tkinter_clipboard_get()
>      51     text = root.clipboard_get()
>      52     root.destroy()
> ---> 53     text = py3compat.cast_unicode(text, py3compat.DEFAULT_ENCODING)
>      54     return text
>      55 
> 
> UnboundLocalError: local variable 'py3compat' referenced before assignment
> 
> In [2]: can't invoke "event" command:  application has been destroyed
>     while executing
> "event generate $w <<ThemeChanged>>"
>     (procedure "ttk::ThemeChanged" line 6)
>     invoked from within
> "ttk::ThemeChanged"
> 
> 
> In [2]: 
> 
> 
> 
> after I try to paste the simple line:
> 
>    import numpy as np
> 
> 
> My Python and Ipython versions are:
> 
> orca at andromeda:~$ ipython
> Python 2.7.6 (default, Jan 11 2014, 14:34:26) 
> Type "copyright", "credits" or "license" for more information.
> 
> IPython 1.1.0 -- An enhanced Interactive Python.
> ?         -> Introduction and overview of IPython's features.
> %quickref -> Quick reference.
> help      -> Python's own help system.
> object?   -> Details about 'object', use 'object??' for extra details.
> 
> 
> Any suggestions please?
> 
> Regards!
> 
> 
> -- 
> #######################################
> Prof. Mauricio Ortiz Calvao
> Federal University of Rio de Janeiro
> Institute of Physics, P O Box 68528
> CEP 21941-972 Rio de Janeiro, RJ
> Brazil
> 
> Email: orca at if.ufrj.br
> Phone: (55)(21)25627483
> Homepage: http://www.if.ufrj.br/~orca
> #######################################
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev



From mocalvao at gmail.com  Sun Jan 19 14:20:19 2014
From: mocalvao at gmail.com (Mauricio Calvao)
Date: Sun, 19 Jan 2014 17:20:19 -0200
Subject: [IPython-dev] paste magic command not working
In-Reply-To: <3AD13E3C-8B7A-4CDF-B7BA-1FB85BD51EC4@gmail.com>
References: <CAJoTPwzj6b6t3zb1ymBcktUpiTtCpABZt2c7UFP-eRj3cOqw0Q@mail.gmail.com>
	<3AD13E3C-8B7A-4CDF-B7BA-1FB85BD51EC4@gmail.com>
Message-ID: <CAJoTPwwf5masnMhEFohn2X6uswok19yrfXMadrowzBzki=eQ=w@mail.gmail.com>

Hi Matthias

I have checked my clipboard.py file in
/usr/lib/python2.7/dist-packages/IPython/lib/. There is a new corresponding
.pyc, so I guess its staleness is not an option to explain the error.
However, I verified that in the clipboard.py file itself there is an
additional line as compared to the link you gave; it is in the fucntion
definition tkinter_clipboard_get, which is the one which must be used,
because I am in a Linux box (Debian). Explicitly, this (small) function
definition, inside clipboard.py, reads:

def tkinter_clipboard_get():
    """ Get the clipboard's text using Tkinter.

    This is the default on systems that are not Windows or OS X. It may
    interfere with other UI toolkits and should be replaced with an
    implementation that uses that toolkit.
    """
    try:
        import Tkinter
    except ImportError:
        from IPython.utils import py3compat
        raise TryNext("Getting text from the clipboard on this platform "
                      "requires the %s-tk package." % ("python3" if
py3compat.PY3 else "python"))
    root = Tkinter.Tk()
    root.withdraw()
    text = root.clipboard_get()
    root.destroy()
    text = py3compat.cast_unicode(text, py3compat.DEFAULT_ENCODING)
    return text

The additional line, nonexistent in the link you gave, is the one "from
IPython.utils import py3compat". I have now commented it out and everything
seems to be working fine again! Thanks.


On Sun, Jan 19, 2014 at 3:47 PM, Matthias BUSSONNIER <
bussonniermatthias at gmail.com> wrote:

> Hi,
>
> You can open an issue on github, but the py3compat import is here on 1.1.0:
>
>
> https://github.com/ipython/ipython/blob/rel-1.1.0/IPython/lib/clipboard.py#L7
>
> Could you have stale .pyc cache or things like that ?
>
> --
> M
>
> Le 19 janv. 2014 ? 15:00, Mauricio Calvao a ?crit :
>
> > Hi there,
> >
> > I used to have a working ipython environment, including the qtconsole
> and notebook, besides the command line. After a dist-upgrade of my Debian,
> everything still seems to be working fine, except for the paste magic
> command, which issues the message:
> >
> > In [1]: paste
> >
> ---------------------------------------------------------------------------
> > UnboundLocalError                         Traceback (most recent call
> last)
> > <ipython-input-1-84f91d8a6054> in <module>()
> > ----> 1 get_ipython().magic(u'paste ')
> >
> > /usr/lib/python2.7/dist-packages/IPython/core/interactiveshell.pyc in
> magic(self, arg_s)
> >    2170         magic_name, _, magic_arg_s = arg_s.partition(' ')
> >    2171         magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
> > -> 2172         return self.run_line_magic(magic_name, magic_arg_s)
> >    2173
> >    2174
> #-------------------------------------------------------------------------
> >
> > /usr/lib/python2.7/dist-packages/IPython/core/interactiveshell.pyc in
> run_line_magic(self, magic_name, line)
> >    2091                 kwargs['local_ns'] =
> sys._getframe(stack_depth).f_locals
> >    2092             with self.builtin_trap:
> > -> 2093                 result = fn(*args,**kwargs)
> >    2094             return result
> >    2095
> >
> > /usr/lib/python2.7/dist-packages/IPython/terminal/interactiveshell.pyc
> in paste(self, parameter_s)
> >
> > /usr/lib/python2.7/dist-packages/IPython/core/magic.pyc in <lambda>(f,
> *a, **k)
> >     189     # but it's overkill for just that one bit of state.
> >     190     def magic_deco(arg):
> > --> 191         call = lambda f, *a, **k: f(*a, **k)
> >     192
> >     193         if callable(arg):
> >
> > /usr/lib/python2.7/dist-packages/IPython/terminal/interactiveshell.pyc
> in paste(self, parameter_s)
> >     216             return
> >     217         try:
> > --> 218             block = self.shell.hooks.clipboard_get()
> >     219         except TryNext as clipboard_exc:
> >     220             message = getattr(clipboard_exc, 'args')
> >
> > /usr/lib/python2.7/dist-packages/IPython/core/hooks.pyc in
> __call__(self, *args, **kw)
> >     130             #print "prio",prio,"cmd",cmd #dbg
> >     131             try:
> > --> 132                 return cmd(*args, **kw)
> >     133             except TryNext as exc:
> >     134                 last_exc = exc
> >
> > /usr/lib/python2.7/dist-packages/IPython/core/hooks.pyc in
> clipboard_get(self)
> >     221     for func in chain:
> >     222         dispatcher.add(func)
> > --> 223     text = dispatcher()
> >     224     return text
> >
> > /usr/lib/python2.7/dist-packages/IPython/core/hooks.pyc in
> __call__(self, *args, **kw)
> >     130             #print "prio",prio,"cmd",cmd #dbg
> >     131             try:
> > --> 132                 return cmd(*args, **kw)
> >     133             except TryNext as exc:
> >     134                 last_exc = exc
> >
> > /usr/lib/python2.7/dist-packages/IPython/lib/clipboard.pyc in
> tkinter_clipboard_get()
> >      51     text = root.clipboard_get()
> >      52     root.destroy()
> > ---> 53     text = py3compat.cast_unicode(text,
> py3compat.DEFAULT_ENCODING)
> >      54     return text
> >      55
> >
> > UnboundLocalError: local variable 'py3compat' referenced before
> assignment
> >
> > In [2]: can't invoke "event" command:  application has been destroyed
> >     while executing
> > "event generate $w <<ThemeChanged>>"
> >     (procedure "ttk::ThemeChanged" line 6)
> >     invoked from within
> > "ttk::ThemeChanged"
> >
> >
> > In [2]:
> >
> >
> >
> > after I try to paste the simple line:
> >
> >    import numpy as np
> >
> >
> > My Python and Ipython versions are:
> >
> > orca at andromeda:~$ ipython
> > Python 2.7.6 (default, Jan 11 2014, 14:34:26)
> > Type "copyright", "credits" or "license" for more information.
> >
> > IPython 1.1.0 -- An enhanced Interactive Python.
> > ?         -> Introduction and overview of IPython's features.
> > %quickref -> Quick reference.
> > help      -> Python's own help system.
> > object?   -> Details about 'object', use 'object??' for extra details.
> >
> >
> > Any suggestions please?
> >
> > Regards!
> >
> >
> > --
> > #######################################
> > Prof. Mauricio Ortiz Calvao
> > Federal University of Rio de Janeiro
> > Institute of Physics, P O Box 68528
> > CEP 21941-972 Rio de Janeiro, RJ
> > Brazil
> >
> > Email: orca at if.ufrj.br
> > Phone: (55)(21)25627483
> > Homepage: http://www.if.ufrj.br/~orca
> > #######################################
> > _______________________________________________
> > 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
>



-- 
#######################################
Prof. Mauricio Ortiz Calvao
Federal University of Rio de Janeiro
Institute of Physics, P O Box 68528
CEP 21941-972 Rio de Janeiro, RJ
Brazil

Email: orca at if.ufrj.br
Phone: (55)(21)25627483
Homepage: http://www.if.ufrj.br/~orca
#######################################
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140119/acb3c600/attachment.html>

From benjaminrk at gmail.com  Sun Jan 19 15:58:37 2014
From: benjaminrk at gmail.com (MinRK)
Date: Sun, 19 Jan 2014 12:58:37 -0800
Subject: [IPython-dev] Pushing data from engine to engine in
	IPython.parallel
In-Reply-To: <CF0102C2.3BAA%alessandro.gagliardi@glassdoor.com>
References: <CF0102C2.3BAA%alessandro.gagliardi@glassdoor.com>
Message-ID: <CAHNn8BWc9LFZ4ziBNv6H2=gxgy==Vzty-1PTaEpFpidbvO6tfA@mail.gmail.com>

IPython doesn?t set up inter-engine communication, but you certainly can.
There are a few
examples<https://github.com/ipython/ipython/tree/master/examples/parallel/interengine>of
inter-engine communication in the repo. IPython plays nice with MPI,
which is perhaps the simplest way to get communication set up (depending on
your environment), but you can also set up your own interconnect with
zeromq.

-MinRK

On Sun, Jan 19, 2014 at 4:17 AM, Alessandro Gagliardi <
alessandro.gagliardi at glassdoor.com> wrote:

 Is there a way to push data directly from one engine to another (i.e.
> without going through the controller)?
>
>  I was thinking of trying to make a very simple shuffle (a la Hadoop). I
> don?t really know how Hadoop does it, so I made a guess and came up with
> the following:
>
>  %%px
>
>  from IPython.parallel import Client
> c = Client()
>
>  c[:]['partition_results'] = []
>
>  for k1, v1 in map_results:
>     c[hash(k1) % len(c.ids)]['partition_results'] += (k1, v1)
>
>
>  I?ve had some success using Client() in this way from the engines (for
> example:
>
>  %%px ?t 0
>  from IPython.parallel import Client
> c = Client()
>  c[1][?foo?] = 1
>
>
>  %%px ?t 1
> foo
>
>
>  Out[1:0]: 1
>
>  But when I try the partitioning code, it hangs. This is clearly not the
> right way to do it. Maybe there is no right way to do it from
> how IPython.parallel is designed. But I figured if it can processes DAGs
> then it should be able to do this. I?m probably looking at it the wrong way.
>
>  Thanks in advance,
> -Alessandro
>
> _______________________________________________
> 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/20140119/eface0da/attachment.html>

From markbak at gmail.com  Sun Jan 19 16:18:18 2014
From: markbak at gmail.com (Mark Bakker)
Date: Sun, 19 Jan 2014 22:18:18 +0100
Subject: [IPython-dev] help with @interactive
Message-ID: <CAEX=yaYphJAusAxP53xHuxtBZHbyduPp=dQsACBPC6P41ntdRg@mail.gmail.com>

Hello List,

I am trying to do this (got this from one of Fernando's Notebooks):

@interactive( x=(0,10) )
def f(x):
    print 'x is: ',x

But I get an error:

TypeError: interactive() got an unexpected keyword argument 'x'

Any thoughts? I am running 1.0.0-2

Thanks,

Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140119/410b274d/attachment.html>

From bussonniermatthias at gmail.com  Mon Jan 20 05:52:11 2014
From: bussonniermatthias at gmail.com (Matthias BUSSONNIER)
Date: Mon, 20 Jan 2014 11:52:11 +0100
Subject: [IPython-dev] help with @interactive
In-Reply-To: <CAEX=yaYphJAusAxP53xHuxtBZHbyduPp=dQsACBPC6P41ntdRg@mail.gmail.com>
References: <CAEX=yaYphJAusAxP53xHuxtBZHbyduPp=dQsACBPC6P41ntdRg@mail.gmail.com>
Message-ID: <2B82E993-DC46-42AC-AEFF-4F51B89B3766@gmail.com>


Le 19 janv. 2014 ? 22:18, Mark Bakker a ?crit :

> Hello List,
> 
> I am trying to do this (got this from one of Fernando's Notebooks):
> 
> @interactive( x=(0,10) )
> def f(x):
>     print 'x is: ',x
> 
> But I get an error:
> 
> TypeError: interactive() got an unexpected keyword argument 'x'
> 

@interactive is still in development, and not even yet in master, 
Fernando was (most probably) using a patched version. 

> Any thoughts? I am running 1.0.0-2

Have look at  https://github.com/ipython/ipython/pull/4374
-- 
M

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

From bussonniermatthias at gmail.com  Mon Jan 20 06:09:02 2014
From: bussonniermatthias at gmail.com (Matthias BUSSONNIER)
Date: Mon, 20 Jan 2014 12:09:02 +0100
Subject: [IPython-dev] Simple Kernel Example
In-Reply-To: <CAAusYCg_5y5T3cjXUPPUyx12zCDwDFvic9PDjV2XUjrUSX+guA@mail.gmail.com>
References: <1389910739647-5044217.post@n6.nabble.com>
	<CAAusYCgGH9_05baF1fvK3OYdYp4Fj8vyf814QfSUDWfF_5NTgA@mail.gmail.com>
	<F7012B6C-C389-4C76-AA78-7F6F93105DDE@gmail.com>
	<CAAusYCjcY71E+zKLWw8yPVCvZ=CKviHaQORivQMOQqEWM7Gqrg@mail.gmail.com>
	<B0A484CF-76C2-4235-9410-84A517A1978E@gmail.com>
	<CAAusYCg_5y5T3cjXUPPUyx12zCDwDFvic9PDjV2XUjrUSX+guA@mail.gmail.com>
Message-ID: <81F7D28C-5DD2-4EBB-A863-AB4BFD441C3D@gmail.com>


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>

From a.klein at science-applied.nl  Mon Jan 20 09:14:03 2014
From: a.klein at science-applied.nl (Almar Klein)
Date: Mon, 20 Jan 2014 15:14:03 +0100
Subject: [IPython-dev] Embedding IPython in IEP
Message-ID: <CAB_T6==0BdYohuu4y9J=HtDkY10DQRqFs2-XdEO9qG2jDd86FA@mail.gmail.com>

Hi all,

I am currently working on embedding IPython in IEP (Interactive Editor for
Python - http://iep-project.org), and I am interested in getting some
feedback.

The approach that I am taking right now is to hook into IPython at a rather
low level and integrate it with relatively small changes to the existing
code-base for the IEP kernel. It basically comes down to this:

 from IPython.core.interactiveshell import InteractiveShell
self._ipython = InteractiveShell(user_module=__main__)
# set a few hooks ...
...
# When user is sending a line to execute ...
if self._ipython:

self._ipython.run_cell(source, True)

else:

self._run_cell_natively(source)


Apart from this I use custom prompts at sys.ps1 and sys ps2 to simulate the
IPython prompts, plus a handfull of small tweaks to make things work as
expected.


The kernel runs the event loop as usual and arranges for GUI integration.


So far things are looking good and everything seems to work as expected. I
was mostly wondering whether this approach has any limitations that I
overlooked, like some specific IPython feature that is not available with
this approach. Also, I would be happy to learn any specific things that I
should take into account.


Thanks in advance,

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

From bussonniermatthias at gmail.com  Mon Jan 20 09:15:24 2014
From: bussonniermatthias at gmail.com (Matthias BUSSONNIER)
Date: Mon, 20 Jan 2014 15:15:24 +0100
Subject: [IPython-dev]  paste magic command not working
In-Reply-To: <CAJoTPwwf5masnMhEFohn2X6uswok19yrfXMadrowzBzki=eQ=w@mail.gmail.com>
References: <CAJoTPwzj6b6t3zb1ymBcktUpiTtCpABZt2c7UFP-eRj3cOqw0Q@mail.gmail.com>
	<3AD13E3C-8B7A-4CDF-B7BA-1FB85BD51EC4@gmail.com>
	<CAJoTPwwf5masnMhEFohn2X6uswok19yrfXMadrowzBzki=eQ=w@mail.gmail.com>
Message-ID: <0D644F25-6430-42C0-93EF-E41070C9DE94@gmail.com>

Hi Mauricio, 

Be careful when modifying system files, your updates might not behave correctly afterwards. 
The differences between your file (debian) and original one seem to be due to a custom debian patch
 (cc jtaylor as he appears to be the author of debianize-error-messages.patch).

-- 
Matthias

Le 19 janv. 2014 ? 20:20, Mauricio Calvao a ?crit :

> Hi Matthias
> 
> I have checked my clipboard.py file in /usr/lib/python2.7/dist-packages/IPython/lib/. There is a new corresponding .pyc, so I guess its staleness is not an option to explain the error. However, I verified that in the clipboard.py file itself there is an additional line as compared to the link you gave; it is in the fucntion definition tkinter_clipboard_get, which is the one which must be used, because I am in a Linux box (Debian). Explicitly, this (small) function definition, inside clipboard.py, reads:
> 
> def tkinter_clipboard_get():
>     """ Get the clipboard's text using Tkinter.
> 
>     This is the default on systems that are not Windows or OS X. It may
>     interfere with other UI toolkits and should be replaced with an
>     implementation that uses that toolkit.
>     """
>     try:
>         import Tkinter
>     except ImportError:
>         from IPython.utils import py3compat
>         raise TryNext("Getting text from the clipboard on this platform "
>                       "requires the %s-tk package." % ("python3" if py3compat.PY3 else "python"))
>     root = Tkinter.Tk()
>     root.withdraw()
>     text = root.clipboard_get()
>     root.destroy()
>     text = py3compat.cast_unicode(text, py3compat.DEFAULT_ENCODING)
>     return text
> 
> The additional line, nonexistent in the link you gave, is the one "from IPython.utils import py3compat". I have now commented it out and everything seems to be working fine again! Thanks.
> 
> 
> On Sun, Jan 19, 2014 at 3:47 PM, Matthias BUSSONNIER <bussonniermatthias at gmail.com> wrote:
> Hi,
> 
> You can open an issue on github, but the py3compat import is here on 1.1.0:
> 
> https://github.com/ipython/ipython/blob/rel-1.1.0/IPython/lib/clipboard.py#L7
> 
> Could you have stale .pyc cache or things like that ?
> 
> --
> M
> 
> Le 19 janv. 2014 ? 15:00, Mauricio Calvao a ?crit :
> 
> > Hi there,
> >
> > I used to have a working ipython environment, including the qtconsole and notebook, besides the command line. After a dist-upgrade of my Debian, everything still seems to be working fine, except for the paste magic command, which issues the message:
> >
> > In [1]: paste
> > ---------------------------------------------------------------------------
> > UnboundLocalError                         Traceback (most recent call last)
> > <ipython-input-1-84f91d8a6054> in <module>()
> > ----> 1 get_ipython().magic(u'paste ')
> >
> > /usr/lib/python2.7/dist-packages/IPython/core/interactiveshell.pyc in magic(self, arg_s)
> >    2170         magic_name, _, magic_arg_s = arg_s.partition(' ')
> >    2171         magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
> > -> 2172         return self.run_line_magic(magic_name, magic_arg_s)
> >    2173
> >    2174     #-------------------------------------------------------------------------
> >
> > /usr/lib/python2.7/dist-packages/IPython/core/interactiveshell.pyc in run_line_magic(self, magic_name, line)
> >    2091                 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
> >    2092             with self.builtin_trap:
> > -> 2093                 result = fn(*args,**kwargs)
> >    2094             return result
> >    2095
> >
> > /usr/lib/python2.7/dist-packages/IPython/terminal/interactiveshell.pyc in paste(self, parameter_s)
> >
> > /usr/lib/python2.7/dist-packages/IPython/core/magic.pyc in <lambda>(f, *a, **k)
> >     189     # but it's overkill for just that one bit of state.
> >     190     def magic_deco(arg):
> > --> 191         call = lambda f, *a, **k: f(*a, **k)
> >     192
> >     193         if callable(arg):
> >
> > /usr/lib/python2.7/dist-packages/IPython/terminal/interactiveshell.pyc in paste(self, parameter_s)
> >     216             return
> >     217         try:
> > --> 218             block = self.shell.hooks.clipboard_get()
> >     219         except TryNext as clipboard_exc:
> >     220             message = getattr(clipboard_exc, 'args')
> >
> > /usr/lib/python2.7/dist-packages/IPython/core/hooks.pyc in __call__(self, *args, **kw)
> >     130             #print "prio",prio,"cmd",cmd #dbg
> >     131             try:
> > --> 132                 return cmd(*args, **kw)
> >     133             except TryNext as exc:
> >     134                 last_exc = exc
> >
> > /usr/lib/python2.7/dist-packages/IPython/core/hooks.pyc in clipboard_get(self)
> >     221     for func in chain:
> >     222         dispatcher.add(func)
> > --> 223     text = dispatcher()
> >     224     return text
> >
> > /usr/lib/python2.7/dist-packages/IPython/core/hooks.pyc in __call__(self, *args, **kw)
> >     130             #print "prio",prio,"cmd",cmd #dbg
> >     131             try:
> > --> 132                 return cmd(*args, **kw)
> >     133             except TryNext as exc:
> >     134                 last_exc = exc
> >
> > /usr/lib/python2.7/dist-packages/IPython/lib/clipboard.pyc in tkinter_clipboard_get()
> >      51     text = root.clipboard_get()
> >      52     root.destroy()
> > ---> 53     text = py3compat.cast_unicode(text, py3compat.DEFAULT_ENCODING)
> >      54     return text
> >      55
> >
> > UnboundLocalError: local variable 'py3compat' referenced before assignment
> >
> > In [2]: can't invoke "event" command:  application has been destroyed
> >     while executing
> > "event generate $w <<ThemeChanged>>"
> >     (procedure "ttk::ThemeChanged" line 6)
> >     invoked from within
> > "ttk::ThemeChanged"
> >
> >
> > In [2]:
> >
> >
> >
> > after I try to paste the simple line:
> >
> >    import numpy as np
> >
> >
> > My Python and Ipython versions are:
> >
> > orca at andromeda:~$ ipython
> > Python 2.7.6 (default, Jan 11 2014, 14:34:26)
> > Type "copyright", "credits" or "license" for more information.
> >
> > IPython 1.1.0 -- An enhanced Interactive Python.
> > ?         -> Introduction and overview of IPython's features.
> > %quickref -> Quick reference.
> > help      -> Python's own help system.
> > object?   -> Details about 'object', use 'object??' for extra details.
> >
> >
> > Any suggestions please?
> >
> > Regards!
> >
> >
> > --
> > #######################################
> > Prof. Mauricio Ortiz Calvao
> > Federal University of Rio de Janeiro
> > Institute of Physics, P O Box 68528
> > CEP 21941-972 Rio de Janeiro, RJ
> > Brazil
> >
> > Email: orca at if.ufrj.br
> > Phone: (55)(21)25627483
> > Homepage: http://www.if.ufrj.br/~orca
> > #######################################
> > _______________________________________________
> > 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
> 
> 
> 
> -- 
> #######################################
> Prof. Mauricio Ortiz Calvao
> Federal University of Rio de Janeiro
> Institute of Physics, P O Box 68528
> CEP 21941-972 Rio de Janeiro, RJ
> Brazil
> 
> Email: orca at if.ufrj.br
> Phone: (55)(21)25627483
> Homepage: http://www.if.ufrj.br/~orca
> #######################################
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev



From doug.blank at gmail.com  Mon Jan 20 11:08:52 2014
From: doug.blank at gmail.com (Doug Blank)
Date: Mon, 20 Jan 2014 11:08:52 -0500
Subject: [IPython-dev] Simple Kernel Example
In-Reply-To: <81F7D28C-5DD2-4EBB-A863-AB4BFD441C3D@gmail.com>
References: <1389910739647-5044217.post@n6.nabble.com>
	<CAAusYCgGH9_05baF1fvK3OYdYp4Fj8vyf814QfSUDWfF_5NTgA@mail.gmail.com>
	<F7012B6C-C389-4C76-AA78-7F6F93105DDE@gmail.com>
	<CAAusYCjcY71E+zKLWw8yPVCvZ=CKviHaQORivQMOQqEWM7Gqrg@mail.gmail.com>
	<B0A484CF-76C2-4235-9410-84A517A1978E@gmail.com>
	<CAAusYCg_5y5T3cjXUPPUyx12zCDwDFvic9PDjV2XUjrUSX+guA@mail.gmail.com>
	<81F7D28C-5DD2-4EBB-A863-AB4BFD441C3D@gmail.com>
Message-ID: <CAAusYCgpdTwQ7s0ig-B3FuzJ2MvQEPkohgO5vJWYGx9PQOTL3A@mail.gmail.com>

Thanks for the help! Of course, I'm partly giving you feedback to help
the next people that come along attempting to make a new kernel. Some
comments below:

On Mon, Jan 20, 2014 at 6:09 AM, Matthias BUSSONNIER
<bussonniermatthias at gmail.com> wrote:
>
> 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 = []

I guess that when I originally ran the "ipython profile create
simple_kernel" that I had been using IPython version 0.13 which comes
with Ubuntu 13.10. It only created the ipython_config.py. Now that I
have upgraded to 1.1, I see that there are many kernel-related items
in this new ipython_notebook_config.py. Great!

Some of the other kernels for other languages are written to use a
specific version of ipython. For example, igo apparent is written for
IPython 1.2.  This has made understanding the various examples more
difficult.

One related point of confusion I have: from this hint that you have
given, it appears that you need to have different kernels for
different frontends; is that true? I was assuming that the frontend
and the kernel could negotiate over what sockets communications were
required/optional/ignored. For example, it took me three days to
realize that the heartbeat interface is not used from the notebook
interface. Is there a way that simple_kernel.py can determine that? Or
do I need different config settings for each frontend/kernel
combination?

> Haven't looked at your simple_kernel.py yet.

I have cleaned up the code some, but as far as I can tell, nothing is working.

-Doug


From gregor.thalhammer at gmail.com  Mon Jan 20 11:59:31 2014
From: gregor.thalhammer at gmail.com (Gregor Thalhammer)
Date: Mon, 20 Jan 2014 17:59:31 +0100
Subject: [IPython-dev] rubbish null bytes at the end of ipynb file
Message-ID: <D2162E37-C6A1-41AF-BDF4-E54A26A201B2@gmail.com>

Dear developers,

sometimes it happens to me that at the very end of my notebook files null bytes (0x00) are appended (I observed between 2 and several hundreds) . The notebook files fail to load ('bad request') the next time. Also nbconvert fails:
...
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/nbformat/reader.py", line 44, in parse_json
    raise NotJSONError(("Notebook does not appear to be JSON: %r" % s)[:77] + "...")
NotJSONError: Notebook does not appear to be JSON: u'{\n "metadata": {\n  "name": ""\n },\n...

Luckily such an file can be resurrected by deleting the null bytes.
This only happens sometimes, but with a file containing a lot of inline pylab figures (png) and heavy recreating of figures this happens quite often.

What could I do to localize the root of this problem?

I am using recent ipython from git, with python 2.7 on osx 10.9.

thanks for your help
Gregor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140120/96ca2c76/attachment.html>

From bussonniermatthias at gmail.com  Mon Jan 20 12:01:23 2014
From: bussonniermatthias at gmail.com (Matthias BUSSONNIER)
Date: Mon, 20 Jan 2014 18:01:23 +0100
Subject: [IPython-dev] Simple Kernel Example
In-Reply-To: <CAAusYCgpdTwQ7s0ig-B3FuzJ2MvQEPkohgO5vJWYGx9PQOTL3A@mail.gmail.com>
References: <1389910739647-5044217.post@n6.nabble.com>
	<CAAusYCgGH9_05baF1fvK3OYdYp4Fj8vyf814QfSUDWfF_5NTgA@mail.gmail.com>
	<F7012B6C-C389-4C76-AA78-7F6F93105DDE@gmail.com>
	<CAAusYCjcY71E+zKLWw8yPVCvZ=CKviHaQORivQMOQqEWM7Gqrg@mail.gmail.com>
	<B0A484CF-76C2-4235-9410-84A517A1978E@gmail.com>
	<CAAusYCg_5y5T3cjXUPPUyx12zCDwDFvic9PDjV2XUjrUSX+guA@mail.gmail.com>
	<81F7D28C-5DD2-4EBB-A863-AB4BFD441C3D@gmail.com>
	<CAAusYCgpdTwQ7s0ig-B3FuzJ2MvQEPkohgO5vJWYGx9PQOTL3A@mail.gmail.com>
Message-ID: <739AA93F-9DC2-4038-9929-CFBC66214BBF@gmail.com>


Le 20 janv. 2014 ? 17:08, Doug Blank a ?crit :

> Thanks for the help! Of course, I'm partly giving you feedback to help
> the next people that come along attempting to make a new kernel. Some
> comments below:
> 
>> 
> 
> I guess that when I originally ran the "ipython profile create
> simple_kernel" that I had been using IPython version 0.13 which comes
> with Ubuntu 13.10. It only created the ipython_config.py. Now that I
> have upgraded to 1.1, I see that there are many kernel-related items
> in this new ipython_notebook_config.py. Great!

Yes, updates can be tricky with config files too, we are thinking about that. 
> 
> Some of the other kernels for other languages are written to use a
> specific version of ipython. For example, igo apparent is written for
> IPython 1.2.  This has made understanding the various examples more
> difficult.

We try to change the protocol as little as possible, but some feedback from 
non-python kernel had us add some things, still the basic common denominator
 should not have changed lot since 0.13.

> 
> One related point of confusion I have: from this hint that you have
> given, it appears that you need to have different kernels for
> different frontends; is that true?

No, once you have written a kernel it will work for all frontend.
Assuming the kernel is full-featured, otherwise some feature might make the 
frontend crash.

> I was assuming that the frontend
> and the kernel could negotiate over what sockets communications were
> required/optional/ignored.

We try to do our best, but as Python kernel is the most used we often forget corner case, 
if you come to such corner case, please tell us.

> For example, it took me three days to
> realize that the heartbeat interface is not used from the notebook
> interface.

the notebook one is tricky, as the notebook is not the **real** frontend. 
the real frontend is the tornado server that act as a ZMQ <-> Websocket bridge, 
and IIRC the server is listening for heartbeat and will auto restart kernel is heartbeat fails
(up to 5 times) it just "informs" the browser that kernel has been restarted. 

> Is there a way that simple_kernel.py can determine that?

In theory no, in practice you can peak at some value or try to publish some info, but that is not reliable. 
in particular you can have emacs that talk to the browser through web socket instead of browser. 

> Or do I need different config settings for each frontend/kernel
> combination?

You do need (for the time being) to tell each frontend how to start a kernel separately, 
but this does not mean that you should change the configuration of your kernel. 

IIRC though, KernelManager is the base class from which all frontend inherit, so 
if you set KernelManager.kernel_cmd on ipython_config.py it should apply at once to all frontend. 

This part is tricky because KernelManager is instantiated only in IPython sub-app, so it will not appear in
ipython --help-all or ipython_config.py but will on each of the individual configuration file or help. 

> 
>> Haven't looked at your simple_kernel.py yet.
> 
> I have cleaned up the code some, but as far as I can tell, nothing is working.

I'm not sure sockets like passing between threads. 
And I think kernel side should use bind instead of connect because there is an asymetrie in req/res and pub/sub


-- 
M

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



From jason-sage at creativetrax.com  Mon Jan 20 12:17:07 2014
From: jason-sage at creativetrax.com (Jason Grout)
Date: Mon, 20 Jan 2014 11:17:07 -0600
Subject: [IPython-dev] Kernel busy/idle indicators in notebook
Message-ID: <52DD5A13.7010507@creativetrax.com>

Hi all,

I've been meaning to bring this up for a while, but hesitated because 
it's somewhat a bike-shedding issue.  I'll throw it out there, though, 
as a small thing that I think detracts (and distracts) from the user 
interface of the notebook.

Right now, it seems that when the kernel starts executing, the words 
"Kernel Busy" flash up in the upper right of the notebook, and when the 
kernel stops, "Kernel Idle" flashes up there.  In cases where you have 
lots of computations being sent back and forth (for example, when 
playing with the new interactive widgets), this activity in the 
interface in the corner of my viewing angle gets rather distracting.  It 
even gets distracting (for me) when executing normal computations---I 
see a flicker of something when a result is returned, and automatically 
glance towards the flicker and see it is just the kernel idle message 
flashing up.  This needless distraction breaks concentration and 
detracts from the content that just appeared.

Proposal 1: eliminate the kernel busy/idle indicators from the main 
interface.  We already have the indicator in the input prompts when 
executing normal cells (e.g., [*] instead of [number]).  We could put 
some indicator of kernel status in the menu if it seemed necessary.

Proposal 2: Make the kernel busy/idle status indicators much less 
distracting by making it a small muted icon or filled circle, similar to 
a hard drive or ethernet port activity light, that only is displayed 
when the kernel is busy, but turned off when the kernel is idle.

Thanks,

Jason


From mocalvao at gmail.com  Mon Jan 20 12:56:35 2014
From: mocalvao at gmail.com (Mauricio Calvao)
Date: Mon, 20 Jan 2014 15:56:35 -0200
Subject: [IPython-dev] paste magic command not working
In-Reply-To: <0D644F25-6430-42C0-93EF-E41070C9DE94@gmail.com>
References: <CAJoTPwzj6b6t3zb1ymBcktUpiTtCpABZt2c7UFP-eRj3cOqw0Q@mail.gmail.com>
	<3AD13E3C-8B7A-4CDF-B7BA-1FB85BD51EC4@gmail.com>
	<CAJoTPwwf5masnMhEFohn2X6uswok19yrfXMadrowzBzki=eQ=w@mail.gmail.com>
	<0D644F25-6430-42C0-93EF-E41070C9DE94@gmail.com>
Message-ID: <CAJoTPww5bRiLrdCk-N8fAeeGdjQwjoA_GU9P_j24UsnMfhNCcw@mail.gmail.com>

Ok Matthias,

I will try to contact jtaylor; thanks again!


On Mon, Jan 20, 2014 at 12:15 PM, Matthias BUSSONNIER <
bussonniermatthias at gmail.com> wrote:

> Hi Mauricio,
>
> Be careful when modifying system files, your updates might not behave
> correctly afterwards.
> The differences between your file (debian) and original one seem to be due
> to a custom debian patch
>  (cc jtaylor as he appears to be the author of
> debianize-error-messages.patch).
>
> --
> Matthias
>
> Le 19 janv. 2014 ? 20:20, Mauricio Calvao a ?crit :
>
> > Hi Matthias
> >
> > I have checked my clipboard.py file in
> /usr/lib/python2.7/dist-packages/IPython/lib/. There is a new corresponding
> .pyc, so I guess its staleness is not an option to explain the error.
> However, I verified that in the clipboard.py file itself there is an
> additional line as compared to the link you gave; it is in the fucntion
> definition tkinter_clipboard_get, which is the one which must be used,
> because I am in a Linux box (Debian). Explicitly, this (small) function
> definition, inside clipboard.py, reads:
> >
> > def tkinter_clipboard_get():
> >     """ Get the clipboard's text using Tkinter.
> >
> >     This is the default on systems that are not Windows or OS X. It may
> >     interfere with other UI toolkits and should be replaced with an
> >     implementation that uses that toolkit.
> >     """
> >     try:
> >         import Tkinter
> >     except ImportError:
> >         from IPython.utils import py3compat
> >         raise TryNext("Getting text from the clipboard on this platform "
> >                       "requires the %s-tk package." % ("python3" if
> py3compat.PY3 else "python"))
> >     root = Tkinter.Tk()
> >     root.withdraw()
> >     text = root.clipboard_get()
> >     root.destroy()
> >     text = py3compat.cast_unicode(text, py3compat.DEFAULT_ENCODING)
> >     return text
> >
> > The additional line, nonexistent in the link you gave, is the one "from
> IPython.utils import py3compat". I have now commented it out and everything
> seems to be working fine again! Thanks.
> >
> >
> > On Sun, Jan 19, 2014 at 3:47 PM, Matthias BUSSONNIER <
> bussonniermatthias at gmail.com> wrote:
> > Hi,
> >
> > You can open an issue on github, but the py3compat import is here on
> 1.1.0:
> >
> >
> https://github.com/ipython/ipython/blob/rel-1.1.0/IPython/lib/clipboard.py#L7
> >
> > Could you have stale .pyc cache or things like that ?
> >
> > --
> > M
> >
> > Le 19 janv. 2014 ? 15:00, Mauricio Calvao a ?crit :
> >
> > > Hi there,
> > >
> > > I used to have a working ipython environment, including the qtconsole
> and notebook, besides the command line. After a dist-upgrade of my Debian,
> everything still seems to be working fine, except for the paste magic
> command, which issues the message:
> > >
> > > In [1]: paste
> > >
> ---------------------------------------------------------------------------
> > > UnboundLocalError                         Traceback (most recent call
> last)
> > > <ipython-input-1-84f91d8a6054> in <module>()
> > > ----> 1 get_ipython().magic(u'paste ')
> > >
> > > /usr/lib/python2.7/dist-packages/IPython/core/interactiveshell.pyc in
> magic(self, arg_s)
> > >    2170         magic_name, _, magic_arg_s = arg_s.partition(' ')
> > >    2171         magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
> > > -> 2172         return self.run_line_magic(magic_name, magic_arg_s)
> > >    2173
> > >    2174
> #-------------------------------------------------------------------------
> > >
> > > /usr/lib/python2.7/dist-packages/IPython/core/interactiveshell.pyc in
> run_line_magic(self, magic_name, line)
> > >    2091                 kwargs['local_ns'] =
> sys._getframe(stack_depth).f_locals
> > >    2092             with self.builtin_trap:
> > > -> 2093                 result = fn(*args,**kwargs)
> > >    2094             return result
> > >    2095
> > >
> > > /usr/lib/python2.7/dist-packages/IPython/terminal/interactiveshell.pyc
> in paste(self, parameter_s)
> > >
> > > /usr/lib/python2.7/dist-packages/IPython/core/magic.pyc in <lambda>(f,
> *a, **k)
> > >     189     # but it's overkill for just that one bit of state.
> > >     190     def magic_deco(arg):
> > > --> 191         call = lambda f, *a, **k: f(*a, **k)
> > >     192
> > >     193         if callable(arg):
> > >
> > > /usr/lib/python2.7/dist-packages/IPython/terminal/interactiveshell.pyc
> in paste(self, parameter_s)
> > >     216             return
> > >     217         try:
> > > --> 218             block = self.shell.hooks.clipboard_get()
> > >     219         except TryNext as clipboard_exc:
> > >     220             message = getattr(clipboard_exc, 'args')
> > >
> > > /usr/lib/python2.7/dist-packages/IPython/core/hooks.pyc in
> __call__(self, *args, **kw)
> > >     130             #print "prio",prio,"cmd",cmd #dbg
> > >     131             try:
> > > --> 132                 return cmd(*args, **kw)
> > >     133             except TryNext as exc:
> > >     134                 last_exc = exc
> > >
> > > /usr/lib/python2.7/dist-packages/IPython/core/hooks.pyc in
> clipboard_get(self)
> > >     221     for func in chain:
> > >     222         dispatcher.add(func)
> > > --> 223     text = dispatcher()
> > >     224     return text
> > >
> > > /usr/lib/python2.7/dist-packages/IPython/core/hooks.pyc in
> __call__(self, *args, **kw)
> > >     130             #print "prio",prio,"cmd",cmd #dbg
> > >     131             try:
> > > --> 132                 return cmd(*args, **kw)
> > >     133             except TryNext as exc:
> > >     134                 last_exc = exc
> > >
> > > /usr/lib/python2.7/dist-packages/IPython/lib/clipboard.pyc in
> tkinter_clipboard_get()
> > >      51     text = root.clipboard_get()
> > >      52     root.destroy()
> > > ---> 53     text = py3compat.cast_unicode(text,
> py3compat.DEFAULT_ENCODING)
> > >      54     return text
> > >      55
> > >
> > > UnboundLocalError: local variable 'py3compat' referenced before
> assignment
> > >
> > > In [2]: can't invoke "event" command:  application has been destroyed
> > >     while executing
> > > "event generate $w <<ThemeChanged>>"
> > >     (procedure "ttk::ThemeChanged" line 6)
> > >     invoked from within
> > > "ttk::ThemeChanged"
> > >
> > >
> > > In [2]:
> > >
> > >
> > >
> > > after I try to paste the simple line:
> > >
> > >    import numpy as np
> > >
> > >
> > > My Python and Ipython versions are:
> > >
> > > orca at andromeda:~$ ipython
> > > Python 2.7.6 (default, Jan 11 2014, 14:34:26)
> > > Type "copyright", "credits" or "license" for more information.
> > >
> > > IPython 1.1.0 -- An enhanced Interactive Python.
> > > ?         -> Introduction and overview of IPython's features.
> > > %quickref -> Quick reference.
> > > help      -> Python's own help system.
> > > object?   -> Details about 'object', use 'object??' for extra details.
> > >
> > >
> > > Any suggestions please?
> > >
> > > Regards!
> > >
> > >
> > > --
> > > #######################################
> > > Prof. Mauricio Ortiz Calvao
> > > Federal University of Rio de Janeiro
> > > Institute of Physics, P O Box 68528
> > > CEP 21941-972 Rio de Janeiro, RJ
> > > Brazil
> > >
> > > Email: orca at if.ufrj.br
> > > Phone: (55)(21)25627483
> > > Homepage: http://www.if.ufrj.br/~orca
> > > #######################################
> > > _______________________________________________
> > > 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
> >
> >
> >
> > --
> > #######################################
> > Prof. Mauricio Ortiz Calvao
> > Federal University of Rio de Janeiro
> > Institute of Physics, P O Box 68528
> > CEP 21941-972 Rio de Janeiro, RJ
> > Brazil
> >
> > Email: orca at if.ufrj.br
> > Phone: (55)(21)25627483
> > Homepage: http://www.if.ufrj.br/~orca
> > #######################################
> > _______________________________________________
> > 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
>



-- 
#######################################
Prof. Mauricio Ortiz Calvao
Federal University of Rio de Janeiro
Institute of Physics, P O Box 68528
CEP 21941-972 Rio de Janeiro, RJ
Brazil

Email: orca at if.ufrj.br
Phone: (55)(21)25627483
Homepage: http://www.if.ufrj.br/~orca
#######################################
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140120/b45d0a05/attachment.html>

From jtaylor.debian at googlemail.com  Mon Jan 20 13:47:52 2014
From: jtaylor.debian at googlemail.com (Julian Taylor)
Date: Mon, 20 Jan 2014 19:47:52 +0100
Subject: [IPython-dev] paste magic command not working
In-Reply-To: <0D644F25-6430-42C0-93EF-E41070C9DE94@gmail.com>
References: <CAJoTPwzj6b6t3zb1ymBcktUpiTtCpABZt2c7UFP-eRj3cOqw0Q@mail.gmail.com>
	<3AD13E3C-8B7A-4CDF-B7BA-1FB85BD51EC4@gmail.com>
	<CAJoTPwwf5masnMhEFohn2X6uswok19yrfXMadrowzBzki=eQ=w@mail.gmail.com>
	<0D644F25-6430-42C0-93EF-E41070C9DE94@gmail.com>
Message-ID: <52DD6F58.7060700@googlemail.com>

On 20.01.2014 15:15, Matthias BUSSONNIER wrote:
> Hi Mauricio, 
> 
> Be careful when modifying system files, your updates might not behave correctly afterwards. 
> The differences between your file (debian) and original one seem to be due to a custom debian patch
>  (cc jtaylor as he appears to be the author of debianize-error-messages.patch).
> 

sorry the patch seems broken and I'll fix it in the next upload.
but can someone explain to me why its broken?
how can an import that is never called cause an unbound name error?

import IPython.utils.py3compat as py3compat
def tkinter_clipboard_get():
    try:
        import tkinter
    except ImportError:
        import IPython.utils.py3compat as py3compat
        raise TryNext("%s" % ("python3" if py3compat.PY3 else "python"))
    root = tkinter.Tk()
    root.withdraw()
    text = root.clipboard_get()
    root.destroy()
    # error here after successful tkinter import
    text = py3compat.cast_unicode(text, py3compat.DEFAULT_ENCODING)
    return text



From doug.blank at gmail.com  Mon Jan 20 14:07:13 2014
From: doug.blank at gmail.com (Doug Blank)
Date: Mon, 20 Jan 2014 14:07:13 -0500
Subject: [IPython-dev] paste magic command not working
In-Reply-To: <52DD6F58.7060700@googlemail.com>
References: <CAJoTPwzj6b6t3zb1ymBcktUpiTtCpABZt2c7UFP-eRj3cOqw0Q@mail.gmail.com>
	<3AD13E3C-8B7A-4CDF-B7BA-1FB85BD51EC4@gmail.com>
	<CAJoTPwwf5masnMhEFohn2X6uswok19yrfXMadrowzBzki=eQ=w@mail.gmail.com>
	<0D644F25-6430-42C0-93EF-E41070C9DE94@gmail.com>
	<52DD6F58.7060700@googlemail.com>
Message-ID: <CAAusYCj_cvLUKTwXZ3dUkhZZOXtN7i=RTXx3AsXDzLzDjYz7+A@mail.gmail.com>

On Mon, Jan 20, 2014 at 1:47 PM, Julian Taylor
<jtaylor.debian at googlemail.com> wrote:
> On 20.01.2014 15:15, Matthias BUSSONNIER wrote:
>> Hi Mauricio,
>>
>> Be careful when modifying system files, your updates might not behave correctly afterwards.
>> The differences between your file (debian) and original one seem to be due to a custom debian patch
>>  (cc jtaylor as he appears to be the author of debianize-error-messages.patch).
>>
>
> sorry the patch seems broken and I'll fix it in the next upload.
> but can someone explain to me why its broken?
> how can an import that is never called cause an unbound name error?
>
> import IPython.utils.py3compat as py3compat
> def tkinter_clipboard_get():
>     try:
>         import tkinter
>     except ImportError:
>         import IPython.utils.py3compat as py3compat
>         raise TryNext("%s" % ("python3" if py3compat.PY3 else "python"))
>     root = tkinter.Tk()
>     root.withdraw()
>     text = root.clipboard_get()
>     root.destroy()
>     # error here after successful tkinter import
>     text = py3compat.cast_unicode(text, py3compat.DEFAULT_ENCODING)
>     return text

The error is that py3compat.cast_unicode() is called outside of the
except block. So, it appears that the import should not be inside the
exception (eg, the import is only done when there is an error).

Hope that helps,

-Doug

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


From jtaylor.debian at googlemail.com  Mon Jan 20 14:25:48 2014
From: jtaylor.debian at googlemail.com (Julian Taylor)
Date: Mon, 20 Jan 2014 20:25:48 +0100
Subject: [IPython-dev] paste magic command not working
In-Reply-To: <CAAusYCj_cvLUKTwXZ3dUkhZZOXtN7i=RTXx3AsXDzLzDjYz7+A@mail.gmail.com>
References: <CAJoTPwzj6b6t3zb1ymBcktUpiTtCpABZt2c7UFP-eRj3cOqw0Q@mail.gmail.com>	<3AD13E3C-8B7A-4CDF-B7BA-1FB85BD51EC4@gmail.com>	<CAJoTPwwf5masnMhEFohn2X6uswok19yrfXMadrowzBzki=eQ=w@mail.gmail.com>	<0D644F25-6430-42C0-93EF-E41070C9DE94@gmail.com>	<52DD6F58.7060700@googlemail.com>
	<CAAusYCj_cvLUKTwXZ3dUkhZZOXtN7i=RTXx3AsXDzLzDjYz7+A@mail.gmail.com>
Message-ID: <52DD783C.9020302@googlemail.com>

On 20.01.2014 20:07, Doug Blank wrote:
> On Mon, Jan 20, 2014 at 1:47 PM, Julian Taylor
> <jtaylor.debian at googlemail.com> wrote:
>> On 20.01.2014 15:15, Matthias BUSSONNIER wrote:
>>> Hi Mauricio,
>>>
>>> Be careful when modifying system files, your updates might not behave correctly afterwards.
>>> The differences between your file (debian) and original one seem to be due to a custom debian patch
>>>  (cc jtaylor as he appears to be the author of debianize-error-messages.patch).
>>>
>>
>> sorry the patch seems broken and I'll fix it in the next upload.
>> but can someone explain to me why its broken?
>> how can an import that is never called cause an unbound name error?
>>
>> import IPython.utils.py3compat as py3compat
>> def tkinter_clipboard_get():
>>     try:
>>         import tkinter
>>     except ImportError:
>>         import IPython.utils.py3compat as py3compat
>>         raise TryNext("%s" % ("python3" if py3compat.PY3 else "python"))
>>     root = tkinter.Tk()
>>     root.withdraw()
>>     text = root.clipboard_get()
>>     root.destroy()
>>     # error here after successful tkinter import
>>     text = py3compat.cast_unicode(text, py3compat.DEFAULT_ENCODING)
>>     return text
> 
> The error is that py3compat.cast_unicode() is called outside of the
> except block. So, it appears that the import should not be inside the
> exception (eg, the import is only done when there is an error).
> 

it is imported at the global scope, it is the second import that somehow
removes if from the namespace even though the line is never executed.


From bussonniermatthias at gmail.com  Mon Jan 20 15:37:04 2014
From: bussonniermatthias at gmail.com (Matthias BUSSONNIER)
Date: Mon, 20 Jan 2014 21:37:04 +0100
Subject: [IPython-dev] rubbish null bytes at the end of ipynb file
In-Reply-To: <D2162E37-C6A1-41AF-BDF4-E54A26A201B2@gmail.com>
References: <D2162E37-C6A1-41AF-BDF4-E54A26A201B2@gmail.com>
Message-ID: <607144B7-E400-42E1-8EA3-906515A9197F@gmail.com>

Hi, 

Le 20 janv. 2014 ? 17:59, Gregor Thalhammer a ?crit :

> Dear developers,
> 
> sometimes it happens to me that at the very end of my notebook files null bytes (0x00) are appended (I observed between 2 and several hundreds) . The notebook files fail to load ('bad request') the next time. Also nbconvert fails:
> ...
>   File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/nbformat/reader.py", line 44, in parse_json
>     raise NotJSONError(("Notebook does not appear to be JSON: %r" % s)[:77] + "...")
> NotJSONError: Notebook does not appear to be JSON: u'{\n "metadata": {\n  "name": ""\n },\n...
> 

This is **really** weird. 

Could you open an issue on github ? 

Notebook are written in 
	IPython/html/services/notebooks/filenbmanager.py ~L243. 

You can try to have a check with a retry to get warn 'on write' when this happen to narrow the issue. 
Problem is that we do use std lib to write JSON, so this should never happened.
-- 
M

> Luckily such an file can be resurrected by deleting the null bytes.
> This only happens sometimes, but with a file containing a lot of inline pylab figures (png) and heavy recreating of figures this happens quite often.
> 
> What could I do to localize the root of this problem?
> 
> I am using recent ipython from git, with python 2.7 on osx 10.9.
> 
> thanks for your help
> Gregor
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev



From takowl at gmail.com  Mon Jan 20 17:48:14 2014
From: takowl at gmail.com (Thomas Kluyver)
Date: Mon, 20 Jan 2014 14:48:14 -0800
Subject: [IPython-dev] Kernel busy/idle indicators in notebook
In-Reply-To: <52DD5A13.7010507@creativetrax.com>
References: <52DD5A13.7010507@creativetrax.com>
Message-ID: <CAOvn4qidD9+_=qEEJgtAfZrL0434AjpCZBuzwvNGYq47CFiXUw@mail.gmail.com>

I think you're right, those notifications are unnecessarily noisy. And I
like the idea of a small icon that indicates when the kernel is working,
perhaps at the right hand end of the title bar. I might have a go at this
tomorrow - I've been meaning to spend some more time in the JS.

Thomas


On 20 January 2014 09:17, Jason Grout <jason-sage at creativetrax.com> wrote:

> Hi all,
>
> I've been meaning to bring this up for a while, but hesitated because
> it's somewhat a bike-shedding issue.  I'll throw it out there, though,
> as a small thing that I think detracts (and distracts) from the user
> interface of the notebook.
>
> Right now, it seems that when the kernel starts executing, the words
> "Kernel Busy" flash up in the upper right of the notebook, and when the
> kernel stops, "Kernel Idle" flashes up there.  In cases where you have
> lots of computations being sent back and forth (for example, when
> playing with the new interactive widgets), this activity in the
> interface in the corner of my viewing angle gets rather distracting.  It
> even gets distracting (for me) when executing normal computations---I
> see a flicker of something when a result is returned, and automatically
> glance towards the flicker and see it is just the kernel idle message
> flashing up.  This needless distraction breaks concentration and
> detracts from the content that just appeared.
>
> Proposal 1: eliminate the kernel busy/idle indicators from the main
> interface.  We already have the indicator in the input prompts when
> executing normal cells (e.g., [*] instead of [number]).  We could put
> some indicator of kernel status in the menu if it seemed necessary.
>
> Proposal 2: Make the kernel busy/idle status indicators much less
> distracting by making it a small muted icon or filled circle, similar to
> a hard drive or ethernet port activity light, that only is displayed
> when the kernel is busy, but turned off when the kernel is idle.
>
> Thanks,
>
> Jason
> _______________________________________________
> 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/fe32da9f/attachment.html>

From takowl at gmail.com  Mon Jan 20 18:05:54 2014
From: takowl at gmail.com (Thomas Kluyver)
Date: Mon, 20 Jan 2014 15:05:54 -0800
Subject: [IPython-dev] paste magic command not working
In-Reply-To: <52DD6F58.7060700@googlemail.com>
References: <CAJoTPwzj6b6t3zb1ymBcktUpiTtCpABZt2c7UFP-eRj3cOqw0Q@mail.gmail.com>
	<3AD13E3C-8B7A-4CDF-B7BA-1FB85BD51EC4@gmail.com>
	<CAJoTPwwf5masnMhEFohn2X6uswok19yrfXMadrowzBzki=eQ=w@mail.gmail.com>
	<0D644F25-6430-42C0-93EF-E41070C9DE94@gmail.com>
	<52DD6F58.7060700@googlemail.com>
Message-ID: <CAOvn4qidypMR1DjDaOzKLkdNmeN3NAz1SMrcev927PddyPKUkA@mail.gmail.com>

On 20 January 2014 10:47, Julian Taylor <jtaylor.debian at googlemail.com>wrote:

> how can an import that is never called cause an unbound name error?


When Python code is compiled, references to variables defined within the
function have a different lookup path to global variables (a LOAD_FAST
bytecode vs LOAD_GLOBAL). If a variable is defined anywhere within that
function, it is considered local, and you cannot look it up globally. This
is a classic gotcha:

a = 0
def f():
    a = a + 1
f()   # UnboundLocalError

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

From fperez.net at gmail.com  Mon Jan 20 20:50:49 2014
From: fperez.net at gmail.com (Fernando Perez)
Date: Mon, 20 Jan 2014 17:50:49 -0800
Subject: [IPython-dev] help with @interactive
In-Reply-To: <2B82E993-DC46-42AC-AEFF-4F51B89B3766@gmail.com>
References: <CAEX=yaYphJAusAxP53xHuxtBZHbyduPp=dQsACBPC6P41ntdRg@mail.gmail.com>
	<2B82E993-DC46-42AC-AEFF-4F51B89B3766@gmail.com>
Message-ID: <CAHAreOoBv+LUZYCQF-UyFWT5qMM+Juv7rpOSXkBnLmaDbEEBgQ@mail.gmail.com>

On Mon, Jan 20, 2014 at 2:52 AM, Matthias BUSSONNIER <
bussonniermatthias at gmail.com> wrote:

>
> Le 19 janv. 2014 ? 22:18, Mark Bakker a ?crit :
>
> Hello List,
>
> I am trying to do this (got this from one of Fernando's Notebooks):
>
> @interactive( x=(0,10) )
> def f(x):
>     print 'x is: ',x
>
> But I get an error:
>
> TypeError: interactive() got an unexpected keyword argument 'x'
>
>
> @interactive is still in development, and not even yet in master,
> Fernando was (most probably) using a patched version.
>

correct, I was running a local merge of #4374, together with a locally
redefined @interactive.

Mark, rather than jumping through these hoops, I recommend you wait a few
more days til we can properly merge this code with official APIs. All that
experimentation we were doing individually was taken into account for the
design of what our final APIs will look like.

If you have any feedback, feel free to leave it on the PR discussion page.

Cheers,

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

From fperez.net at gmail.com  Mon Jan 20 20:52:27 2014
From: fperez.net at gmail.com (Fernando Perez)
Date: Mon, 20 Jan 2014 17:52:27 -0800
Subject: [IPython-dev] Embedding IPython in IEP
In-Reply-To: <CAB_T6==0BdYohuu4y9J=HtDkY10DQRqFs2-XdEO9qG2jDd86FA@mail.gmail.com>
References: <CAB_T6==0BdYohuu4y9J=HtDkY10DQRqFs2-XdEO9qG2jDd86FA@mail.gmail.com>
Message-ID: <CAHAreOrTTySW0J6_OV1AG1Y-efQy8Hezg9_1MvK+_F6Sot5k3w@mail.gmail.com>

Hi Almar,

I would mostly recommend touching bases with the Spyder team, which is the
closest project to yours (Qt- based, IDE-like) that embeds IPython. They
may have learned some additional worthwhile lessons.

Cheers

f


On Mon, Jan 20, 2014 at 6:14 AM, Almar Klein <a.klein at science-applied.nl>wrote:

> Hi all,
>
> I am currently working on embedding IPython in IEP (Interactive Editor for
> Python - http://iep-project.org), and I am interested in getting some
> feedback.
>
> The approach that I am taking right now is to hook into IPython at a
> rather low level and integrate it with relatively small changes to the
> existing code-base for the IEP kernel. It basically comes down to this:
>
> from IPython.core.interactiveshell import InteractiveShell
> self._ipython = InteractiveShell(user_module=__main__)
> # set a few hooks ...
> ...
> # When user is sending a line to execute ...
> if self._ipython:
>
> self._ipython.run_cell(source, True)
>
> else:
>
> self._run_cell_natively(source)
>
>
> Apart from this I use custom prompts at sys.ps1 and sys ps2 to simulate
> the IPython prompts, plus a handfull of small tweaks to make things work as
> expected.
>
>
> The kernel runs the event loop as usual and arranges for GUI integration.
>
>
> So far things are looking good and everything seems to work as expected. I
> was mostly wondering whether this approach has any limitations that I
> overlooked, like some specific IPython feature that is not available with
> this approach. Also, I would be happy to learn any specific things that I
> should take into account.
>
>
> Thanks in advance,
>
> Almar
>
>
>
>
>
>
>
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>


-- 
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140120/49fe42f3/attachment.html>

From fperez.net at gmail.com  Mon Jan 20 20:56:33 2014
From: fperez.net at gmail.com (Fernando Perez)
Date: Mon, 20 Jan 2014 17:56:33 -0800
Subject: [IPython-dev] Kernel busy/idle indicators in notebook
In-Reply-To: <CAOvn4qidD9+_=qEEJgtAfZrL0434AjpCZBuzwvNGYq47CFiXUw@mail.gmail.com>
References: <52DD5A13.7010507@creativetrax.com>
	<CAOvn4qidD9+_=qEEJgtAfZrL0434AjpCZBuzwvNGYq47CFiXUw@mail.gmail.com>
Message-ID: <CAHAreOoAr_FnX7sN9KTwozp1uUB9jh9NunimL73qd8nz4QFgvw@mail.gmail.com>

I also think that a more static, and muted indicator, would be great to
have. I'm pretty allergic myself to flashing in my visual field and do find
the current model mildly distracting.

We'd toyed with having a little button that would switch from green (idle)
to red (busy), but it may be visually a bit too jarring. Perhaps a simple
circle are that goes from filled (busy) to open (idle) will be sufficient,
with an on-hover that says "Kernel {idle, busy}" to help new users learn
the meaning.

cheers,

f


On Mon, Jan 20, 2014 at 2:48 PM, Thomas Kluyver <takowl at gmail.com> wrote:

> I think you're right, those notifications are unnecessarily noisy. And I
> like the idea of a small icon that indicates when the kernel is working,
> perhaps at the right hand end of the title bar. I might have a go at this
> tomorrow - I've been meaning to spend some more time in the JS.
>
> Thomas
>
>
> On 20 January 2014 09:17, Jason Grout <jason-sage at creativetrax.com> wrote:
>
>> Hi all,
>>
>> I've been meaning to bring this up for a while, but hesitated because
>> it's somewhat a bike-shedding issue.  I'll throw it out there, though,
>> as a small thing that I think detracts (and distracts) from the user
>> interface of the notebook.
>>
>> Right now, it seems that when the kernel starts executing, the words
>> "Kernel Busy" flash up in the upper right of the notebook, and when the
>> kernel stops, "Kernel Idle" flashes up there.  In cases where you have
>> lots of computations being sent back and forth (for example, when
>> playing with the new interactive widgets), this activity in the
>> interface in the corner of my viewing angle gets rather distracting.  It
>> even gets distracting (for me) when executing normal computations---I
>> see a flicker of something when a result is returned, and automatically
>> glance towards the flicker and see it is just the kernel idle message
>> flashing up.  This needless distraction breaks concentration and
>> detracts from the content that just appeared.
>>
>> Proposal 1: eliminate the kernel busy/idle indicators from the main
>> interface.  We already have the indicator in the input prompts when
>> executing normal cells (e.g., [*] instead of [number]).  We could put
>> some indicator of kernel status in the menu if it seemed necessary.
>>
>> Proposal 2: Make the kernel busy/idle status indicators much less
>> distracting by making it a small muted icon or filled circle, similar to
>> a hard drive or ethernet port activity light, that only is displayed
>> when the kernel is busy, but turned off when the kernel is idle.
>>
>> Thanks,
>>
>> Jason
>> _______________________________________________
>> 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
>
>


-- 
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140120/26db4240/attachment.html>

From jsw at fnal.gov  Mon Jan 20 21:09:21 2014
From: jsw at fnal.gov (Jon Wilson)
Date: Mon, 20 Jan 2014 20:09:21 -0600
Subject: [IPython-dev] Kernel busy/idle indicators in notebook
In-Reply-To: <CAHAreOoAr_FnX7sN9KTwozp1uUB9jh9NunimL73qd8nz4QFgvw@mail.gmail.com>
References: <52DD5A13.7010507@creativetrax.com>	<CAOvn4qidD9+_=qEEJgtAfZrL0434AjpCZBuzwvNGYq47CFiXUw@mail.gmail.com>
	<CAHAreOoAr_FnX7sN9KTwozp1uUB9jh9NunimL73qd8nz4QFgvw@mail.gmail.com>
Message-ID: <52DDD6D1.6080900@fnal.gov>

Hi,
Please, for the sake of those with red/green color blindness (several 
percent of the male population), do not default to red/green 
distinctions to convey important information (without other 
distinctions).  I could be happy with a little button that switches from 
green to red, so long as it also changes, for example, its textual content.
Regards,
Jon

On 01/20/2014 07:56 PM, Fernando Perez wrote:
> We'd toyed with having a little button that would switch from green
> (idle) to red (busy), but it may be visually a bit too jarring.


From fperez.net at gmail.com  Mon Jan 20 21:22:09 2014
From: fperez.net at gmail.com (Fernando Perez)
Date: Mon, 20 Jan 2014 18:22:09 -0800
Subject: [IPython-dev] Kernel busy/idle indicators in notebook
In-Reply-To: <52DDD6D1.6080900@fnal.gov>
References: <52DD5A13.7010507@creativetrax.com>
	<CAOvn4qidD9+_=qEEJgtAfZrL0434AjpCZBuzwvNGYq47CFiXUw@mail.gmail.com>
	<CAHAreOoAr_FnX7sN9KTwozp1uUB9jh9NunimL73qd8nz4QFgvw@mail.gmail.com>
	<52DDD6D1.6080900@fnal.gov>
Message-ID: <CAHAreOqgwKO+C_vmp1=o8eETSvGMMtcmnOUSez8MMD-sEAo-1w@mail.gmail.com>

good point, thx!


On Mon, Jan 20, 2014 at 6:09 PM, Jon Wilson <jsw at fnal.gov> wrote:

> Hi,
> Please, for the sake of those with red/green color blindness (several
> percent of the male population), do not default to red/green
> distinctions to convey important information (without other
> distinctions).  I could be happy with a little button that switches from
> green to red, so long as it also changes, for example, its textual content.
> Regards,
> Jon
>
> On 01/20/2014 07:56 PM, Fernando Perez wrote:
> > We'd toyed with having a little button that would switch from green
> > (idle) to red (busy), but it may be visually a bit too jarring.
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>



-- 
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140120/ace78cc1/attachment.html>

From fperez.net at gmail.com  Mon Jan 20 21:56:14 2014
From: fperez.net at gmail.com (Fernando Perez)
Date: Mon, 20 Jan 2014 18:56:14 -0800
Subject: [IPython-dev] Recap of recent IPython Dev meeting: a blog post by
	Matthias
Message-ID: <CAHAreOrTYyPnj3HXPk2aPASdAE8mDqmW0DWNLjdTQ5hsek_X4Q@mail.gmail.com>

Hi all,

since he's probably to modest to self-promote, I figured I'd pass the link
here. Matthias posted a nice recap of what happened during our recent dev
meeting at Berkeley (thanks a lot for writing this up, it's really useful!):

http://carreau.github.io/posts/11-IPython-Dev-Meeting-Winter-2014.ipynb.html

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140120/269e4a41/attachment.html>

From bussonniermatthias at gmail.com  Tue Jan 21 02:41:10 2014
From: bussonniermatthias at gmail.com (Matthias BUSSONNIER)
Date: Tue, 21 Jan 2014 08:41:10 +0100
Subject: [IPython-dev] Kernel busy/idle indicators in notebook
In-Reply-To: <CAHAreOqgwKO+C_vmp1=o8eETSvGMMtcmnOUSez8MMD-sEAo-1w@mail.gmail.com>
References: <52DD5A13.7010507@creativetrax.com>
	<CAOvn4qidD9+_=qEEJgtAfZrL0434AjpCZBuzwvNGYq47CFiXUw@mail.gmail.com>
	<CAHAreOoAr_FnX7sN9KTwozp1uUB9jh9NunimL73qd8nz4QFgvw@mail.gmail.com>
	<52DDD6D1.6080900@fnal.gov>
	<CAHAreOqgwKO+C_vmp1=o8eETSvGMMtcmnOUSez8MMD-sEAo-1w@mail.gmail.com>
Message-ID: <E02B62D0-01B0-437B-B6CA-033ECC83B327@gmail.com>

One problem that I can see is that running and idle are not the only indicators in the notification area. 
I can think at least of restart and interrupt (for the kernel). 

One could change the Notification Area API from (text), to (icon, text, hovertext, color) and use 
http://fontawesome.io/icons/ (form control section for example)
To have more discrete indicators.


Css could probably be used to have fading transition more subtle.

-- 
M


Le 21 janv. 2014 ? 03:22, Fernando Perez a ?crit :

> good point, thx!
> 
> 
> On Mon, Jan 20, 2014 at 6:09 PM, Jon Wilson <jsw at fnal.gov> wrote:
> Hi,
> Please, for the sake of those with red/green color blindness (several
> percent of the male population), do not default to red/green
> distinctions to convey important information (without other
> distinctions).  I could be happy with a little button that switches from
> green to red, so long as it also changes, for example, its textual content.
> Regards,
> Jon
> 
> On 01/20/2014 07:56 PM, Fernando Perez wrote:
> > We'd toyed with having a little button that would switch from green
> > (idle) to red (busy), but it may be visually a bit too jarring.
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
> 
> 
> 
> -- 
> 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



From markbak at gmail.com  Tue Jan 21 07:50:15 2014
From: markbak at gmail.com (Mark Bakker)
Date: Tue, 21 Jan 2014 13:50:15 +0100
Subject: [IPython-dev] paste magic command not working
Message-ID: <CAEX=yab1VoiWFrLyPY+CT+vMFz1FXSKU5QkmdDCxJTH8byptjw@mail.gmail.com>

No problem. I can wait.
Just very excited to get the chance to start using these new features.
Thanks,
Mark


> > Le 19 janv. 2014 ? 22:18, Mark Bakker a ?crit :
> >
> > Hello List,
> >
> > I am trying to do this (got this from one of Fernando's Notebooks):
> >
> > @interactive( x=(0,10) )
> > def f(x):
> >     print 'x is: ',x
> >
> > But I get an error:
> >
> > TypeError: interactive() got an unexpected keyword argument 'x'
> >
> >
> > @interactive is still in development, and not even yet in master,
> > Fernando was (most probably) using a patched version.
> >
>
> correct, I was running a local merge of #4374, together with a locally
> redefined @interactive.
>
> Mark, rather than jumping through these hoops, I recommend you wait a few
> more days til we can properly merge this code with official APIs. All that
> experimentation we were doing individually was taken into account for the
> design of what our final APIs will look like.
>
> If you have any feedback, feel free to leave it on the PR discussion page.
>
> Cheers,
>
> f
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140121/55025df8/attachment.html>

From gregor.thalhammer at gmail.com  Tue Jan 21 09:15:05 2014
From: gregor.thalhammer at gmail.com (Gregor Thalhammer)
Date: Tue, 21 Jan 2014 15:15:05 +0100
Subject: [IPython-dev] rubbish null bytes at the end of ipynb file
In-Reply-To: <607144B7-E400-42E1-8EA3-906515A9197F@gmail.com>
References: <D2162E37-C6A1-41AF-BDF4-E54A26A201B2@gmail.com>
	<607144B7-E400-42E1-8EA3-906515A9197F@gmail.com>
Message-ID: <BACF69AD-5D2E-46F5-B98A-109B36FA4058@gmail.com>


Am 20.01.2014 um 21:37 schrieb Matthias BUSSONNIER <bussonniermatthias at gmail.com>:

> Hi, 
> 
> Le 20 janv. 2014 ? 17:59, Gregor Thalhammer a ?crit :
> 
>> Dear developers,
>> 
>> sometimes it happens to me that at the very end of my notebook files null bytes (0x00) are appended (I observed between 2 and several hundreds) . The notebook files fail to load ('bad request') the next time. Also nbconvert fails:
>> ...
>>  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/nbformat/reader.py", line 44, in parse_json
>>    raise NotJSONError(("Notebook does not appear to be JSON: %r" % s)[:77] + "...")
>> NotJSONError: Notebook does not appear to be JSON: u'{\n "metadata": {\n  "name": ""\n },\n...
>> 
> 
> This is **really** weird. 
> 
> Could you open an issue on github ? 
> 
> Notebook are written in 
> 	IPython/html/services/notebooks/filenbmanager.py ~L243. 
> 
> You can try to have a check with a retry to get warn 'on write' when this happen to narrow the issue. 
> Problem is that we do use std lib to write JSON, so this should never happened.

Dear Matthias,

thanks for the hint. I opened an issue #4841.
I had a look at the ipython source and can confirm that this should not happen, since saving a notebook essentially only uses the standard json module + encode().
To debug this: How to start a notebook server from a ipython shell (ideally from the source directory) so that I can use pdb for interactive debugging?

Gregor

> -- 
> M
> 
>> Luckily such an file can be resurrected by deleting the null bytes.
>> This only happens sometimes, but with a file containing a lot of inline pylab figures (png) and heavy recreating of figures this happens quite often.
>> 
>> What could I do to localize the root of this problem?
>> 
>> I am using recent ipython from git, with python 2.7 on osx 10.9.
>> 
>> thanks for your help
>> Gregor
>> _______________________________________________
>> 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/20140121/2ac4cf35/attachment.html>

From benjaminrk at gmail.com  Tue Jan 21 12:14:42 2014
From: benjaminrk at gmail.com (MinRK)
Date: Tue, 21 Jan 2014 09:14:42 -0800
Subject: [IPython-dev] Kernel busy/idle indicators in notebook
In-Reply-To: <E02B62D0-01B0-437B-B6CA-033ECC83B327@gmail.com>
References: <52DD5A13.7010507@creativetrax.com>
	<CAOvn4qidD9+_=qEEJgtAfZrL0434AjpCZBuzwvNGYq47CFiXUw@mail.gmail.com>
	<CAHAreOoAr_FnX7sN9KTwozp1uUB9jh9NunimL73qd8nz4QFgvw@mail.gmail.com>
	<52DDD6D1.6080900@fnal.gov>
	<CAHAreOqgwKO+C_vmp1=o8eETSvGMMtcmnOUSez8MMD-sEAo-1w@mail.gmail.com>
	<E02B62D0-01B0-437B-B6CA-033ECC83B327@gmail.com>
Message-ID: <CAHNn8BXvxKYHWGyc-3EeEN8kUABM7iTo6MwduJjpnVr1gLGD+w@mail.gmail.com>

On Mon, Jan 20, 2014 at 11:41 PM, Matthias BUSSONNIER <
bussonniermatthias at gmail.com> wrote:

> One problem that I can see is that running and idle are not the only
> indicators in the notification area.
> I can think at least of restart and interrupt (for the kernel).
>
> One could change the Notification Area API from (text), to (icon, text,
> hovertext, color) and use
> http://fontawesome.io/icons/ (form control section for example)
> To have more discrete indicators.
>

That's true, but I think busy/idle are sufficiently special cases that they
can be pulled out of the notification area. An always on little icon seems
sensible.


>
>
> Css could probably be used to have fading transition more subtle.
>
> --
> M
>
>
> Le 21 janv. 2014 ? 03:22, Fernando Perez a ?crit :
>
> > good point, thx!
> >
> >
> > On Mon, Jan 20, 2014 at 6:09 PM, Jon Wilson <jsw at fnal.gov> wrote:
> > Hi,
> > Please, for the sake of those with red/green color blindness (several
> > percent of the male population), do not default to red/green
> > distinctions to convey important information (without other
> > distinctions).  I could be happy with a little button that switches from
> > green to red, so long as it also changes, for example, its textual
> content.
> > Regards,
> > Jon
> >
> > On 01/20/2014 07:56 PM, Fernando Perez wrote:
> > > We'd toyed with having a little button that would switch from green
> > > (idle) to red (busy), but it may be visually a bit too jarring.
> > _______________________________________________
> > IPython-dev mailing list
> > IPython-dev at scipy.org
> > http://mail.scipy.org/mailman/listinfo/ipython-dev
> >
> >
> >
> > --
> > 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140121/752f4866/attachment.html>

From doug.blank at gmail.com  Tue Jan 21 12:41:25 2014
From: doug.blank at gmail.com (Doug Blank)
Date: Tue, 21 Jan 2014 12:41:25 -0500
Subject: [IPython-dev] Simple Kernel Example
In-Reply-To: <739AA93F-9DC2-4038-9929-CFBC66214BBF@gmail.com>
References: <1389910739647-5044217.post@n6.nabble.com>
	<CAAusYCgGH9_05baF1fvK3OYdYp4Fj8vyf814QfSUDWfF_5NTgA@mail.gmail.com>
	<F7012B6C-C389-4C76-AA78-7F6F93105DDE@gmail.com>
	<CAAusYCjcY71E+zKLWw8yPVCvZ=CKviHaQORivQMOQqEWM7Gqrg@mail.gmail.com>
	<B0A484CF-76C2-4235-9410-84A517A1978E@gmail.com>
	<CAAusYCg_5y5T3cjXUPPUyx12zCDwDFvic9PDjV2XUjrUSX+guA@mail.gmail.com>
	<81F7D28C-5DD2-4EBB-A863-AB4BFD441C3D@gmail.com>
	<CAAusYCgpdTwQ7s0ig-B3FuzJ2MvQEPkohgO5vJWYGx9PQOTL3A@mail.gmail.com>
	<739AA93F-9DC2-4038-9929-CFBC66214BBF@gmail.com>
Message-ID: <CAAusYCj=VxJhNWPpFyiXON45Y2YnM-698pij9ksqhDyt1iozPg@mail.gmail.com>

On Mon, Jan 20, 2014 at 12:01 PM, Matthias BUSSONNIER
<bussonniermatthias at gmail.com> wrote:

[snip]

>>> Haven't looked at your simple_kernel.py yet.
>>
>> I have cleaned up the code some, but as far as I can tell, nothing is working.
>
> I'm not sure sockets like passing between threads.
> And I think kernel side should use bind instead of connect because there is an asymetrie in req/res and pub/sub

Thanks for the feedback... your comments help me realize that I was
looking at the wrong side of the socket code as examples. I've made
more progress, but still looking for help on the code:

https://github.com/dsblank/simple_kernel

Some specific questions:

1) Does the kernel need to handle the "ident" bytes on the front end
of messages before the delimiter? I see a couple of options: a) ignore
them, b) pass them back with responses, c) do something with them?
What do they represent?

2) Could someone provide an example of a execute_request/execute_reply
exchange of messages. I'm having trouble getting the conversation to
work. Specifically, looking for how execute_reply, pyout, pyin
message_types are related, and which sockets they are sent on.

-Doug


From anand.prabhakar.patil at gmail.com  Tue Jan 21 12:55:30 2014
From: anand.prabhakar.patil at gmail.com (Anand Patil)
Date: Tue, 21 Jan 2014 09:55:30 -0800
Subject: [IPython-dev] ANN: Sense, a cloud platform for data analysis
Message-ID: <CAFzWkZEf1bLu3wq1=RpO41mxyjNuhNZ7SqUz1vxaQGxhS=0-8w@mail.gmail.com>

Hi everyone,

I'm happy to introduce Sense, a new cloud data analysis platform. Sense is
a new, scalable cloud home for IPython as well as R and any other tools or
languages that someone eventually wraps in a NodeJS module according to our
engine API (https://github.com/SensePlatform/sense-engine).

Our new IPython frontend tries to act like a graphical console or terminal,
meaning you enter input at a prompt and any display objects that get
output, including text, HTML, images etc., are displayed in the scrollback.

Please check out our video at https://senseplatform.com for a five-minute
tour of Sense and its features. Feedback, questions, comments etc. are more
than welcome.

Cheers,
Anand
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140121/07cf81d1/attachment.html>

From ellisonbg at gmail.com  Tue Jan 21 13:07:12 2014
From: ellisonbg at gmail.com (Brian Granger)
Date: Tue, 21 Jan 2014 10:07:12 -0800
Subject: [IPython-dev] ANN: Sense, a cloud platform for data analysis
In-Reply-To: <CAFzWkZEf1bLu3wq1=RpO41mxyjNuhNZ7SqUz1vxaQGxhS=0-8w@mail.gmail.com>
References: <CAFzWkZEf1bLu3wq1=RpO41mxyjNuhNZ7SqUz1vxaQGxhS=0-8w@mail.gmail.com>
Message-ID: <CAH4pYpQ_O2rGnDHrKBd8XWZh3L=RbkERxOp+EUskh5N_Ms5CsQ@mail.gmail.com>

Cool, thanks for the notice! Please keep in touch with us as things
move forward.

Cheers,

Brian

On Tue, Jan 21, 2014 at 9:55 AM, Anand Patil
<anand.prabhakar.patil at gmail.com> wrote:
> Hi everyone,
>
> I'm happy to introduce Sense, a new cloud data analysis platform. Sense is a
> new, scalable cloud home for IPython as well as R and any other tools or
> languages that someone eventually wraps in a NodeJS module according to our
> engine API (https://github.com/SensePlatform/sense-engine).
>
> Our new IPython frontend tries to act like a graphical console or terminal,
> meaning you enter input at a prompt and any display objects that get output,
> including text, HTML, images etc., are displayed in the scrollback.
>
> Please check out our video at https://senseplatform.com for a five-minute
> tour of Sense and its features. Feedback, questions, comments etc. are more
> than welcome.
>
> Cheers,
> Anand
>
> _______________________________________________
> 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


From ntezak at stanford.edu  Tue Jan 21 13:27:08 2014
From: ntezak at stanford.edu (Nikolas Tezak)
Date: Tue, 21 Jan 2014 10:27:08 -0800
Subject: [IPython-dev] ANN: Sense, a cloud platform for data analysis
In-Reply-To: <CAFzWkZEf1bLu3wq1=RpO41mxyjNuhNZ7SqUz1vxaQGxhS=0-8w@mail.gmail.com>
References: <CAFzWkZEf1bLu3wq1=RpO41mxyjNuhNZ7SqUz1vxaQGxhS=0-8w@mail.gmail.com>
Message-ID: <B4880234-6813-44BF-94E4-009C6CFF709B@stanford.edu>

Hi Anand, 

this looks great! Thanks for sharing!
Is the github project all I would need to run this platform on my own HPC servers?
Thanks,

Nik

On Jan 21, 2014, at 9:55 AM, Anand Patil wrote:

> Hi everyone,
> 
> I'm happy to introduce Sense, a new cloud data analysis platform. Sense is a new, scalable cloud home for IPython as well as R and any other tools or languages that someone eventually wraps in a NodeJS module according to our engine API (https://github.com/SensePlatform/sense-engine).
> 
> Our new IPython frontend tries to act like a graphical console or terminal, meaning you enter input at a prompt and any display objects that get output, including text, HTML, images etc., are displayed in the scrollback.
> 
> Please check out our video at https://senseplatform.com for a five-minute tour of Sense and its features. Feedback, questions, comments etc. are more than welcome.
> 
> Cheers,
> Anand
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev



From anand.prabhakar.patil at gmail.com  Tue Jan 21 13:51:40 2014
From: anand.prabhakar.patil at gmail.com (Anand Patil)
Date: Tue, 21 Jan 2014 10:51:40 -0800
Subject: [IPython-dev] ANN: Sense, a cloud platform for data analysis
In-Reply-To: <B4880234-6813-44BF-94E4-009C6CFF709B@stanford.edu>
References: <CAFzWkZEf1bLu3wq1=RpO41mxyjNuhNZ7SqUz1vxaQGxhS=0-8w@mail.gmail.com>
	<B4880234-6813-44BF-94E4-009C6CFF709B@stanford.edu>
Message-ID: <CAFzWkZH3-6iQSN8thFDoHNp_wjq_90NtOJCbosh84Uh9PEYcRw@mail.gmail.com>

Hi Nik,

We haven't open sourced sufficient code to allow you to run Sense
on-premise at this stage. However, we've heard similar early interest from
other academic institutions, so we're working on packaging Sense up to
license as an HPC frontend. Please send me an email offline if you'd be
interested in testing early versions of that.

Anand


On Tue, Jan 21, 2014 at 10:27 AM, Nikolas Tezak <ntezak at stanford.edu> wrote:

> Hi Anand,
>
> this looks great! Thanks for sharing!
> Is the github project all I would need to run this platform on my own HPC
> servers?
> Thanks,
>
> Nik
>
> On Jan 21, 2014, at 9:55 AM, Anand Patil wrote:
>
> > Hi everyone,
> >
> > I'm happy to introduce Sense, a new cloud data analysis platform. Sense
> is a new, scalable cloud home for IPython as well as R and any other tools
> or languages that someone eventually wraps in a NodeJS module according to
> our engine API (https://github.com/SensePlatform/sense-engine).
> >
> > Our new IPython frontend tries to act like a graphical console or
> terminal, meaning you enter input at a prompt and any display objects that
> get output, including text, HTML, images etc., are displayed in the
> scrollback.
> >
> > Please check out our video at https://senseplatform.com for a
> five-minute tour of Sense and its features. Feedback, questions, comments
> etc. are more than welcome.
> >
> > Cheers,
> > Anand
> > _______________________________________________
> > 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/20140121/87d2cdfb/attachment.html>

From fperez.net at gmail.com  Tue Jan 21 14:50:57 2014
From: fperez.net at gmail.com (Fernando Perez)
Date: Tue, 21 Jan 2014 11:50:57 -0800
Subject: [IPython-dev] ANN: Sense, a cloud platform for data analysis
In-Reply-To: <CAFzWkZEf1bLu3wq1=RpO41mxyjNuhNZ7SqUz1vxaQGxhS=0-8w@mail.gmail.com>
References: <CAFzWkZEf1bLu3wq1=RpO41mxyjNuhNZ7SqUz1vxaQGxhS=0-8w@mail.gmail.com>
Message-ID: <CAHAreOoC_QADUkLWZ2kBNifbwrD4Rkex_+UJpy2XhEMYnWaU8w@mail.gmail.com>

Very nice demo! Coincidentally I'd watched the video just last nigh. Good
job, and as Brian said, keep us posted on how things go. It's always
interesting for us to see where the IPython architecture has an impact, be
it academia or commercial settings.

Cheers,

f


On Tue, Jan 21, 2014 at 9:55 AM, Anand Patil <
anand.prabhakar.patil at gmail.com> wrote:

> Hi everyone,
>
> I'm happy to introduce Sense, a new cloud data analysis platform. Sense is
> a new, scalable cloud home for IPython as well as R and any other tools or
> languages that someone eventually wraps in a NodeJS module according to our
> engine API (https://github.com/SensePlatform/sense-engine).
>
> Our new IPython frontend tries to act like a graphical console or
> terminal, meaning you enter input at a prompt and any display objects that
> get output, including text, HTML, images etc., are displayed in the
> scrollback.
>
> Please check out our video at https://senseplatform.com for a five-minute
> tour of Sense and its features. Feedback, questions, comments etc. are more
> than welcome.
>
> Cheers,
> Anand
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>


-- 
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140121/f8d032e7/attachment.html>

From konrad.hinsen at fastmail.net  Wed Jan 22 05:16:03 2014
From: konrad.hinsen at fastmail.net (Konrad Hinsen)
Date: Wed, 22 Jan 2014 11:16:03 +0100
Subject: [IPython-dev] Interfacing ActivePapers with IPython notebooks
Message-ID: <21215.39523.977040.833598@Konrad-Hinsens-MacBook-Pro-2.local>

Hi everyone,

I have started to look more seriously at integrating IPython notebooks
into my ActivePapers framework. My notes are on a GitHub issue at
https://github.com/activepapers/activepapers-python/issues/3

As I explain there, I need to intercept communication between the
notebook server and the kernels, in order to pass write access to the
ActivePaper file from one process to another one. I would appreciate
some advice on how to approach this best, meaning in particular in the
most future-proof way. I don't care much about 1.1 compatibility,
as my work is far from ready for the public, but I would like to find
a solution that I don't have the rewrite with each IPython release.

Thanks in advance,
  Konrad.
  


From matthewturk at gmail.com  Wed Jan 22 15:14:19 2014
From: matthewturk at gmail.com (Matthew Turk)
Date: Wed, 22 Jan 2014 15:14:19 -0500
Subject: [IPython-dev] Standalone javascript kernel notebook
Message-ID: <CALO3=5Ek74KmbNjx2JzSJSx+5ZBJTx_zLbp52Hn-P4wTxUooqw@mail.gmail.com>

Hi all,

I'm experimenting with some isolated kernel notebooks, and have been
looking at Min's jskernel:

https://github.com/minrk/profile_jskernel

I was wondering, is there a way to output the HTML from the notebook
as static, all the jinja2 templates evaluated, with the javascript
kernel in its place and no communication with the main server?

Thanks for any ideas,

-Matt


From ian.h.bell at gmail.com  Wed Jan 22 18:41:32 2014
From: ian.h.bell at gmail.com (Ian Bell)
Date: Thu, 23 Jan 2014 00:41:32 +0100
Subject: [IPython-dev] IPython notebook rocks (and some new ideas)
Message-ID: <CAJQnXJe4XyC7Nj0Gyf6qzKRmS7Qe-kr7H4gVttesrMbaBnaG9A@mail.gmail.com>

First off, I just want to tell you how much I love the IPython notebooks.
They are absolutely fantastic.  I'm a Python missionary and this helps me
to share work that I am doing with non-python folks. I especially like how
easy it is to integrate LaTeX into the notebook as the
edit-compile-edit-compile cycles with LaTeX can be quite time consuming if
you use the full LaTeX ecosystem.  And then we take several notebooks, use
nbconvert, and *voila*, a beautiful document.  Brilliant.

Two sample notebooks that I have put together:
iPeng-Robinson-Soave
EOS<http://nbviewer.ipython.org/github/ibell/coolprop/blob/master/Web/iPRSV.ipynb?create=1>
Implementation of phase envelope for
mixtures<http://nbviewer.ipython.org/github/ibell/coolprop/blob/master/Web/mixtures/phase_envelope.ipynb?create=1>

I have a couple of modifications that I would love to see; I'm not sure how
feasible they are:

   - Cross-referencing.  I have a lot of equations (think tens to hundreds)
   and several equations and tables and it is nice to be link to other
   equations within one notebook, but ideally I would like to be able to refer
   to equations/tables/figures in another notebook (that might be more
   difficult I know)
   - Hiding of the code blocks.  Generating figures sometimes requires a
   lot of hacking around, and its nice to not have the hacking be completely
   visible, but only after a click through.  Sort of how in Sphinx+MPL, there
   is a link to download the source for the figure, but the source is not
   automatically embedded.  If this is already possible, how can I enable it?
   - Block folding/formatting.  For longer documents, the spacing for the
   heading 1, heading 2, etc. blocks becomes quite significant, and it would
   be nice if we could fold blocks within a heading.  Also, it would be nice
   if we could have more condensed spacing for the headings, or at least,
   heading 2 spacing much less than heading 1 spacing.

I guess that's it for tonight's ideas.

Kind Regards,

Ian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140123/caa0845a/attachment.html>

From damianavila at gmail.com  Wed Jan 22 18:56:09 2014
From: damianavila at gmail.com (=?ISO-8859-1?Q?Dami=E1n_Avila?=)
Date: Wed, 22 Jan 2014 21:56:09 -0200
Subject: [IPython-dev] IPython notebook rocks (and some new ideas)
In-Reply-To: <CAJQnXJe4XyC7Nj0Gyf6qzKRmS7Qe-kr7H4gVttesrMbaBnaG9A@mail.gmail.com>
References: <CAJQnXJe4XyC7Nj0Gyf6qzKRmS7Qe-kr7H4gVttesrMbaBnaG9A@mail.gmail.com>
Message-ID: <CAH+mRR1zCO-3e+iCO7eobn_i3ERGSfQJKCsgW+yEJf58_tirkA@mail.gmail.com>

Hi Ian,

2014/1/22 Ian Bell <ian.h.bell at gmail.com>

>
>
>    - Hiding of the code blocks.  Generating figures sometimes requires a
>    lot of hacking around, and its nice to not have the hacking be completely
>    visible, but only after a click through.  Sort of how in Sphinx+MPL, there
>    is a link to download the source for the figure, but the source is not
>    automatically embedded.  If this is already possible, how can I enable it?
>
>
Regarding this issue you can use something like this (with
IPython.nbconvert):
http://www.damian.oquanta.info/posts/hide-the-input-cells-from-your-ipython-slides.html
The example applies to the IPython slides but it is easy adaptable for the
full html output...
Now, if you are lloking to hide the input in the live notebook, you can do
it making a custom nbextension (ie, a little of js applied to the live
notebook to hide the input content using some "hide" css class). You have a
lot of examples of js nbextensions here:
https://github.com/ipython-contrib/IPython-notebook-extensions and here:
https://github.com/damianavila/mIPyex and here:
https://github.com/minrk/ipython_extensions, and probably in other places...

Hope it helps!

-- 
Dami?n Avila
Scientific Python Developer
Quantitative Finance Analyst
Statistics, Biostatistics and Econometrics Consultant
Biochemist
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140122/e5841cb9/attachment.html>

From ellisonbg at gmail.com  Wed Jan 22 19:44:59 2014
From: ellisonbg at gmail.com (Brian Granger)
Date: Wed, 22 Jan 2014 16:44:59 -0800
Subject: [IPython-dev] IPython notebook rocks (and some new ideas)
In-Reply-To: <CAJQnXJe4XyC7Nj0Gyf6qzKRmS7Qe-kr7H4gVttesrMbaBnaG9A@mail.gmail.com>
References: <CAJQnXJe4XyC7Nj0Gyf6qzKRmS7Qe-kr7H4gVttesrMbaBnaG9A@mail.gmail.com>
Message-ID: <CAH4pYpRtrdeLU4sgpemD3Qz3sJJShPamCLtyBq2d7WEnmTgH6g@mail.gmail.com>

> First off, I just want to tell you how much I love the IPython notebooks.
> They are absolutely fantastic.  I'm a Python missionary and this helps me to
> share work that I am doing with non-python folks. I especially like how easy
> it is to integrate LaTeX into the notebook as the edit-compile-edit-compile
> cycles with LaTeX can be quite time consuming if you use the full LaTeX
> ecosystem.  And then we take several notebooks, use nbconvert, and voila, a
> beautiful document.  Brilliant.

Awesome, thanks for the feedback, we love to hear stuff like this.

> Two sample notebooks that I have put together:
> iPeng-Robinson-Soave EOS
> Implementation of phase envelope for mixtures
>
> I have a couple of modifications that I would love to see; I'm not sure how
> feasible they are:
>
> Cross-referencing.  I have a lot of equations (think tens to hundreds) and
> several equations and tables and it is nice to be link to other equations
> within one notebook, but ideally I would like to be able to refer to
> equations/tables/figures in another notebook (that might be more difficult I
> know)

We are thinking a lot about this and completely agree with you that
these things are desirable. The difficulty we are having is that
Markdown doesn't support these things so we have to invent our own
markup syntax and implement it in python and JavaScript. We are not
sure where this is going to go, but it remains one of the "tough"
problems we are hitting our heads against.

> Hiding of the code blocks.  Generating figures sometimes requires a lot of
> hacking around, and its nice to not have the hacking be completely visible,
> but only after a click through.  Sort of how in Sphinx+MPL, there is a link
> to download the source for the figure, but the source is not automatically
> embedded.  If this is already possible, how can I enable it?

We agree. We are trying to figure out how exactly this will look,
especially on nbviewer. It is not hard to implement a simple version
of this with a custom notebook extension though.

> Block folding/formatting.  For longer documents, the spacing for the heading
> 1, heading 2, etc. blocks becomes quite significant, and it would be nice if
> we could fold blocks within a heading.  Also, it would be nice if we could
> have more condensed spacing for the headings, or at least, heading 2 spacing
> much less than heading 1 spacing.

Yep, we are planning on providing some sort of UI for
hiding/collapsing blocks of content. Just haven't gotten there yet.

For the heading spacing I have this PR open:

https://github.com/ipython/ipython/pull/4786

Cheers and thanks,

Brian

> I guess that's it for tonight's ideas.
>
> Kind Regards,
>
> Ian
>
>
>
>
> _______________________________________________
> 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


From bussonniermatthias at gmail.com  Thu Jan 23 05:47:36 2014
From: bussonniermatthias at gmail.com (Matthias BUSSONNIER)
Date: Thu, 23 Jan 2014 11:47:36 +0100
Subject: [IPython-dev] Standalone javascript kernel notebook
In-Reply-To: <CALO3=5Ek74KmbNjx2JzSJSx+5ZBJTx_zLbp52Hn-P4wTxUooqw@mail.gmail.com>
References: <CALO3=5Ek74KmbNjx2JzSJSx+5ZBJTx_zLbp52Hn-P4wTxUooqw@mail.gmail.com>
Message-ID: <FFF2C28B-F0A4-4CCF-B6DC-488398EA42DF@gmail.com>


Le 22 janv. 2014 ? 21:14, Matthew Turk a ?crit :

> Hi all,
> 
> I'm experimenting with some isolated kernel notebooks, and have been
> looking at Min's jskernel:
> 
> https://github.com/minrk/profile_jskernel
> 
> I was wondering, is there a way to output the HTML from the notebook
> as static, all the jinja2 templates evaluated, with the javascript
> kernel in its place and no communication with the main server?


No, nbconvert works only with python at the moment, using Jinja, pygments and others python lib.
It also use subprocess communication to run pandoc on some export.

You could though write your own html exporter in javascript.
I would consider looking at Codemirror RunMode for code cell.
-- 
M


> 
> Thanks for any ideas,
> 
> -Matt
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev



From doug.blank at gmail.com  Thu Jan 23 08:47:00 2014
From: doug.blank at gmail.com (Doug Blank)
Date: Thu, 23 Jan 2014 08:47:00 -0500
Subject: [IPython-dev] Simple Kernel Example
In-Reply-To: <CAAusYCj=VxJhNWPpFyiXON45Y2YnM-698pij9ksqhDyt1iozPg@mail.gmail.com>
References: <1389910739647-5044217.post@n6.nabble.com>
	<CAAusYCgGH9_05baF1fvK3OYdYp4Fj8vyf814QfSUDWfF_5NTgA@mail.gmail.com>
	<F7012B6C-C389-4C76-AA78-7F6F93105DDE@gmail.com>
	<CAAusYCjcY71E+zKLWw8yPVCvZ=CKviHaQORivQMOQqEWM7Gqrg@mail.gmail.com>
	<B0A484CF-76C2-4235-9410-84A517A1978E@gmail.com>
	<CAAusYCg_5y5T3cjXUPPUyx12zCDwDFvic9PDjV2XUjrUSX+guA@mail.gmail.com>
	<81F7D28C-5DD2-4EBB-A863-AB4BFD441C3D@gmail.com>
	<CAAusYCgpdTwQ7s0ig-B3FuzJ2MvQEPkohgO5vJWYGx9PQOTL3A@mail.gmail.com>
	<739AA93F-9DC2-4038-9929-CFBC66214BBF@gmail.com>
	<CAAusYCj=VxJhNWPpFyiXON45Y2YnM-698pij9ksqhDyt1iozPg@mail.gmail.com>
Message-ID: <CAAusYCgBjT=dNAB+3_xGHUYOue91Uf_+i2QWwDa1p-Cpvn1mLQ@mail.gmail.com>

On Tue, Jan 21, 2014 at 12:41 PM, Doug Blank <doug.blank at gmail.com> wrote:
> On Mon, Jan 20, 2014 at 12:01 PM, Matthias BUSSONNIER
> <bussonniermatthias at gmail.com> wrote:
>
> [snip]
>
>>>> Haven't looked at your simple_kernel.py yet.
>>>
>>> I have cleaned up the code some, but as far as I can tell, nothing is working.
>>
>> I'm not sure sockets like passing between threads.
>> And I think kernel side should use bind instead of connect because there is an asymetrie in req/res and pub/sub
>
> Thanks for the feedback... your comments help me realize that I was
> looking at the wrong side of the socket code as examples. I've made
> more progress, but still looking for help on the code:
>
> https://github.com/dsblank/simple_kernel

Thanks to hints given, I now have a working, simple_kernel.py. No one
from IPython has looked at that yet, so I don't know if there are
issues, let alone if this is best practices. But it does work.

Questions still:

> Some specific questions:
>
> 1) Does the kernel need to handle the "ident" bytes on the front end
> of messages before the delimiter? I see a couple of options: a) ignore
> them, b) pass them back with responses, c) do something with them?
> What do they represent?

It looks like the ident bytes on the front are a type of routing info
in the form of "username.engine_id.message_id". I have ignored them so
far. Am I losing functionality if I don't send them?

> 2) Could someone provide an example of a execute_request/execute_reply
> exchange of messages. I'm having trouble getting the conversation to
> work. Specifically, looking for how execute_reply, pyout, pyin
> message_types are related, and which sockets they are sent on.

I now have that working. Errors that I had: using socket.connect() vs
socket.bind(), not flushing the stream when sending, using wrong
zmq.MODE (DEALER, PUB, SUB, etc) when creating the socket, missing
JSON fields, and using the wrong socket (ie, "channel"). To solve
these issues I put some print statements in IPython/kernel/channels.py
when sending and recving and mirrored these details.

The documentation is good, but I find that examples of the messages
being exchanged to be useful to make it concrete. Also, it seems that
some details are not specified in the docs.

I'll continue to make simple_kernel better, if I receive feedback or
add to it. Now, I'm ready to implement my real goal in C#...

> -Doug


From matthewturk at gmail.com  Thu Jan 23 08:51:26 2014
From: matthewturk at gmail.com (Matthew Turk)
Date: Thu, 23 Jan 2014 08:51:26 -0500
Subject: [IPython-dev] Standalone javascript kernel notebook
In-Reply-To: <FFF2C28B-F0A4-4CCF-B6DC-488398EA42DF@gmail.com>
References: <CALO3=5Ek74KmbNjx2JzSJSx+5ZBJTx_zLbp52Hn-P4wTxUooqw@mail.gmail.com>
	<FFF2C28B-F0A4-4CCF-B6DC-488398EA42DF@gmail.com>
Message-ID: <CALO3=5HYJtKd8Zw-1a8LtfNh=4Mkbi8j+t6-nFVH_ohuQS69rw@mail.gmail.com>

Hi Matthias,

On Thu, Jan 23, 2014 at 5:47 AM, Matthias BUSSONNIER
<bussonniermatthias at gmail.com> wrote:
>
> Le 22 janv. 2014 ? 21:14, Matthew Turk a ?crit :
>
>> Hi all,
>>
>> I'm experimenting with some isolated kernel notebooks, and have been
>> looking at Min's jskernel:
>>
>> https://github.com/minrk/profile_jskernel
>>
>> I was wondering, is there a way to output the HTML from the notebook
>> as static, all the jinja2 templates evaluated, with the javascript
>> kernel in its place and no communication with the main server?
>
>
> No, nbconvert works only with python at the moment, using Jinja, pygments and others python lib.
> It also use subprocess communication to run pandoc on some export.
>
> You could though write your own html exporter in javascript.
> I would consider looking at Codemirror RunMode for code cell.

Interesting, thanks.  Where I'm coming from is that I have a working
embedded system that runs IPython, but the libc currently does not
support forking -- which makes running the standard tornado server and
the kernels a bit harder.  So I'm trying to see if I can work around
that to create a single notebook runtime.  I think it might take a bit
more thought on my end before proceeding.

-Matt

> --
> M
>
>
>>
>> Thanks for any ideas,
>>
>> -Matt
>> _______________________________________________
>> 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


From python at elbonia.de  Thu Jan 23 13:26:00 2014
From: python at elbonia.de (Juergen Hasch)
Date: Thu, 23 Jan 2014 19:26:00 +0100
Subject: [IPython-dev] IPython notebook rocks (and some new ideas)
In-Reply-To: <CAJQnXJe4XyC7Nj0Gyf6qzKRmS7Qe-kr7H4gVttesrMbaBnaG9A@mail.gmail.com>
References: <CAJQnXJe4XyC7Nj0Gyf6qzKRmS7Qe-kr7H4gVttesrMbaBnaG9A@mail.gmail.com>
Message-ID: <52E15EB8.7060000@elbonia.de>

Am 23.01.2014 00:41, schrieb Ian Bell:

>   * Hiding of the code blocks.  Generating figures sometimes requires a lot of hacking around, and its nice to not have
>     the hacking be completely visible, but only after a click through.  Sort of how in Sphinx+MPL, there is a link to
>     download the source for the figure, but the source is not automatically embedded.  If this is already possible, how
>     can I enable it?

If you are using the master version of IPython from GitHub, you might want to try the codefolding extension:
https://github.com/ipython-contrib/IPython-notebook-extensions/wiki/Codefolding



From moorepants at gmail.com  Thu Jan 23 13:57:16 2014
From: moorepants at gmail.com (Jason Moore)
Date: Thu, 23 Jan 2014 13:57:16 -0500
Subject: [IPython-dev] IPython notebook rocks (and some new ideas)
In-Reply-To: <52E15EB8.7060000@elbonia.de>
References: <CAJQnXJe4XyC7Nj0Gyf6qzKRmS7Qe-kr7H4gVttesrMbaBnaG9A@mail.gmail.com>
	<52E15EB8.7060000@elbonia.de>
Message-ID: <CAP7f1AgHMDRhs4ynWMqUm_o8epFmfUsP0Z6+wuHitpN+p6zisA@mail.gmail.com>

The cross referencing could potentially be done if you also supported
restructured text. Markdown has a simpler syntax but rst is really
featureful.


Jason
moorepants.info
+01 530-601-9791


On Thu, Jan 23, 2014 at 1:26 PM, Juergen Hasch <python at elbonia.de> wrote:

> Am 23.01.2014 00:41, schrieb Ian Bell:
>
> >   * Hiding of the code blocks.  Generating figures sometimes requires a
> lot of hacking around, and its nice to not have
> >     the hacking be completely visible, but only after a click through.
>  Sort of how in Sphinx+MPL, there is a link to
> >     download the source for the figure, but the source is not
> automatically embedded.  If this is already possible, how
> >     can I enable it?
>
> If you are using the master version of IPython from GitHub, you might want
> to try the codefolding extension:
>
> https://github.com/ipython-contrib/IPython-notebook-extensions/wiki/Codefolding
>
> _______________________________________________
> 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/20140123/d492b8c3/attachment.html>

From rawlins at gmail.com  Thu Jan 23 15:49:40 2014
From: rawlins at gmail.com (Kyle Rawlins)
Date: Thu, 23 Jan 2014 15:49:40 -0500
Subject: [IPython-dev] How to preconfigure notebook environment in v1.1?
In-Reply-To: <mailman.4641.1384524126.1002.ipython-dev@scipy.org>
References: <mailman.4641.1384524126.1002.ipython-dev@scipy.org>
Message-ID: <0A7EB0F8-6132-4028-8766-5E0709774B2C@gmail.com>

Hi all,
Just wanted to pick up on this thread from back in the fall and see if there were any further answers -- the question asked then was how to do preconfiguration of notebooks as part of a specific "branded" application, and there wasn't really a conclusive answer; I have a very similar scenario.  Basically I have a set of modules (and other things) that I want to be pre-imported into the namespace of any notebook that my users load.

I did find a different (and perhaps less messy?) way of doing this than what is hinted at below in Adam's email, by using "exec_lines" as an argv option to initialize() in a wrapper script that starts the notebook server.  It needed to be in argv, because as far as I understand it, configuration options set directly on the NotebookApp _won't_ get passed along to kernels, and argv will -- this is probably obvious to experts but it took me quite a while to understand this part so I thought it worth mentioning explicitly.  ("exec_files" should presumably work too but I couldn't get it to for some reason.)  I'm still not sure that this is "right" in the long run, though; for example it seems like this might override per-user configuration.  I'm guessing a solution that involves writing a subclassed kernel as in Adam's solution could be more general in this respect, but I'm pretty hesitant to mess with the internals to that degree (yet).  Any further suggestions for better ways to do this sort of application-level preconfiguration would be helpful.

As a reminder (this came up in the old discussion), changing the configuration files in the profile directory isn't the right way to go, as my project involves a "branded" version of the notebook tailored to a specific application and should ideally be able to inject its modules / functions / etc independent of the user's configuration.

For reference, here's a miniaturized version of what I came up with that demonstrates this procedure by injecting "test_var" into the namespace for any notebook loaded from the server it starts.  One can obviously be much more elaborate, and call other files, etc.  Note that this way of starting a notebook server programmatically I got from the branded notebook recipe (written by Brian Granger) in the cookbook, which is a bit old; it still seems to work fine but I really have no idea if this is still "right" either.  But that is perhaps a separate question.

"""
import IPython
from IPython.html import notebookapp

def launch_specialized_notebook(args):
    app = notebookapp.NotebookApp()
    injection_opt = '--IPKernelApp.exec_lines=["get_ipython().user_ns[\\"test_var\\"] = 23"]'
    app.initialize([injection_opt] + args[1:])
    app.start()

launch_specialized_notebook([])
"""

Thanks,
Kyle

On Nov 15, 2013, at 9:02 AM, ipython-dev-request at scipy.org wrote:
> Date: Thu, 14 Nov 2013 12:32:09 -0800
> From: Adam Sadovsky <asadovsky at gmail.com>
> Subject: Re: [IPython-dev] How to preconfigure notebook environment in
> 	v1.1?
> To: IPython developers list <ipython-dev at scipy.org>
> Message-ID:
> 	<CADh3F_XNB1a1S6=cT-JY3_0wsOMhDXO=tadz6r5AB3q+o=04AQ at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> For the record, I ended up achieving this by modifying KernelManager to
> invoke the original script in a subprocess (rather than just calling zmq
> main), and then configuring that binary, when called in kernel mode (i.e.
> with "kernel" argument), to call IPython.start_kernel with the desired
> user_ns passed in.
> 
> Is there any documentation for developers who want to better understand the
> internal IPython APIs, specifically around kernels, applications, etc.? I
> felt myself digging around somewhat blindly in order to figure this out,
> and I'm sure there are better ways to do it (that don't require modifying
> IPython internals).
> 
> 
> --Adam
> 
> 
> On Wed, Oct 30, 2013 at 10:32 PM, Adam Sadovsky <asadovsky at gmail.com> wrote:
> 
>> Hi Paul,
>> 
>> Thanks for the reply! The reason I'd like to avoid startup files is that
>> I'm trying to provide a library for others to use. As part of this library,
>> I want it to be possible for people to start a notebook server where any
>> new notebook has a certain set of things pre-imported for convenience. I
>> suppose I could provide a startup file for users to place in their own
>> startup dirs, but I'd like to avoid making users do any extra work. Ideally
>> I'd like an option similar to what's offered in the interactive shell API,
>> which allows users to pass in a user_ns object. Does that make sense?
>> 
>> I should say, I'm relatively new to IPython/notebook and not very familiar
>> with its architecture, so I certainly may be missing something obvious. :)
>> 
>> 
>> --Adam
>> 
>> 
>> On Wed, Oct 30, 2013 at 9:11 PM, Paul Ivanov <pi at berkeley.edu> wrote:
>> 
>>> Adam Sadovsky, on 2013-10-30 20:28,  wrote:
>>>> I recently upgraded from IPython 0.13 to 1.1.
>>>> In 0.13, I was able to execute code in each notebook at startup, but the
>>>> kernel code has changed and I can't figure out how to do it anymore.
>>> Could
>>>> someone point me in the right direction?
>>> 
>>> Hi Adam,
>>> 
>>> why not just use a file in the startup directory?
>>> 
>>> $ echo `ipython locate profile`/startup/
>>> /home/pi/.ipython/profile_default/startup/
>>> $ cat `ipython locate profile`/startup/README
>>> This is the IPython startup directory
>>> 
>>> .py and .ipy files in this directory will be run *prior* to any
>>> code or files specified
>>> via the exec_lines or exec_files configurables whenever you load
>>> this profile.
>>> 
>>> Files will be run in lexicographical order, so you can control
>>> the execution order of files
>>> with a prefix, e.g.::
>>> 
>>>  00-first.py
>>>  50-middle.py
>>>  99-last.ipy
>>> 
>>> best,
>>> --
>>>                   _
>>>                  / \
>>>                A*   \^   -
>>>             ,./   _.`\\ / \
>>>            / ,--.S    \/   \
>>>           /  `"~,_     \    \
>>>     __o           ?
>>>   _ \<,_         /:\
>>> --(_)/-(_)----.../ | \
>>> --------------.......J
>>> Paul Ivanov
>>> http://pirsquared.org
>>> _______________________________________________
>>> IPython-dev mailing list
>>> IPython-dev at scipy.org
>>> http://mail.scipy.org/mailman/listinfo/ipython-dev



From bussonniermatthias at gmail.com  Thu Jan 23 16:45:44 2014
From: bussonniermatthias at gmail.com (Matthias BUSSONNIER)
Date: Thu, 23 Jan 2014 22:45:44 +0100
Subject: [IPython-dev] IPython notebook rocks (and some new ideas)
In-Reply-To: <CAP7f1AgHMDRhs4ynWMqUm_o8epFmfUsP0Z6+wuHitpN+p6zisA@mail.gmail.com>
References: <CAJQnXJe4XyC7Nj0Gyf6qzKRmS7Qe-kr7H4gVttesrMbaBnaG9A@mail.gmail.com>
	<52E15EB8.7060000@elbonia.de>
	<CAP7f1AgHMDRhs4ynWMqUm_o8epFmfUsP0Z6+wuHitpN+p6zisA@mail.gmail.com>
Message-ID: <45D0AB34-7963-4C3B-804F-CA2C884BFAE9@gmail.com>


Le 23 janv. 2014 ? 19:57, Jason Moore a ?crit :

> The cross referencing could potentially be done if you also supported restructured text. Markdown has a simpler syntax but rst is really featureful.

Notebook had some sort of rst support at some point, problem is it need to 
be done on server side and need to process the full document at once to get lots of
things right, so we moved away from it. But we did consider it.

The advantages of using in browser markdown overcame the ability to have 
all the features of rst. Also, as marked have only a few extensions, you are almost
certain that all user can read notebook written by others. 

-- 
Matthias



> Jason
> moorepants.info
> +01 530-601-9791
> 
> 
> On Thu, Jan 23, 2014 at 1:26 PM, Juergen Hasch <python at elbonia.de> wrote:
> Am 23.01.2014 00:41, schrieb Ian Bell:
> 
> >   * Hiding of the code blocks.  Generating figures sometimes requires a lot of hacking around, and its nice to not have
> >     the hacking be completely visible, but only after a click through.  Sort of how in Sphinx+MPL, there is a link to
> >     download the source for the figure, but the source is not automatically embedded.  If this is already possible, how
> >     can I enable it?
> 
> If you are using the master version of IPython from GitHub, you might want to try the codefolding extension:
> https://github.com/ipython-contrib/IPython-notebook-extensions/wiki/Codefolding
> 
> _______________________________________________
> 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



From takowl at gmail.com  Thu Jan 23 16:52:42 2014
From: takowl at gmail.com (Thomas Kluyver)
Date: Thu, 23 Jan 2014 13:52:42 -0800
Subject: [IPython-dev] IPython notebook rocks (and some new ideas)
In-Reply-To: <45D0AB34-7963-4C3B-804F-CA2C884BFAE9@gmail.com>
References: <CAJQnXJe4XyC7Nj0Gyf6qzKRmS7Qe-kr7H4gVttesrMbaBnaG9A@mail.gmail.com>
	<52E15EB8.7060000@elbonia.de>
	<CAP7f1AgHMDRhs4ynWMqUm_o8epFmfUsP0Z6+wuHitpN+p6zisA@mail.gmail.com>
	<45D0AB34-7963-4C3B-804F-CA2C884BFAE9@gmail.com>
Message-ID: <CAOvn4qhNDet=rzHmJA9EHckyoaYiwyoVfU68LaAS6pYxyUvteA@mail.gmail.com>

However, raw cells can now have the reST mimetype (select the 'Raw Cell
Format' cell toolbar from the dropdown). It should be possible to write an
extension which does previews of reST cells in the live notebook, and leave
the full cross-linking for when it's exported to rst and rendered.


On 23 January 2014 13:45, Matthias BUSSONNIER
<bussonniermatthias at gmail.com>wrote:

>
> Le 23 janv. 2014 ? 19:57, Jason Moore a ?crit :
>
> > The cross referencing could potentially be done if you also supported
> restructured text. Markdown has a simpler syntax but rst is really
> featureful.
>
> Notebook had some sort of rst support at some point, problem is it need to
> be done on server side and need to process the full document at once to
> get lots of
> things right, so we moved away from it. But we did consider it.
>
> The advantages of using in browser markdown overcame the ability to have
> all the features of rst. Also, as marked have only a few extensions, you
> are almost
> certain that all user can read notebook written by others.
>
> --
> Matthias
>
>
>
> > Jason
> > moorepants.info
> > +01 530-601-9791
> >
> >
> > On Thu, Jan 23, 2014 at 1:26 PM, Juergen Hasch <python at elbonia.de>
> wrote:
> > Am 23.01.2014 00:41, schrieb Ian Bell:
> >
> > >   * Hiding of the code blocks.  Generating figures sometimes requires
> a lot of hacking around, and its nice to not have
> > >     the hacking be completely visible, but only after a click through.
>  Sort of how in Sphinx+MPL, there is a link to
> > >     download the source for the figure, but the source is not
> automatically embedded.  If this is already possible, how
> > >     can I enable it?
> >
> > If you are using the master version of IPython from GitHub, you might
> want to try the codefolding extension:
> >
> https://github.com/ipython-contrib/IPython-notebook-extensions/wiki/Codefolding
> >
> > _______________________________________________
> > 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/20140123/86ac53e6/attachment.html>

From bussonniermatthias at gmail.com  Thu Jan 23 17:04:16 2014
From: bussonniermatthias at gmail.com (Matthias BUSSONNIER)
Date: Thu, 23 Jan 2014 23:04:16 +0100
Subject: [IPython-dev] Simple Kernel Example
In-Reply-To: <CAAusYCgBjT=dNAB+3_xGHUYOue91Uf_+i2QWwDa1p-Cpvn1mLQ@mail.gmail.com>
References: <1389910739647-5044217.post@n6.nabble.com>
	<CAAusYCgGH9_05baF1fvK3OYdYp4Fj8vyf814QfSUDWfF_5NTgA@mail.gmail.com>
	<F7012B6C-C389-4C76-AA78-7F6F93105DDE@gmail.com>
	<CAAusYCjcY71E+zKLWw8yPVCvZ=CKviHaQORivQMOQqEWM7Gqrg@mail.gmail.com>
	<B0A484CF-76C2-4235-9410-84A517A1978E@gmail.com>
	<CAAusYCg_5y5T3cjXUPPUyx12zCDwDFvic9PDjV2XUjrUSX+guA@mail.gmail.com>
	<81F7D28C-5DD2-4EBB-A863-AB4BFD441C3D@gmail.com>
	<CAAusYCgpdTwQ7s0ig-B3FuzJ2MvQEPkohgO5vJWYGx9PQOTL3A@mail.gmail.com>
	<739AA93F-9DC2-4038-9929-CFBC66214BBF@gmail.com>
	<CAAusYCj=VxJhNWPpFyiXON45Y2YnM-698pij9ksqhDyt1iozPg@mail.gmail.com>
	<CAAusYCgBjT=dNAB+3_xGHUYOue91Uf_+i2QWwDa1p-Cpvn1mLQ@mail.gmail.com>
Message-ID: <F54AC031-63E4-49F8-96FB-B079CEB77465@gmail.com>


Le 23 janv. 2014 ? 14:47, Doug Blank a ?crit :

> On Tue, Jan 21, 2014 at 12:41 PM, Doug Blank <doug.blank at gmail.com> wrote:
>> On Mon, Jan 20, 2014 at 12:01 PM, Matthias BUSSONNIER
>> <bussonniermatthias at gmail.com> wrote:
>> 
>> [snip]
>> 
>>>>> Haven't looked at your simple_kernel.py yet.
>>>> 
>>>> I have cleaned up the code some, but as far as I can tell, nothing is working.
>>> 
>>> I'm not sure sockets like passing between threads.
>>> And I think kernel side should use bind instead of connect because there is an asymetrie in req/res and pub/sub
>> 
>> Thanks for the feedback... your comments help me realize that I was
>> looking at the wrong side of the socket code as examples. I've made
>> more progress, but still looking for help on the code:
>> 
>> https://github.com/dsblank/simple_kernel
> 
> Thanks to hints given, I now have a working, simple_kernel.py.

Yeahhh


> No one
> from IPython has looked at that yet, so I don't know if there are
> issues, let alone if this is best practices. But it does work.

You were not **really** stuck :-)

> 
> Questions still:
> 
>> Some specific questions:
>> 
>> 1) Does the kernel need to handle the "ident" bytes on the front end
>> of messages before the delimiter? I see a couple of options: a) ignore
>> them, b) pass them back with responses, c) do something with them?
>> What do they represent?
> 
> It looks like the ident bytes on the front are a type of routing info
> in the form of "username.engine_id.message_id". I have ignored them so
> far. Am I losing functionality if I don't send them?

Ident might be used only to avoid replay attack, don't remember. 
Jump on hip chat and ping @minrk, he is the one with the more
 knowledge of msg spec I think. 

> 
>> 2) Could someone provide an example of a execute_request/execute_reply
>> exchange of messages. I'm having trouble getting the conversation to
>> work. Specifically, looking for how execute_reply, pyout, pyin
>> message_types are related, and which sockets they are sent on.
> 

start IPython with --debug, you should see the messages comming one going printed to stderr

> I now have that working. Errors that I had: using socket.connect() vs
> socket.bind(), not flushing the stream when sending, using wrong
> zmq.MODE (DEALER, PUB, SUB, etc) when creating the socket, missing
> JSON fields, and using the wrong socket (ie, "channel"). To solve
> these issues I put some print statements in IPython/kernel/channels.py
> when sending and recving and mirrored these details.

if you think those are needed you could put log.debug statement and open a PRs

> 
> The documentation is good, but I find that examples of the messages
> being exchanged to be useful to make it concrete. Also, it seems that
> some details are not specified in the docs.

Please open Issues on github and/or PR that how things will move forward on the doc :-)

> I'll continue to make simple_kernel better, if I receive feedback or
> add to it. Now, I'm ready to implement my real goal in C#...

Nice, is F# a derivative on C# ? 
https://github.com/BayardRock/IfSharp

Microsoft integrate IPython with visual studio, maybe they have some pieces Public in C# ? 

Is there a list of IPython  kernels somewhere ? Maybe we should create a page on the Wiki. 

You could try to run your kernel again the test-suite, it could give you hint if things are missing.

--
Matthias



From andrew.gibiansky at gmail.com  Thu Jan 23 17:11:15 2014
From: andrew.gibiansky at gmail.com (Andrew Gibiansky)
Date: Thu, 23 Jan 2014 15:11:15 -0700
Subject: [IPython-dev] Simple Kernel Example
In-Reply-To: <F54AC031-63E4-49F8-96FB-B079CEB77465@gmail.com>
References: <1389910739647-5044217.post@n6.nabble.com>
	<CAAusYCgGH9_05baF1fvK3OYdYp4Fj8vyf814QfSUDWfF_5NTgA@mail.gmail.com>
	<F7012B6C-C389-4C76-AA78-7F6F93105DDE@gmail.com>
	<CAAusYCjcY71E+zKLWw8yPVCvZ=CKviHaQORivQMOQqEWM7Gqrg@mail.gmail.com>
	<B0A484CF-76C2-4235-9410-84A517A1978E@gmail.com>
	<CAAusYCg_5y5T3cjXUPPUyx12zCDwDFvic9PDjV2XUjrUSX+guA@mail.gmail.com>
	<81F7D28C-5DD2-4EBB-A863-AB4BFD441C3D@gmail.com>
	<CAAusYCgpdTwQ7s0ig-B3FuzJ2MvQEPkohgO5vJWYGx9PQOTL3A@mail.gmail.com>
	<739AA93F-9DC2-4038-9929-CFBC66214BBF@gmail.com>
	<CAAusYCj=VxJhNWPpFyiXON45Y2YnM-698pij9ksqhDyt1iozPg@mail.gmail.com>
	<CAAusYCgBjT=dNAB+3_xGHUYOue91Uf_+i2QWwDa1p-Cpvn1mLQ@mail.gmail.com>
	<F54AC031-63E4-49F8-96FB-B079CEB77465@gmail.com>
Message-ID: <CAF-LYKJsUQSsO3Jm4VxzK3tTxUViFjX9SuqtKP7otCauPxXmXw@mail.gmail.com>

IPython --debug would have saved me so many hours. Dear lord I can't
believe I didn't know about that flag. Thank you thank you thank you.

-- Andrew Gibiansky


On Thu, Jan 23, 2014 at 3:04 PM, Matthias BUSSONNIER <
bussonniermatthias at gmail.com> wrote:

>
> Le 23 janv. 2014 ? 14:47, Doug Blank a ?crit :
>
> > On Tue, Jan 21, 2014 at 12:41 PM, Doug Blank <doug.blank at gmail.com>
> wrote:
> >> On Mon, Jan 20, 2014 at 12:01 PM, Matthias BUSSONNIER
> >> <bussonniermatthias at gmail.com> wrote:
> >>
> >> [snip]
> >>
> >>>>> Haven't looked at your simple_kernel.py yet.
> >>>>
> >>>> I have cleaned up the code some, but as far as I can tell, nothing is
> working.
> >>>
> >>> I'm not sure sockets like passing between threads.
> >>> And I think kernel side should use bind instead of connect because
> there is an asymetrie in req/res and pub/sub
> >>
> >> Thanks for the feedback... your comments help me realize that I was
> >> looking at the wrong side of the socket code as examples. I've made
> >> more progress, but still looking for help on the code:
> >>
> >> https://github.com/dsblank/simple_kernel
> >
> > Thanks to hints given, I now have a working, simple_kernel.py.
>
> Yeahhh
>
>
> > No one
> > from IPython has looked at that yet, so I don't know if there are
> > issues, let alone if this is best practices. But it does work.
>
> You were not **really** stuck :-)
>
> >
> > Questions still:
> >
> >> Some specific questions:
> >>
> >> 1) Does the kernel need to handle the "ident" bytes on the front end
> >> of messages before the delimiter? I see a couple of options: a) ignore
> >> them, b) pass them back with responses, c) do something with them?
> >> What do they represent?
> >
> > It looks like the ident bytes on the front are a type of routing info
> > in the form of "username.engine_id.message_id". I have ignored them so
> > far. Am I losing functionality if I don't send them?
>
> Ident might be used only to avoid replay attack, don't remember.
> Jump on hip chat and ping @minrk, he is the one with the more
>  knowledge of msg spec I think.
>
> >
> >> 2) Could someone provide an example of a execute_request/execute_reply
> >> exchange of messages. I'm having trouble getting the conversation to
> >> work. Specifically, looking for how execute_reply, pyout, pyin
> >> message_types are related, and which sockets they are sent on.
> >
>
> start IPython with --debug, you should see the messages comming one going
> printed to stderr
>
> > I now have that working. Errors that I had: using socket.connect() vs
> > socket.bind(), not flushing the stream when sending, using wrong
> > zmq.MODE (DEALER, PUB, SUB, etc) when creating the socket, missing
> > JSON fields, and using the wrong socket (ie, "channel"). To solve
> > these issues I put some print statements in IPython/kernel/channels.py
> > when sending and recving and mirrored these details.
>
> if you think those are needed you could put log.debug statement and open a
> PRs
>
> >
> > The documentation is good, but I find that examples of the messages
> > being exchanged to be useful to make it concrete. Also, it seems that
> > some details are not specified in the docs.
>
> Please open Issues on github and/or PR that how things will move forward
> on the doc :-)
>
> > I'll continue to make simple_kernel better, if I receive feedback or
> > add to it. Now, I'm ready to implement my real goal in C#...
>
> Nice, is F# a derivative on C# ?
> https://github.com/BayardRock/IfSharp
>
> Microsoft integrate IPython with visual studio, maybe they have some
> pieces Public in C# ?
>
> Is there a list of IPython  kernels somewhere ? Maybe we should create a
> page on the Wiki.
>
> You could try to run your kernel again the test-suite, it could give you
> hint if things are missing.
>
> --
> Matthias
>
> _______________________________________________
> 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/20140123/1fe9defc/attachment.html>

From zvoros at gmail.com  Thu Jan 23 17:16:17 2014
From: zvoros at gmail.com (=?ISO-8859-1?Q?Zolt=E1n_V=F6r=F6s?=)
Date: Thu, 23 Jan 2014 23:16:17 +0100
Subject: [IPython-dev] small nbconvert glitch?
Message-ID: <52E194B1.8080405@gmail.com>

Hi All,

For some reason, I can't compile the latex output from the markdown entry

\begin{equation}
\langle k | = 0
\end{equation}

When I pass the notebook to nbconvert, and try to compile, I get the 
following error:

! LaTeX Error: Command \ttfamily invalid in math mode.

However,

\begin{equation}
\langle k \rangle = 0
\end{equation}

compiles properly. From here

https://groups.google.com/forum/#!topic/pandoc-discuss/oj8WxUFtU6E

I learned that the problem is that | is not escaped properly in math 
environments. (NB: $\langle k \vert = 0$ also compiles without errors.)
However, given that my pandoc version is 1.11.1, and according to the 
release notes (http://johnmacfarlane.net/pandoc/releases.html), this 
issue was addressed in version 1.10, I am a bit baffled.
Is there something that could be done in nbconvert? Or might this 
problem be related to this open issue: 
https://github.com/ipython/ipython/issues/4251 ?

Thanks,
Zolt?n
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140123/1352777f/attachment.html>

From bussonniermatthias at gmail.com  Thu Jan 23 17:19:45 2014
From: bussonniermatthias at gmail.com (Matthias BUSSONNIER)
Date: Thu, 23 Jan 2014 23:19:45 +0100
Subject: [IPython-dev] Simple Kernel Example
In-Reply-To: <CAF-LYKJsUQSsO3Jm4VxzK3tTxUViFjX9SuqtKP7otCauPxXmXw@mail.gmail.com>
References: <1389910739647-5044217.post@n6.nabble.com>
	<CAAusYCgGH9_05baF1fvK3OYdYp4Fj8vyf814QfSUDWfF_5NTgA@mail.gmail.com>
	<F7012B6C-C389-4C76-AA78-7F6F93105DDE@gmail.com>
	<CAAusYCjcY71E+zKLWw8yPVCvZ=CKviHaQORivQMOQqEWM7Gqrg@mail.gmail.com>
	<B0A484CF-76C2-4235-9410-84A517A1978E@gmail.com>
	<CAAusYCg_5y5T3cjXUPPUyx12zCDwDFvic9PDjV2XUjrUSX+guA@mail.gmail.com>
	<81F7D28C-5DD2-4EBB-A863-AB4BFD441C3D@gmail.com>
	<CAAusYCgpdTwQ7s0ig-B3FuzJ2MvQEPkohgO5vJWYGx9PQOTL3A@mail.gmail.com>
	<739AA93F-9DC2-4038-9929-CFBC66214BBF@gmail.com>
	<CAAusYCj=VxJhNWPpFyiXON45Y2YnM-698pij9ksqhDyt1iozPg@mail.gmail.com>
	<CAAusYCgBjT=dNAB+3_xGHUYOue91Uf_+i2QWwDa1p-Cpvn1mLQ@mail.gmail.com>
	<F54AC031-63E4-49F8-96FB-B079CEB77465@gmail.com>
	<CAF-LYKJsUQSsO3Jm4VxzK3tTxUViFjX9SuqtKP7otCauPxXmXw@mail.gmail.com>
Message-ID: <4524C92A-C693-41F0-A374-A8B867868C64@gmail.com>


Le 23 janv. 2014 ? 23:11, Andrew Gibiansky a ?crit :

> IPython --debug would have saved me so many hours. Dear lord I can't believe I didn't know about that flag. Thank you thank you thank you.
> 

OOOooops.
Sorry, should have thought of that earlier. 

Note that you can maybe also set the log level higher on a per-class basis on some part of IPython.

Have to check though. 

-- 
M


> -- Andrew Gibiansky
> 



From clyde.fare at gmail.com  Thu Jan 23 19:54:24 2014
From: clyde.fare at gmail.com (Clyde Fare)
Date: Fri, 24 Jan 2014 00:54:24 +0000
Subject: [IPython-dev] IPython notebook rocks (and some new ideas)
In-Reply-To: <CAJQnXJe4XyC7Nj0Gyf6qzKRmS7Qe-kr7H4gVttesrMbaBnaG9A@mail.gmail.com>
References: <CAJQnXJe4XyC7Nj0Gyf6qzKRmS7Qe-kr7H4gVttesrMbaBnaG9A@mail.gmail.com>
Message-ID: <CAA3Z2fNBW34Y=FtOvU-aosWVDctqSqHV8U1fi+A9vVjGGp9hcQ@mail.gmail.com>

I found an addon to hide a notebook's input cells a while ago:

https://github.com/adfinis-sygroup/adsy-python

It hides all of them rather than just just one particular but you might
find it useful.


On 22 January 2014 23:41, Ian Bell <ian.h.bell at gmail.com> wrote:

> First off, I just want to tell you how much I love the IPython notebooks.
> They are absolutely fantastic.  I'm a Python missionary and this helps me
> to share work that I am doing with non-python folks. I especially like how
> easy it is to integrate LaTeX into the notebook as the
> edit-compile-edit-compile cycles with LaTeX can be quite time consuming if
> you use the full LaTeX ecosystem.  And then we take several notebooks, use
> nbconvert, and *voila*, a beautiful document.  Brilliant.
>
> Two sample notebooks that I have put together:
> iPeng-Robinson-Soave EOS<http://nbviewer.ipython.org/github/ibell/coolprop/blob/master/Web/iPRSV.ipynb?create=1>
> Implementation of phase envelope for mixtures<http://nbviewer.ipython.org/github/ibell/coolprop/blob/master/Web/mixtures/phase_envelope.ipynb?create=1>
>
> I have a couple of modifications that I would love to see; I'm not sure
> how feasible they are:
>
>    - Cross-referencing.  I have a lot of equations (think tens to
>    hundreds) and several equations and tables and it is nice to be link to
>    other equations within one notebook, but ideally I would like to be able to
>    refer to equations/tables/figures in another notebook (that might be more
>    difficult I know)
>    - Hiding of the code blocks.  Generating figures sometimes requires a
>    lot of hacking around, and its nice to not have the hacking be completely
>    visible, but only after a click through.  Sort of how in Sphinx+MPL, there
>    is a link to download the source for the figure, but the source is not
>    automatically embedded.  If this is already possible, how can I enable it?
>    - Block folding/formatting.  For longer documents, the spacing for the
>    heading 1, heading 2, etc. blocks becomes quite significant, and it would
>    be nice if we could fold blocks within a heading.  Also, it would be nice
>    if we could have more condensed spacing for the headings, or at least,
>    heading 2 spacing much less than heading 1 spacing.
>
> I guess that's it for tonight's ideas.
>
> Kind Regards,
>
> Ian
>
>
>
> _______________________________________________
> 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/20140124/30dc85ce/attachment.html>

From ccordoba12 at gmail.com  Thu Jan 23 22:20:29 2014
From: ccordoba12 at gmail.com (=?UTF-8?B?Q2FybG9zIEPDs3Jkb2Jh?=)
Date: Thu, 23 Jan 2014 22:20:29 -0500
Subject: [IPython-dev] Embedding IPython in IEP
In-Reply-To: <CAB_T6==0BdYohuu4y9J=HtDkY10DQRqFs2-XdEO9qG2jDd86FA@mail.gmail.com>
References: <CAB_T6==0BdYohuu4y9J=HtDkY10DQRqFs2-XdEO9qG2jDd86FA@mail.gmail.com>
Message-ID: <52E1DBFD.8010509@gmail.com>

Hi Almar,

Just a quick question: why are not you guys using RichIPythonWidget from 
the IPython.qt submodule? I mention it because

a) It seems easier to use in a Qt environment than InteractiveShell.
b) I think your users would expect the same IPython behavior as Canopy 
and Spyder offer through it right now.

Cheers,
Carlos

El 20/01/14 09:14, Almar Klein escribi?:
> Hi all,
>
> I am currently working on embedding IPython in IEP (Interactive Editor 
> for Python - http://iep-project.org), and I am interested in getting 
> some feedback.
>
> The approach that I am taking right now is to hook into IPython at a 
> rather low level and integrate it with relatively small changes to the 
> existing code-base for the IEP kernel. It basically comes down to this:
>
> from IPython.core.interactiveshell import InteractiveShell
>
> self._ipython = InteractiveShell(user_module=__main__)
> # set a few hooks ...
> ...
> # When user is sending a line to execute ...
> if self._ipython:
>
> self._ipython.run_cell(source, True)
>
> else:
>
> self._run_cell_natively(source)
>
>
> Apart from this I use custom prompts at sys.ps1 and sys ps2 to 
> simulate the IPython prompts, plus a handfull of small tweaks to make 
> things work as expected.
>
>
> The kernel runs the event loop as usual and arranges for GUI integration.
>
>
> So far things are looking good and everything seems to work as 
> expected. I was mostly wondering whether this approach has any 
> limitations that I overlooked, like some specific IPython feature that 
> is not available with this approach. Also, I would be happy to learn 
> any specific things that I should take into account.
>
>
> Thanks in advance,
>
> Almar
>
>
>
>
>
>
>
>
>
> _______________________________________________
> 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/20140123/e74bdb67/attachment.html>

From konrad.hinsen at fastmail.net  Fri Jan 24 11:44:04 2014
From: konrad.hinsen at fastmail.net (Konrad Hinsen)
Date: Fri, 24 Jan 2014 17:44:04 +0100
Subject: [IPython-dev] Using --debug to trace kernel messages
Message-ID: <21218.38996.739688.432985@Konrad-Hinsens-MacBook-Pro-2.local>

I am trying to explore communication between the notebook and the kernel
by passing the --debug flag to IPython. With the default configuration,
this works fine.

However, as soon as I change KernelManager.kernel_cmd in the
configuration (e.g. in ipython_config.py), all the debug messages
related to the kernel disappear. This happens even if I set kernel_cmd
to the exact same value that it has by default.

Is this a bug or a feature? In the latter case, is there a way
to get debug messages back?

Thanks in advance,
  Konrad.


From bussonniermatthias at gmail.com  Fri Jan 24 12:15:45 2014
From: bussonniermatthias at gmail.com (Matthias BUSSONNIER)
Date: Fri, 24 Jan 2014 18:15:45 +0100
Subject: [IPython-dev] Using --debug to trace kernel messages
In-Reply-To: <21218.38996.739688.432985@Konrad-Hinsens-MacBook-Pro-2.local>
References: <21218.38996.739688.432985@Konrad-Hinsens-MacBook-Pro-2.local>
Message-ID: <57F38270-ACBD-4652-B0EE-21AC10D53D85@gmail.com>


Le 24 janv. 2014 ? 17:44, Konrad Hinsen a ?crit :

> I am trying to explore communication between the notebook and the kernel
> by passing the --debug flag to IPython. With the default configuration,
> this works fine.
> 
> However, as soon as I change KernelManager.kernel_cmd in the
> configuration (e.g. in ipython_config.py), all the debug messages
> related to the kernel disappear. This happens even if I set kernel_cmd
> to the exact same value that it has by default.
> 
> Is this a bug or a feature? In the latter case, is there a way
> to get debug messages back?

You can open an issue on github. 

--debug is equivalent to 

--log-level=DEBUG

cf 

--log-level=<Enum> (Application.log_level)
    Default: 30
    Choices: (0, 10, 20, 30, 40, 50, 'DEBUG', 'INFO', 'WARN', 'ERROR', 'CRITICAL')
    Set the log level by value or name.

which itself is equivalent to 

--Application.log_level=DEBUG

you can also set it independently with 

--NotebookApp.log_level=<Enum>
--IPKernelApp.log_level=<Enum>

(or c. instead of -- in config file) 
Maybe one of those work while we investigate. 
-- 
M


> 
> Thanks in advance,
>  Konrad.
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev



From massimodisasha at gmail.com  Fri Jan 24 13:15:17 2014
From: massimodisasha at gmail.com (epi)
Date: Fri, 24 Jan 2014 13:15:17 -0500
Subject: [IPython-dev] IPython Rocks
Message-ID: <FE5B4914-D662-41E2-966B-C94E23B1EBC2@gmail.com>

Hi All,

i want thank you so much for making IPYthon available and especially with the notebook .. what a wonder fool tool to improve science!
i?d like to share with you the work i'm doing with the IPython notebook. 
Last december I had a chance to contribute  with a poster and a a presentation to the AGU fall meeting [1] 
I posted my experience here [2] from where you can find link to the poster and the presentation as well
they are both entirely based on the IPython notebook so i thought it could be of interest here. 

Everything worked fine, the html slideshow was perfect :-D
this was not possible without your great and hard work!!

Thank you again!

Massimo.

[1] http://tw.rpi.edu/weblog/2014/01/14/open-source-software-science-reproducibility/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140124/6f32a16c/attachment.html>

From benjaminrk at gmail.com  Fri Jan 24 13:58:04 2014
From: benjaminrk at gmail.com (MinRK)
Date: Fri, 24 Jan 2014 10:58:04 -0800
Subject: [IPython-dev] IPython Rocks
In-Reply-To: <FE5B4914-D662-41E2-966B-C94E23B1EBC2@gmail.com>
References: <FE5B4914-D662-41E2-966B-C94E23B1EBC2@gmail.com>
Message-ID: <CAHNn8BV7_McG3TWu6H8SDsQahkP_8ebVfSYP2uBpSg69aZnnHA@mail.gmail.com>

Thanks, it's always great to hear about people doing useful things with
IPython.

-MinRK


On Fri, Jan 24, 2014 at 10:15 AM, epi <massimodisasha at gmail.com> wrote:

> Hi All,
>
> i want thank you so much for making IPYthon available and especially with
> the notebook .. what a wonder fool tool to improve science!
> i?d like to share with you the work i'm doing with the IPython notebook.
> Last december I had a chance to contribute  with a poster and a a
> presentation to the AGU fall meeting [1]
> I posted my experience here [2] from where you can find link to the poster
> and the presentation as well
> they are both entirely based on the IPython notebook so i thought it could
> be of interest here.
>
> Everything worked fine, the html slideshow was perfect :-D
> this was not possible without your great and hard work!!
>
> Thank you again!
>
> Massimo.
>
> [1]
> http://tw.rpi.edu/weblog/2014/01/14/open-source-software-science-reproducibility/
>
> _______________________________________________
> 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/20140124/7e0cbcbe/attachment.html>

From a.klein at science-applied.nl  Fri Jan 24 17:13:08 2014
From: a.klein at science-applied.nl (Almar Klein)
Date: Fri, 24 Jan 2014 23:13:08 +0100
Subject: [IPython-dev] Embedding IPython in IEP
In-Reply-To: <52E1DBFD.8010509@gmail.com>
References: <CAB_T6==0BdYohuu4y9J=HtDkY10DQRqFs2-XdEO9qG2jDd86FA@mail.gmail.com>
	<52E1DBFD.8010509@gmail.com>
Message-ID: <CAB_T6==+-xL8TSM-WdZ2ncteDAf+FzRZp=M6UU-n0+Lnvf-UEg@mail.gmail.com>

> Just a quick question: why are not you guys using RichIPythonWidget from
> the IPython.qt submodule? I mention it because
>
> a) It seems easier to use in a Qt environment than InteractiveShell.
>

Since we already have kernel-IDE communication, debugging, etc.
implemented, using an approach that integrates in a light manner with our
existing framework seemed an easy solution. And until now it seems a pretty
good approach. But I will have a look at the qt module too to see what it
brings extra and what extra work it would entail to integrate it with IEP.

b) I think your users would expect the same IPython behavior as Canopy and
> Spyder offer through it right now.
>

What kind of behavior do you mean?

- Almar






>
>
Cheers,
> Carlos
>
> El 20/01/14 09:14, Almar Klein escribi?:
>
>   Hi all,
>
>  I am currently working on embedding IPython in IEP (Interactive Editor
> for Python - http://iep-project.org), and I am interested in getting some
> feedback.
>
>  The approach that I am taking right now is to hook into IPython at a
> rather low level and integrate it with relatively small changes to the
> existing code-base for the IEP kernel. It basically comes down to this:
>
> from IPython.core.interactiveshell import InteractiveShell
> self._ipython = InteractiveShell(user_module=__main__)
>  # set a few hooks ...
> ...
>  # When user is sending a line to execute ...
>  if self._ipython:
>
> self._ipython.run_cell(source, True)
>
> else:
>
> self._run_cell_natively(source)
>
>
>  Apart from this I use custom prompts at sys.ps1 and sys ps2 to simulate
> the IPython prompts, plus a handfull of small tweaks to make things work as
> expected.
>
>
>  The kernel runs the event loop as usual and arranges for GUI
> integration.
>
>
>  So far things are looking good and everything seems to work as expected.
> I was mostly wondering whether this approach has any limitations that I
> overlooked, like some specific IPython feature that is not available with
> this approach. Also, I would be happy to learn any specific things that I
> should take into account.
>
>
>  Thanks in advance,
>
> Almar
>
>
>
>
>
>
>
>
>
> _______________________________________________
> IPython-dev mailing listIPython-dev at scipy.orghttp://mail.scipy.org/mailman/listinfo/ipython-dev
>
>
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>


-- 
Almar Klein, PhD
Science Applied
phone: +31 6 19268652
e-mail: a.klein at science-applied.nl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140124/d766c1c7/attachment.html>

From carl.input at gmail.com  Fri Jan 24 20:26:15 2014
From: carl.input at gmail.com (Carl Smith)
Date: Sat, 25 Jan 2014 01:26:15 +0000
Subject: [IPython-dev] Quick question out of interest...
Message-ID: <CAP-uhDdXuUyS4HdwNo90JRwa11OaJw+J_QKY2c9SrjrHVdW59A@mail.gmail.com>

Hi all

When looking at the popular scientific computing environments for Python,
there seems to be a trend for building dense UIs, with lots of buttons and
about three panels, much like Eclipse. IPython is far more minimalistic,
wrapping most features with textual interfaces and providing a relatively
linear UI.

Does anyone here who uses the tools with the Eclipse style interfaces, such
as Wakari, Spyder and Canopy, have a few minutes to explain any benefits
they find in working through those types of user interfaces?

This question isn't entirely academic. I'm casually hoping to learn
something about UI design.

Thank you, and as ever, all the best with IPython.

Carl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140125/b515377a/attachment.html>

From takowl at gmail.com  Fri Jan 24 20:45:54 2014
From: takowl at gmail.com (Thomas Kluyver)
Date: Fri, 24 Jan 2014 17:45:54 -0800
Subject: [IPython-dev] Quick question out of interest...
In-Reply-To: <CAP-uhDdXuUyS4HdwNo90JRwa11OaJw+J_QKY2c9SrjrHVdW59A@mail.gmail.com>
References: <CAP-uhDdXuUyS4HdwNo90JRwa11OaJw+J_QKY2c9SrjrHVdW59A@mail.gmail.com>
Message-ID: <CAOvn4qiDjS3KyRkVUWErx6OamSUeqxHa6FxhQ_ckr-A_UKjLHA@mail.gmail.com>

Hi Carl

On 24 January 2014 17:26, Carl Smith <carl.input at gmail.com> wrote:

> Does anyone here who uses the tools with the Eclipse style interfaces,
> such as Wakari, Spyder and Canopy, have a few minutes to explain any
> benefits they find in working through those types of user interfaces?
>

I use Spyder, but I tweak the UI down to two panels. Here's a screenshot:
http://i.imgur.com/FKvUvR6.png

Normally my second panel is open to the 'Outline' view; I find this very
helpful to get an overview of large files. Another common thing people have
is a console inside their IDE - I tend to keep it in a separate window
instead, but I'm switching between that and the IDE quite often, so it's
still part of my programming workflow.

Perhaps your description of the IPython API as 'linear' is significant.
Notebooks tend to be a series of steps presented in order, but larger
coding projects are more like a tree (packages > modules > classes >
methods) with lots of cross references (imports, function calls). So your
thinking when working on them has to be less linear.

Best wishes,
Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140124/f2abd0a3/attachment.html>

From apratap at sagebase.org  Fri Jan 24 21:10:15 2014
From: apratap at sagebase.org (Abhishek Pratap)
Date: Fri, 24 Jan 2014 18:10:15 -0800
Subject: [IPython-dev] customize nbviewer : custom hook for getting Ipython
	notebook
Message-ID: <CAJfJrckoL=mF8vV6OJVgLYtQwSwpAzOHF15AMnP39OOOAexgZQ@mail.gmail.com>

Hey Guys

For the weekend fun  I am trying to find if there is a hook to plugin
a function which can implement a custom method of getting a IPython
notebook and pushed that for display by nbviewer.

In other words currently the nbviewer can work with a gist number or a
public URL. In my local install of it I would like to plug in a
function which can take an internal id, does the job of pulling the
notebook and handover the file to downstream nbviewer code for
display.

Let me know if something is not clear.

Thanks!
-Abhi


From bussonniermatthias at gmail.com  Sat Jan 25 04:42:51 2014
From: bussonniermatthias at gmail.com (Matthias BUSSONNIER)
Date: Sat, 25 Jan 2014 10:42:51 +0100
Subject: [IPython-dev] customize nbviewer : custom hook for getting
	Ipython notebook
In-Reply-To: <CAJfJrckoL=mF8vV6OJVgLYtQwSwpAzOHF15AMnP39OOOAexgZQ@mail.gmail.com>
References: <CAJfJrckoL=mF8vV6OJVgLYtQwSwpAzOHF15AMnP39OOOAexgZQ@mail.gmail.com>
Message-ID: <1B06053B-823A-4F47-B9CB-D419CD94E22E@gmail.com>


Le 25 janv. 2014 ? 03:10, Abhishek Pratap a ?crit :

> Hey Guys
> 
> For the weekend fun  I am trying to find if there is a hook to plugin
> a function which can implement a custom method of getting a IPython
> notebook and pushed that for display by nbviewer.

No there are no hook (yet).

The way to do it would be to create a custom handler, 
and register it here :

https://github.com/ipython/nbviewer/blob/master/nbviewer/handlers.py#L723 

or like done here :

https://github.com/ipython/nbviewer/blob/master/nbviewer/app.py#L152



> In other words currently the nbviewer can work with a gist number or a
> public URL. In my local install of it I would like to plug in a
> function which can take an internal id, does the job of pulling the
> notebook and handover the file to downstream nbviewer code for
> display.
> 

If you like to make a PR that help with plugin, we would be happy to review it. 

You can probably rely on DotedNames, trait lets and/or import_string
and write your custom Handler as a package. 

Does it make sesns ?

-- 
Matthias



From carl.input at gmail.com  Sat Jan 25 21:14:33 2014
From: carl.input at gmail.com (Carl Smith)
Date: Sun, 26 Jan 2014 02:14:33 +0000
Subject: [IPython-dev] Quick question out of interest...
In-Reply-To: <CAOvn4qiDjS3KyRkVUWErx6OamSUeqxHa6FxhQ_ckr-A_UKjLHA@mail.gmail.com>
References: <CAP-uhDdXuUyS4HdwNo90JRwa11OaJw+J_QKY2c9SrjrHVdW59A@mail.gmail.com>
	<CAOvn4qiDjS3KyRkVUWErx6OamSUeqxHa6FxhQ_ckr-A_UKjLHA@mail.gmail.com>
Message-ID: <CAP-uhDeagba700UyhXanNoBRtwANYM-QZw4OoaKjoL9FXP1f9g@mail.gmail.com>

Thanks for taking the time to answer Thomas. Your sense that building
complex applications works better in a less linear interface is
interesting, though I was really aiming to figure out what people gain from
using them for interactive programming, but it seems it's not so much about
that side of things in practice.

Thanks again for taking the time.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140126/d9838036/attachment.html>

From doug.blank at gmail.com  Sun Jan 26 14:40:43 2014
From: doug.blank at gmail.com (Doug Blank)
Date: Sun, 26 Jan 2014 14:40:43 -0500
Subject: [IPython-dev] A Kernel for Java, Scheme, Boo, Logo, Basic, and more
Message-ID: <CAAusYCg04WZk_dcFhME0b2KVaW1hDQWVEkYa0EzLYAx+sdizJQ@mail.gmail.com>

Just a quick status update on a new kernel. Once I got the simple_kernel.py
[1] written and understood, at least to a level, we were able to make fast
progress (a few afternoon hacks) on the real project. This new kernel is
written in C# [2], but is really a wrapper around a set of languages,
including Java, Scheme, Boo, Logo, Python, Ruby, Basic, and some others,
including an assembly language.

Not only can you run all of these via notebook, console, and qtconsole, but
many of the languages share data and functions with each other. Here is a
pointer to a top-level notebook (refresh, as it is changing quickly):

http://nbviewer.ipython.org/urls/bitbucket.org/ipre/calico/raw/master/notebooks/Calico%20Overview.ipynb

Still a lot to do, but just wanted to point to recent results, and say
thanks for the help so far!

-Doug


[1] - https://github.com/dsblank/simple_kernel/blob/master/README.md
[2] -
https://bitbucket.org/ipre/calico/src/master/Source/Calico/ZMQServer.cs?at=master<https://bitbucket.org/ipre/calico/src/e8c66615755a45defe28be7eab1fb6051242a2db/Source/Calico/ZMQServer.cs?at=master>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140126/04c948e1/attachment.html>

From ellisonbg at gmail.com  Sun Jan 26 15:25:10 2014
From: ellisonbg at gmail.com (Brian Granger)
Date: Sun, 26 Jan 2014 12:25:10 -0800
Subject: [IPython-dev] Quick question out of interest...
In-Reply-To: <CAP-uhDeagba700UyhXanNoBRtwANYM-QZw4OoaKjoL9FXP1f9g@mail.gmail.com>
References: <CAP-uhDdXuUyS4HdwNo90JRwa11OaJw+J_QKY2c9SrjrHVdW59A@mail.gmail.com>
	<CAOvn4qiDjS3KyRkVUWErx6OamSUeqxHa6FxhQ_ckr-A_UKjLHA@mail.gmail.com>
	<CAP-uhDeagba700UyhXanNoBRtwANYM-QZw4OoaKjoL9FXP1f9g@mail.gmail.com>
Message-ID: <CAH4pYpSeWzRhYxB1d9r_nh-+MDzjY0MFJ+pi05bNzhV+vJ9ObQ@mail.gmail.com>

I can't speak for the multi-panel UI trends in other dev environments,
but can fill in some thoughts about the notebook UI.

The abstraction the notebook UI represents is that of a document.

* Linear sequence of content that is designed to be read by a human reader.
* Something that tells a story about something - usually of a highly
technical nature.
* Something that can easily be converted to other document types
(HTML, LaTeX/PDF, Markdown/rst, slideshow).

Thus, the goal of our UI is to enable users to create and work with
these documents. But that alone doesn't imply that our UI has to be
simple and single pane. Why do we do that?

* Cognitive load. The human mind can only keep so much in the air at a
time. Most of our users are solving extremely difficult technical
problems with the notebook. They need to be able to put their entire
focus on those technical problems. A complex multi-pane adds to their
cognitive load.
* Visual complexity. When the eyes sees something that is visually
complex, it requires the brain to process all of that information.
Again that pulls the user away from the problems they are trying to
solve.
* Research that has show that simple, prototypical user interfaces are
deemed more aesthetically beautiful:

http://static.googleusercontent.com/external_content/untrusted_dlcp/research.google.com/en/us/pubs/archive/38315.pdf

* The Notebook is a component. Our notebook UI is used in other, more
complex web applications. Keeping the core UI simple allows other
people to use it as a component without the overall complexity getting
out of hand.
* User content is king. When someone looks at a notebook, we want the
focus to be on the user content, not the UI surrounding it.
* Beginning users. We want the notebook to be usable by high school
students with little to no instruction about the UI.
* Widgets. The new widgets in IPython 2.0 will introduce significant
amounts of functional and visual complexity to notebook documents. In
order to keep the overall complexity bounded, the rest of the UI has
to be dead simple.
* Our design skills. We are not skilled designers by any means. Thus,
the more things we try to design, the uglier it gets.

On Sat, Jan 25, 2014 at 6:14 PM, Carl Smith <carl.input at gmail.com> wrote:
> Thanks for taking the time to answer Thomas. Your sense that building
> complex applications works better in a less linear interface is interesting,
> though I was really aiming to figure out what people gain from using them
> for interactive programming, but it seems it's not so much about that side
> of things in practice.
>
> Thanks again for taking the time.
>
> _______________________________________________
> 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


From ellisonbg at gmail.com  Sun Jan 26 15:28:25 2014
From: ellisonbg at gmail.com (Brian Granger)
Date: Sun, 26 Jan 2014 12:28:25 -0800
Subject: [IPython-dev] A Kernel for Java, Scheme, Boo, Logo, Basic,
	and more
In-Reply-To: <CAAusYCg04WZk_dcFhME0b2KVaW1hDQWVEkYa0EzLYAx+sdizJQ@mail.gmail.com>
References: <CAAusYCg04WZk_dcFhME0b2KVaW1hDQWVEkYa0EzLYAx+sdizJQ@mail.gmail.com>
Message-ID: <CAH4pYpS94jpZ_WG8Q-yrkU+N1a8ze6NjwmaMFYq+z7P4SpZPQQ@mail.gmail.com>

Doug,

Awesome, thanks so much for sharing this! I had a quick look. I really
like the :lang abstraction, especially how it is stateful when run in
a cell by itself. It will be fun to watch where this goes. Having
learned to program with logo, I am especially interested in seeing
where that goes. Have you been able to get the pyout and display_data
messages working for rich output?

Cheers,

Brian

On Sun, Jan 26, 2014 at 11:40 AM, Doug Blank <doug.blank at gmail.com> wrote:
> Just a quick status update on a new kernel. Once I got the simple_kernel.py
> [1] written and understood, at least to a level, we were able to make fast
> progress (a few afternoon hacks) on the real project. This new kernel is
> written in C# [2], but is really a wrapper around a set of languages,
> including Java, Scheme, Boo, Logo, Python, Ruby, Basic, and some others,
> including an assembly language.
>
> Not only can you run all of these via notebook, console, and qtconsole, but
> many of the languages share data and functions with each other. Here is a
> pointer to a top-level notebook (refresh, as it is changing quickly):
>
> http://nbviewer.ipython.org/urls/bitbucket.org/ipre/calico/raw/master/notebooks/Calico%20Overview.ipynb
>
> Still a lot to do, but just wanted to point to recent results, and say
> thanks for the help so far!
>
> -Doug
>
>
> [1] - https://github.com/dsblank/simple_kernel/blob/master/README.md
> [2] -
> https://bitbucket.org/ipre/calico/src/master/Source/Calico/ZMQServer.cs?at=master
>
>
>
> _______________________________________________
> 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


From doug.blank at gmail.com  Sun Jan 26 15:58:30 2014
From: doug.blank at gmail.com (Doug Blank)
Date: Sun, 26 Jan 2014 15:58:30 -0500
Subject: [IPython-dev] A Kernel for Java, Scheme, Boo, Logo, Basic,
	and more
In-Reply-To: <CAH4pYpS94jpZ_WG8Q-yrkU+N1a8ze6NjwmaMFYq+z7P4SpZPQQ@mail.gmail.com>
References: <CAAusYCg04WZk_dcFhME0b2KVaW1hDQWVEkYa0EzLYAx+sdizJQ@mail.gmail.com>
	<CAH4pYpS94jpZ_WG8Q-yrkU+N1a8ze6NjwmaMFYq+z7P4SpZPQQ@mail.gmail.com>
Message-ID: <CAAusYChzmnUZwpQAhkf3amJbkHt6G0DND2PhwXYC_G=EwRBM5A@mail.gmail.com>

On Sun, Jan 26, 2014 at 3:28 PM, Brian Granger <ellisonbg at gmail.com> wrote:

> Doug,
>
> Awesome, thanks so much for sharing this! I had a quick look. I really
> like the :lang abstraction, especially how it is stateful when run in
> a cell by itself. It will be fun to watch where this goes. Having
> learned to program with logo, I am especially interested in seeing
> where that goes. Have you been able to get the pyout and display_data
> messages working for rich output?
>
>
Thanks! Actually, I am trying to figure out how display_data and rich
messages work right now. I see the mime-type keys in the data dictionary,
but having some trouble figuring out how they get there from a function
wrapped around a value. Is there an overview that describes the approach?
Or maybe you can point me to the relevant code? I suspect that the Python
kernel side of things has a nice infrastructure... but what is the simplest
approach just as proof of concept to get, say, a gif to appear in the
notebook?

-Doug



> Cheers,
>
> Brian
>
> On Sun, Jan 26, 2014 at 11:40 AM, Doug Blank <doug.blank at gmail.com> wrote:
> > Just a quick status update on a new kernel. Once I got the
> simple_kernel.py
> > [1] written and understood, at least to a level, we were able to make
> fast
> > progress (a few afternoon hacks) on the real project. This new kernel is
> > written in C# [2], but is really a wrapper around a set of languages,
> > including Java, Scheme, Boo, Logo, Python, Ruby, Basic, and some others,
> > including an assembly language.
> >
> > Not only can you run all of these via notebook, console, and qtconsole,
> but
> > many of the languages share data and functions with each other. Here is a
> > pointer to a top-level notebook (refresh, as it is changing quickly):
> >
> >
> http://nbviewer.ipython.org/urls/bitbucket.org/ipre/calico/raw/master/notebooks/Calico%20Overview.ipynb
> >
> > Still a lot to do, but just wanted to point to recent results, and say
> > thanks for the help so far!
> >
> > -Doug
> >
> >
> > [1] - https://github.com/dsblank/simple_kernel/blob/master/README.md
> > [2] -
> >
> https://bitbucket.org/ipre/calico/src/master/Source/Calico/ZMQServer.cs?at=master
> >
> >
> >
> > _______________________________________________
> > 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140126/6ea6e4eb/attachment.html>

From ellisonbg at gmail.com  Sun Jan 26 17:06:52 2014
From: ellisonbg at gmail.com (Brian Granger)
Date: Sun, 26 Jan 2014 14:06:52 -0800
Subject: [IPython-dev] A Kernel for Java, Scheme, Boo, Logo, Basic,
	and more
In-Reply-To: <CAAusYChzmnUZwpQAhkf3amJbkHt6G0DND2PhwXYC_G=EwRBM5A@mail.gmail.com>
References: <CAAusYCg04WZk_dcFhME0b2KVaW1hDQWVEkYa0EzLYAx+sdizJQ@mail.gmail.com>
	<CAH4pYpS94jpZ_WG8Q-yrkU+N1a8ze6NjwmaMFYq+z7P4SpZPQQ@mail.gmail.com>
	<CAAusYChzmnUZwpQAhkf3amJbkHt6G0DND2PhwXYC_G=EwRBM5A@mail.gmail.com>
Message-ID: <CAH4pYpQS9N_rwTQoW5PTE2Bwmzhz93AAe7c7nmvOXq7X4oACWw@mail.gmail.com>

The first, step to get rich output to work is just to see if you can
send one of the display data messages. Here is the message spec:

http://ipython.org/ipython-doc/dev/development/messaging.html

Once you get that working you can work on developing a user facing API
for those messages.  Oh, not sure we support gif images though...

On Sun, Jan 26, 2014 at 12:58 PM, Doug Blank <doug.blank at gmail.com> wrote:
> On Sun, Jan 26, 2014 at 3:28 PM, Brian Granger <ellisonbg at gmail.com> wrote:
>>
>> Doug,
>>
>> Awesome, thanks so much for sharing this! I had a quick look. I really
>> like the :lang abstraction, especially how it is stateful when run in
>> a cell by itself. It will be fun to watch where this goes. Having
>> learned to program with logo, I am especially interested in seeing
>> where that goes. Have you been able to get the pyout and display_data
>> messages working for rich output?
>>
>
> Thanks! Actually, I am trying to figure out how display_data and rich
> messages work right now. I see the mime-type keys in the data dictionary,
> but having some trouble figuring out how they get there from a function
> wrapped around a value. Is there an overview that describes the approach? Or
> maybe you can point me to the relevant code? I suspect that the Python
> kernel side of things has a nice infrastructure... but what is the simplest
> approach just as proof of concept to get, say, a gif to appear in the
> notebook?
>
> -Doug
>
>
>>
>> Cheers,
>>
>> Brian
>>
>> On Sun, Jan 26, 2014 at 11:40 AM, Doug Blank <doug.blank at gmail.com> wrote:
>> > Just a quick status update on a new kernel. Once I got the
>> > simple_kernel.py
>> > [1] written and understood, at least to a level, we were able to make
>> > fast
>> > progress (a few afternoon hacks) on the real project. This new kernel is
>> > written in C# [2], but is really a wrapper around a set of languages,
>> > including Java, Scheme, Boo, Logo, Python, Ruby, Basic, and some others,
>> > including an assembly language.
>> >
>> > Not only can you run all of these via notebook, console, and qtconsole,
>> > but
>> > many of the languages share data and functions with each other. Here is
>> > a
>> > pointer to a top-level notebook (refresh, as it is changing quickly):
>> >
>> >
>> > http://nbviewer.ipython.org/urls/bitbucket.org/ipre/calico/raw/master/notebooks/Calico%20Overview.ipynb
>> >
>> > Still a lot to do, but just wanted to point to recent results, and say
>> > thanks for the help so far!
>> >
>> > -Doug
>> >
>> >
>> > [1] - https://github.com/dsblank/simple_kernel/blob/master/README.md
>> > [2] -
>> >
>> > https://bitbucket.org/ipre/calico/src/master/Source/Calico/ZMQServer.cs?at=master
>> >
>> >
>> >
>> > _______________________________________________
>> > 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


From gmbecker at ucdavis.edu  Sun Jan 26 17:19:41 2014
From: gmbecker at ucdavis.edu (Gabriel Becker)
Date: Sun, 26 Jan 2014 14:19:41 -0800
Subject: [IPython-dev] A Kernel for Java, Scheme, Boo, Logo, Basic,
	and more
In-Reply-To: <CAAusYChzmnUZwpQAhkf3amJbkHt6G0DND2PhwXYC_G=EwRBM5A@mail.gmail.com>
References: <CAAusYCg04WZk_dcFhME0b2KVaW1hDQWVEkYa0EzLYAx+sdizJQ@mail.gmail.com>
	<CAH4pYpS94jpZ_WG8Q-yrkU+N1a8ze6NjwmaMFYq+z7P4SpZPQQ@mail.gmail.com>
	<CAAusYChzmnUZwpQAhkf3amJbkHt6G0DND2PhwXYC_G=EwRBM5A@mail.gmail.com>
Message-ID: <CADwqtCPoVJziMHMbnQZbzoKcAi2KFvBfdx-EgLGip0Q-Wb83ww@mail.gmail.com>

Doug,

This looks very interesting (no love for R though? :( ). Nice work.

Have you considered differentiating the languages by the cells/messages
themselves, rather than directvies within the cell's contents?

I have always thought that code language would be better as an attribute of
the code itself and a distinct part of the message sent. The magics work
the way they do because technically they are still IPython code, and are
evaluated with the IPython evaluator. If your kernel is doing the dispatch
to different evaluators itself, though, there is no need to stick to that
paradigm.

Just my 2 cents.
~G



On Sun, Jan 26, 2014 at 12:58 PM, Doug Blank <doug.blank at gmail.com> wrote:

> On Sun, Jan 26, 2014 at 3:28 PM, Brian Granger <ellisonbg at gmail.com>wrote:
>
>> Doug,
>>
>> Awesome, thanks so much for sharing this! I had a quick look. I really
>> like the :lang abstraction, especially how it is stateful when run in
>> a cell by itself. It will be fun to watch where this goes. Having
>> learned to program with logo, I am especially interested in seeing
>> where that goes. Have you been able to get the pyout and display_data
>> messages working for rich output?
>>
>>
> Thanks! Actually, I am trying to figure out how display_data and rich
> messages work right now. I see the mime-type keys in the data dictionary,
> but having some trouble figuring out how they get there from a function
> wrapped around a value. Is there an overview that describes the approach?
> Or maybe you can point me to the relevant code? I suspect that the Python
> kernel side of things has a nice infrastructure... but what is the simplest
> approach just as proof of concept to get, say, a gif to appear in the
> notebook?
>
> -Doug
>
>
>
>> Cheers,
>>
>> Brian
>>
>> On Sun, Jan 26, 2014 at 11:40 AM, Doug Blank <doug.blank at gmail.com>
>> wrote:
>> > Just a quick status update on a new kernel. Once I got the
>> simple_kernel.py
>> > [1] written and understood, at least to a level, we were able to make
>> fast
>> > progress (a few afternoon hacks) on the real project. This new kernel is
>> > written in C# [2], but is really a wrapper around a set of languages,
>> > including Java, Scheme, Boo, Logo, Python, Ruby, Basic, and some others,
>> > including an assembly language.
>> >
>> > Not only can you run all of these via notebook, console, and qtconsole,
>> but
>> > many of the languages share data and functions with each other. Here is
>> a
>> > pointer to a top-level notebook (refresh, as it is changing quickly):
>> >
>> >
>> http://nbviewer.ipython.org/urls/bitbucket.org/ipre/calico/raw/master/notebooks/Calico%20Overview.ipynb
>> >
>> > Still a lot to do, but just wanted to point to recent results, and say
>> > thanks for the help so far!
>> >
>> > -Doug
>> >
>> >
>> > [1] - https://github.com/dsblank/simple_kernel/blob/master/README.md
>> > [2] -
>> >
>> https://bitbucket.org/ipre/calico/src/master/Source/Calico/ZMQServer.cs?at=master
>> >
>> >
>> >
>> > _______________________________________________
>> > 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
>
>


-- 
Gabriel Becker
Graduate Student
Statistics Department
University of California, Davis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140126/b1d61e0b/attachment.html>

From gmbecker at ucdavis.edu  Sun Jan 26 17:31:24 2014
From: gmbecker at ucdavis.edu (Gabriel Becker)
Date: Sun, 26 Jan 2014 14:31:24 -0800
Subject: [IPython-dev] A Kernel for Java, Scheme, Boo, Logo, Basic,
	and more
In-Reply-To: <CADwqtCPoVJziMHMbnQZbzoKcAi2KFvBfdx-EgLGip0Q-Wb83ww@mail.gmail.com>
References: <CAAusYCg04WZk_dcFhME0b2KVaW1hDQWVEkYa0EzLYAx+sdizJQ@mail.gmail.com>
	<CAH4pYpS94jpZ_WG8Q-yrkU+N1a8ze6NjwmaMFYq+z7P4SpZPQQ@mail.gmail.com>
	<CAAusYChzmnUZwpQAhkf3amJbkHt6G0DND2PhwXYC_G=EwRBM5A@mail.gmail.com>
	<CADwqtCPoVJziMHMbnQZbzoKcAi2KFvBfdx-EgLGip0Q-Wb83ww@mail.gmail.com>
Message-ID: <CADwqtCPvHFm4JLN8XXim+itJPBKTiW_TG03M+9PL1th40B9a7A@mail.gmail.com>

I missed the state concept when reading this the first time. Since the
language isn't associated with the cells themselves my previous comments
are not relevant here. Sorry about the noise.

~G


On Sun, Jan 26, 2014 at 2:19 PM, Gabriel Becker <gmbecker at ucdavis.edu>wrote:

> Doug,
>
> This looks very interesting (no love for R though? :( ). Nice work.
>
> Have you considered differentiating the languages by the cells/messages
> themselves, rather than directvies within the cell's contents?
>
> I have always thought that code language would be better as an attribute
> of the code itself and a distinct part of the message sent. The magics work
> the way they do because technically they are still IPython code, and are
> evaluated with the IPython evaluator. If your kernel is doing the dispatch
> to different evaluators itself, though, there is no need to stick to that
> paradigm.
>
> Just my 2 cents.
> ~G
>
>
>
> On Sun, Jan 26, 2014 at 12:58 PM, Doug Blank <doug.blank at gmail.com> wrote:
>
>> On Sun, Jan 26, 2014 at 3:28 PM, Brian Granger <ellisonbg at gmail.com>wrote:
>>
>>> Doug,
>>>
>>> Awesome, thanks so much for sharing this! I had a quick look. I really
>>> like the :lang abstraction, especially how it is stateful when run in
>>> a cell by itself. It will be fun to watch where this goes. Having
>>> learned to program with logo, I am especially interested in seeing
>>> where that goes. Have you been able to get the pyout and display_data
>>> messages working for rich output?
>>>
>>>
>> Thanks! Actually, I am trying to figure out how display_data and rich
>> messages work right now. I see the mime-type keys in the data dictionary,
>> but having some trouble figuring out how they get there from a function
>> wrapped around a value. Is there an overview that describes the approach?
>> Or maybe you can point me to the relevant code? I suspect that the Python
>> kernel side of things has a nice infrastructure... but what is the simplest
>> approach just as proof of concept to get, say, a gif to appear in the
>> notebook?
>>
>> -Doug
>>
>>
>>
>>> Cheers,
>>>
>>> Brian
>>>
>>> On Sun, Jan 26, 2014 at 11:40 AM, Doug Blank <doug.blank at gmail.com>
>>> wrote:
>>> > Just a quick status update on a new kernel. Once I got the
>>> simple_kernel.py
>>> > [1] written and understood, at least to a level, we were able to make
>>> fast
>>> > progress (a few afternoon hacks) on the real project. This new kernel
>>> is
>>> > written in C# [2], but is really a wrapper around a set of languages,
>>> > including Java, Scheme, Boo, Logo, Python, Ruby, Basic, and some
>>> others,
>>> > including an assembly language.
>>> >
>>> > Not only can you run all of these via notebook, console, and
>>> qtconsole, but
>>> > many of the languages share data and functions with each other. Here
>>> is a
>>> > pointer to a top-level notebook (refresh, as it is changing quickly):
>>> >
>>> >
>>> http://nbviewer.ipython.org/urls/bitbucket.org/ipre/calico/raw/master/notebooks/Calico%20Overview.ipynb
>>> >
>>> > Still a lot to do, but just wanted to point to recent results, and say
>>> > thanks for the help so far!
>>> >
>>> > -Doug
>>> >
>>> >
>>> > [1] - https://github.com/dsblank/simple_kernel/blob/master/README.md
>>> > [2] -
>>> >
>>> https://bitbucket.org/ipre/calico/src/master/Source/Calico/ZMQServer.cs?at=master
>>> >
>>> >
>>> >
>>> > _______________________________________________
>>> > 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
>>
>>
>
>
> --
> Gabriel Becker
> Graduate Student
> Statistics Department
> University of California, Davis
>



-- 
Gabriel Becker
Graduate Student
Statistics Department
University of California, Davis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140126/7add133b/attachment.html>

From rosborn at anl.gov  Sun Jan 26 17:33:40 2014
From: rosborn at anl.gov (Osborn, Raymond)
Date: Sun, 26 Jan 2014 22:33:40 +0000
Subject: [IPython-dev] Quick question out of interest...
In-Reply-To: <CAP-uhDdXuUyS4HdwNo90JRwa11OaJw+J_QKY2c9SrjrHVdW59A@mail.gmail.com>
References: <CAP-uhDdXuUyS4HdwNo90JRwa11OaJw+J_QKY2c9SrjrHVdW59A@mail.gmail.com>
Message-ID: <79A990EED3494347BA75DDC4BD0E57BB33338329@DITKA.anl.gov>

I'm generally a fan of minimalist UIs, but we also went for the three-panel approach in NeXpy <http://nexpy.github.io/nexpy/>, which is a new PySide application for viewing and analyzing x-ray and neutron scattering data stored in the NeXus format. One panel is an IPython shell, the other a Matplotlib pane, and the third a tree view of the currently loaded NeXus files, that is synchronized to the IPython shell dictionary.

The reason for adding the tree view is to help the user keep track of the data they are manipulating and plotting. When we are combining lots of different data files in a joint analysis, it becomes difficult keeping track of their names and current states. The goal is to allow the power user the complete freedom provided by the shell while giving new users a few handy GUI shortcuts, e.g., double-clicking on a dataset in the tree to plot it.

Ray

________________________________
From: ipython-dev-bounces at scipy.org [ipython-dev-bounces at scipy.org] on behalf of Carl Smith [carl.input at gmail.com]
Sent: Friday, January 24, 2014 7:26 PM
To: IPython developers list
Subject: [IPython-dev] Quick question out of interest...

Hi all

When looking at the popular scientific computing environments for Python, there seems to be a trend for building dense UIs, with lots of buttons and about three panels, much like Eclipse. IPython is far more minimalistic, wrapping most features with textual interfaces and providing a relatively linear UI.

Does anyone here who uses the tools with the Eclipse style interfaces, such as Wakari, Spyder and Canopy, have a few minutes to explain any benefits they find in working through those types of user interfaces?

This question isn't entirely academic. I'm casually hoping to learn something about UI design.

Thank you, and as ever, all the best with IPython.

Carl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140126/e4c74300/attachment.html>

From carl.input at gmail.com  Sun Jan 26 21:46:08 2014
From: carl.input at gmail.com (Carl Smith)
Date: Mon, 27 Jan 2014 02:46:08 +0000
Subject: [IPython-dev] Quick question out of interest...
In-Reply-To: <79A990EED3494347BA75DDC4BD0E57BB33338329@DITKA.anl.gov>
References: <CAP-uhDdXuUyS4HdwNo90JRwa11OaJw+J_QKY2c9SrjrHVdW59A@mail.gmail.com>
	<79A990EED3494347BA75DDC4BD0E57BB33338329@DITKA.anl.gov>
Message-ID: <CAP-uhDegdqN69oPaH5RX0TV0eMYRnWHkbmGnutGQ06Z=yY6s-A@mail.gmail.com>

Thanks to both Brian and Ray. Your answers provide a nice little overview
of why and why not keep it single view. Brian's reasoning for the Notebook
is a pretty nice starting point for thinking about modern shells in general.

On Ray's comments, it is obviously helpful to have a ready view of imagery
when doing certain kinds of work, and Thomas also mentioned having an
overview of things like the contents of files and directories. I personally
prefer something shell-like, but with the ability to open useful secondary
interfaces, like critically a text editor, in maximised views, so there's
always just one interface in view at a time, basically tabs with different
UIs in, though for something specialised like NeXpy, it probably does make
a lot of sense to do it the way you have.

Thanks again for taking the time, and for sharing your thoughts.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140127/e0b60b82/attachment.html>

From takowl at gmail.com  Sun Jan 26 22:07:16 2014
From: takowl at gmail.com (Thomas Kluyver)
Date: Sun, 26 Jan 2014 19:07:16 -0800
Subject: [IPython-dev] Quick question out of interest...
In-Reply-To: <CAP-uhDegdqN69oPaH5RX0TV0eMYRnWHkbmGnutGQ06Z=yY6s-A@mail.gmail.com>
References: <CAP-uhDdXuUyS4HdwNo90JRwa11OaJw+J_QKY2c9SrjrHVdW59A@mail.gmail.com>
	<79A990EED3494347BA75DDC4BD0E57BB33338329@DITKA.anl.gov>
	<CAP-uhDegdqN69oPaH5RX0TV0eMYRnWHkbmGnutGQ06Z=yY6s-A@mail.gmail.com>
Message-ID: <CAOvn4qj4aVJaA5Mab+Fhb8ZFSd3scE=WzhHbeheTwo1Q0T048A@mail.gmail.com>

On 26 Jan 2014 18:46, "Carl Smith" <carl.input at gmail.com> wrote:
> On Ray's comments, it is obviously helpful to have a ready view of
imagery when doing certain kinds of work, and Thomas also mentioned having
an overview of things like the contents of files and directories. I
personally prefer something shell-like, but with the ability to open useful
secondary interfaces, like critically a text editor, in maximised views, so
there's always just one interface in view at a time, basically tabs with
different UIs in, though for something specialised like NeXpy, it probably
does make a lot of sense to do it the way you have.

More specifically, I think multiple panes are kind of the ultimate form of
multitasking. Eye movements are the quickest and most effortless way to
switch contexts. For information that's closely connected, like different
levels of detail on the contents of a file,  that can make a lot of sense.
But I often want to prevent my brain from switching to something else too
easily. As an aside, I sometimes think modern computer interfaces are so
good at multitasking that it impedes focussing on a single task.

Also, perhaps the notebook ui is not all that different - although it's not
in panes, it interleaves code editing, result viewing and note taking in
the same view.

Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140126/265cb778/attachment.html>

From matthias at matthias-k.org  Mon Jan 27 10:56:12 2014
From: matthias at matthias-k.org (Matthias =?ISO-8859-1?Q?K=FCmmerer?=)
Date: Mon, 27 Jan 2014 16:56:12 +0100
Subject: [IPython-dev] fancyboxes in IPython Notebooks
In-Reply-To: <CAH4pYpTYujb1uDvotW8LavukgTCFWDmc3m02B2-igyyrXbDiZw@mail.gmail.com>
References: <1730399.HYKpIib2F9@klio>
	<CAH4pYpTYujb1uDvotW8LavukgTCFWDmc3m02B2-igyyrXbDiZw@mail.gmail.com>
Message-ID: <3967931.qfdihfrsKB@klio>

Hi,

sorry for the long delay.

> We should probably have an event that fires after the markdown cell is
> rendered that third party extensions can handle for things like this.
okay. If I have seen correctly, this event is not yet there? Can I help to 
implement it in some way?

Best,
  Matthias

> 
> On Wed, Oct 23, 2013 at 7:33 AM, Matthias K?mmerer
> 
> <matthias at matthias-k.org> wrote:
> > Hi all,
> > 
> > I am a PhD student in computational neuroscience and I am using IPython
> > Notebooks besides data analysis etc. for keeping my lab journal, where I
> > document my results. For that, I save the figures that I want to have in
> > the lab journal in a subfolder and include them in the notebook using
> > markdown (actually I wrote a small library some to automate this process.
> > It is still very alpha, but very useful for me [1]).
> > 
> > For the lab journal, I would prefer to have my plots only as small
> > pictures
> > included to make scrolling trough the notebook easier. But of course at
> > some point I may need the actual plot in full resolution. Thus I thought
> > it would be great, if there is an easy way to make the images clickable
> > with the full size image appearing after an click, e.g. using jquery
> > fancybox (see [2] or [3] for an older version). Basically this is very
> > easy to use, but I am not sure how I could make it usable in the
> > notebook. The easiest way would be just to include fancybox somehow and
> > write the html-code in the markdown cells for the href:
> > 
> > <a class="fancybox" rel="group" href="big_image_1.jpg"><img
> > src="small_image_1.jpg" alt="" /></a>
> > 
> > but then still some javascript code has to deal with creating the fancy
> > box. It would probably be more elegant to have some kind of extension in
> > the IPython Notebook that deals with this automatically and converts
> > markdown images in fancy box links.
> > 
> > I would be very interested in this feature and I am definitely willing to
> > invest some time on this if you could give me some hints how this could be
> > plugged into IPython Notebook best.
> > 
> > Thanks for your help and the work on IPython!
> > Best,
> > 
> >   Matthias
> > 
> > [1] https://github.com/matthias-k/ipython-journal
> > [2] http://fancyapps.com/fancybox/
> > [3] http://fancybox.net/
> > _______________________________________________
> > IPython-dev mailing list
> > IPython-dev at scipy.org
> > http://mail.scipy.org/mailman/listinfo/ipython-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140127/5c45ce8b/attachment.sig>

From bussonniermatthias at gmail.com  Mon Jan 27 11:12:47 2014
From: bussonniermatthias at gmail.com (Matthias BUSSONNIER)
Date: Mon, 27 Jan 2014 17:12:47 +0100
Subject: [IPython-dev] fancyboxes in IPython Notebooks
In-Reply-To: <3967931.qfdihfrsKB@klio>
References: <1730399.HYKpIib2F9@klio>
	<CAH4pYpTYujb1uDvotW8LavukgTCFWDmc3m02B2-igyyrXbDiZw@mail.gmail.com>
	<3967931.qfdihfrsKB@klio>
Message-ID: <C1B4F469-AA82-44BB-B503-9E7AAE765BBD@gmail.com>


Le 27 janv. 2014 ? 16:56, Matthias K?mmerer a ?crit :

> Hi,
> 
> sorry for the long delay.
> 
>> We should probably have an event that fires after the markdown cell is
>> rendered that third party extensions can handle for things like this.
> okay. If I have seen correctly, this event is not yet there? Can I help to 
> implement it in some way?
> 


Yes, I suppose you would write JS around here[1] I guess.

-- 
Matthias

> Best,
>  Matthias


[1] https://github.com/ipython/ipython/blob/master/IPython/html/static/notebook/js/textcell.js#L366



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

From stefan at sun.ac.za  Mon Jan 27 12:02:59 2014
From: stefan at sun.ac.za (=?ISO-8859-1?Q?St=E9fan_van_der_Walt?=)
Date: Mon, 27 Jan 2014 18:02:59 +0100
Subject: [IPython-dev] Please read: IPython Notebook UI goes modal
In-Reply-To: <CAH4pYpTdWX_x_UGMOGgEsK=Rw9CDSuzW7Coj930c_n6WNrqfJw@mail.gmail.com>
References: <CAH4pYpQAfZeCyfbPakKQ8gSLkCo6qzg+jnUE22wbT5-51hAwLg@mail.gmail.com>
	<CA+-1RQQnDd2ncZFRRiz7Zfawn6imssGWBXeP1qW3_v1cvBAiLw@mail.gmail.com>
	<CAMqwjDZn0eV2i3ze=mXjJ4s+-HtSHg5dM4+6Oej4BzO+Jwe5Jg@mail.gmail.com>
	<CAP4Ca8U_-tBMAnhSjbogTorFvpnTh0T2PX=dg9FMYpJmwFCYEQ@mail.gmail.com>
	<CAH4pYpTdWX_x_UGMOGgEsK=Rw9CDSuzW7Coj930c_n6WNrqfJw@mail.gmail.com>
Message-ID: <CABDkGQ=sBxsEZGQyDMTM+G6iif_bVmVvVXZHNNxHwtZd4Wwbcw@mail.gmail.com>

Hey, Brian

On Sat, Jan 11, 2014 at 10:02 PM, Brian Granger <ellisonbg at gmail.com> wrote:
> What about the double press logic we use for the delete (d d) instead
> of a modifier?

I just switched to the new modal interface, and it handles very well.

My only gripe is with the "i" shortcut that, even as a casual vim
user, I tend to press all the time.  Requiring at least a double press
would be good.

I've also noticed that having a cell towards the top of the document, such as

import time
for i in xrange(100000):
    time.sleep(1)
    print i

executing, causes the currently focused cell to keep moving down.

Thanks for all the hard work you put into this!

Regards
St?fan


From ellisonbg at gmail.com  Mon Jan 27 12:19:27 2014
From: ellisonbg at gmail.com (Brian Granger)
Date: Mon, 27 Jan 2014 09:19:27 -0800
Subject: [IPython-dev] Please read: IPython Notebook UI goes modal
In-Reply-To: <CABDkGQ=sBxsEZGQyDMTM+G6iif_bVmVvVXZHNNxHwtZd4Wwbcw@mail.gmail.com>
References: <CAH4pYpQAfZeCyfbPakKQ8gSLkCo6qzg+jnUE22wbT5-51hAwLg@mail.gmail.com>
	<CA+-1RQQnDd2ncZFRRiz7Zfawn6imssGWBXeP1qW3_v1cvBAiLw@mail.gmail.com>
	<CAMqwjDZn0eV2i3ze=mXjJ4s+-HtSHg5dM4+6Oej4BzO+Jwe5Jg@mail.gmail.com>
	<CAP4Ca8U_-tBMAnhSjbogTorFvpnTh0T2PX=dg9FMYpJmwFCYEQ@mail.gmail.com>
	<CAH4pYpTdWX_x_UGMOGgEsK=Rw9CDSuzW7Coj930c_n6WNrqfJw@mail.gmail.com>
	<CABDkGQ=sBxsEZGQyDMTM+G6iif_bVmVvVXZHNNxHwtZd4Wwbcw@mail.gmail.com>
Message-ID: <CAH4pYpRo7148SJryyxUySjKfHghOpMMZSF2TX+RbPF9-vRPKDQ@mail.gmail.com>

Stefan,

Thanks for the feedback.

We plan on making interrupt a double press i.

I will have a look at the second issue you bring up.

Cheers,

Brian

On Mon, Jan 27, 2014 at 9:02 AM, St?fan van der Walt <stefan at sun.ac.za> wrote:
> Hey, Brian
>
> On Sat, Jan 11, 2014 at 10:02 PM, Brian Granger <ellisonbg at gmail.com> wrote:
>> What about the double press logic we use for the delete (d d) instead
>> of a modifier?
>
> I just switched to the new modal interface, and it handles very well.
>
> My only gripe is with the "i" shortcut that, even as a casual vim
> user, I tend to press all the time.  Requiring at least a double press
> would be good.
>
> I've also noticed that having a cell towards the top of the document, such as
>
> import time
> for i in xrange(100000):
>     time.sleep(1)
>     print i
>
> executing, causes the currently focused cell to keep moving down.
>
> Thanks for all the hard work you put into this!
>
> Regards
> St?fan
> _______________________________________________
> 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


From raymond.yee at gmail.com  Mon Jan 27 12:35:19 2014
From: raymond.yee at gmail.com (Raymond Yee)
Date: Mon, 27 Jan 2014 09:35:19 -0800
Subject: [IPython-dev] displaying JavaScript-based maps in Notebook: tips?
Message-ID: <52E698D7.4090102@gmail.com>

Hi everyone,

For the Working with Open Data course I'm currently teaching
(http://is.gd/wwod14), I would like to work out with my students a way
to generate light-weight maps to be displayed inside of the IPython
notebook. Specifically, I would like to generate data to feed to various
JavaScript libraries including:

* Google geo charts:
https://developers.google.com/chart/interactive/docs/gallery/geochart
* d3.js (for many uses, for most immediately for a US county choropleth:
http://bl.ocks.org/mbostock/4060606
* vega via vincent -- e.g.,
https://vincent.readthedocs.org/en/latest/quickstart.html#map-data-binding
* richer JavaScript maps with underlying layers, such as provided by
leaflet.js (e.g., http://leafletjs.com/examples/choropleth.html)

I've been superficially aware of the rich data display capabilities of
the Notebook. And it's great to have some good working details on how to
exploit such capabilities in the IPython in Depth tutorial
(http://conference.scipy.org/scipy2013/tutorial_detail.php?id=104):

* IPython's Rich Display System:
http://nbviewer.ipython.org/github/ipython/ipython-in-depth/blob/master/notebooks/03%20-%20Rich%20Display%20System.ipynb

* Defining Custom Display Logic for Your Own Objects:
http://nbviewer.ipython.org/github/ipython/ipython-in-depth/blob/master/notebooks/04%20-%20Custom%20Display%20Logic.ipynb

The path I've started down the last few days is to:

* Get examples of the various JavaScript libraries working in a
stand-alone HTML page
* Get the example to work in an IPython notebook
* Generalize the examples into Python classes to use the display system

I've encountered a mix of success and confusion. But I know enough to
ask a few questions:

* Any pitfalls you've seen around IPython's use of require.js that I
should be mindful of?

I *think* that I've been running into bad interactions with require.js
that I don't yet understand. In one simple case of trying to use d3.js,
I found that I couldn't instantiate the d3 JavaScript object. The
symptoms I saw are reminiscent of ones reported in stackoverflow -- and
to which Matthias had responded to:
http://stackoverflow.com/questions/19487121/how-can-i-load-raphael-within-ipython-notebook-avoiding-some-issues-that-arise


This morning I have a notebook (running IPython 1.1 + vincent 0.4.2)
that runs a vincent example well the first time -- but when I reset the
kernel and run it the second time (without closing the tab), I encounter
the following error:

Javascript error adding output! Error {requireType: "mismatch",
requireModules: undefined, stack: (...), message: "Mismatched anonymous
define() module: [object
Object]?http://requirejs.org/docs/errors.html#mismatch"}

[I can write this observation up more rigorously if necessary.]

* Given that there's a lot of changes happening on the JavaScript
integration front, is it still worthwhile following the approaches laid
out in the IPython in Depth tutorials around working with the display
system and JavaScript? Or should I be patient? (I know I could, for
example, focus on generating HTML output to be written out and loaded
outside of the notebook to avoid direct integration while things shake
out....

BTW, in looking up Fernando & Brian's SciPy2013 IPython tutorial, I
found Using geospatial data with python
(http://conference.scipy.org/scipy2013/tutorial_detail.php?id=110),
which I should look at soon!

Thanks!

-Raymond



From zvoros at gmail.com  Mon Jan 27 12:42:48 2014
From: zvoros at gmail.com (=?UTF-8?B?Wm9sdMOhbiBWw7Zyw7Zz?=)
Date: Mon, 27 Jan 2014 18:42:48 +0100
Subject: [IPython-dev] displaying JavaScript-based maps in Notebook:
	tips?
In-Reply-To: <52E698D7.4090102@gmail.com>
References: <52E698D7.4090102@gmail.com>
Message-ID: <52E69A98.1090109@gmail.com>

I think you might find Jake Vanderplas' matplotlib port to the notebook 
quite useful:

https://github.com/jakevdp/mpld3

Cheers,
Zolt?n


On 27/01/14 18:35, Raymond Yee wrote:
> Hi everyone,
>
> For the Working with Open Data course I'm currently teaching
> (http://is.gd/wwod14), I would like to work out with my students a way
> to generate light-weight maps to be displayed inside of the IPython
> notebook. Specifically, I would like to generate data to feed to various
> JavaScript libraries including:
>
> * Google geo charts:
> https://developers.google.com/chart/interactive/docs/gallery/geochart
> * d3.js (for many uses, for most immediately for a US county choropleth:
> http://bl.ocks.org/mbostock/4060606
> * vega via vincent -- e.g.,
> https://vincent.readthedocs.org/en/latest/quickstart.html#map-data-binding
> * richer JavaScript maps with underlying layers, such as provided by
> leaflet.js (e.g., http://leafletjs.com/examples/choropleth.html)
>
> I've been superficially aware of the rich data display capabilities of
> the Notebook. And it's great to have some good working details on how to
> exploit such capabilities in the IPython in Depth tutorial
> (http://conference.scipy.org/scipy2013/tutorial_detail.php?id=104):
>
> * IPython's Rich Display System:
> http://nbviewer.ipython.org/github/ipython/ipython-in-depth/blob/master/notebooks/03%20-%20Rich%20Display%20System.ipynb
>
> * Defining Custom Display Logic for Your Own Objects:
> http://nbviewer.ipython.org/github/ipython/ipython-in-depth/blob/master/notebooks/04%20-%20Custom%20Display%20Logic.ipynb
>
> The path I've started down the last few days is to:
>
> * Get examples of the various JavaScript libraries working in a
> stand-alone HTML page
> * Get the example to work in an IPython notebook
> * Generalize the examples into Python classes to use the display system
>
> I've encountered a mix of success and confusion. But I know enough to
> ask a few questions:
>
> * Any pitfalls you've seen around IPython's use of require.js that I
> should be mindful of?
>
> I *think* that I've been running into bad interactions with require.js
> that I don't yet understand. In one simple case of trying to use d3.js,
> I found that I couldn't instantiate the d3 JavaScript object. The
> symptoms I saw are reminiscent of ones reported in stackoverflow -- and
> to which Matthias had responded to:
> http://stackoverflow.com/questions/19487121/how-can-i-load-raphael-within-ipython-notebook-avoiding-some-issues-that-arise
>
>
> This morning I have a notebook (running IPython 1.1 + vincent 0.4.2)
> that runs a vincent example well the first time -- but when I reset the
> kernel and run it the second time (without closing the tab), I encounter
> the following error:
>
> Javascript error adding output! Error {requireType: "mismatch",
> requireModules: undefined, stack: (...), message: "Mismatched anonymous
> define() module: [object
> Object]?http://requirejs.org/docs/errors.html#mismatch"}
>
> [I can write this observation up more rigorously if necessary.]
>
> * Given that there's a lot of changes happening on the JavaScript
> integration front, is it still worthwhile following the approaches laid
> out in the IPython in Depth tutorials around working with the display
> system and JavaScript? Or should I be patient? (I know I could, for
> example, focus on generating HTML output to be written out and loaded
> outside of the notebook to avoid direct integration while things shake
> out....
>
> BTW, in looking up Fernando & Brian's SciPy2013 IPython tutorial, I
> found Using geospatial data with python
> (http://conference.scipy.org/scipy2013/tutorial_detail.php?id=110),
> which I should look at soon!
>
> Thanks!
>
> -Raymond
>
> _______________________________________________
> 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/20140127/43e489f4/attachment.html>

From wrobstory at gmail.com  Mon Jan 27 14:19:48 2014
From: wrobstory at gmail.com (wrobstory)
Date: Mon, 27 Jan 2014 11:19:48 -0800 (PST)
Subject: [IPython-dev] displaying JavaScript-based maps in Notebook:
	tips?
In-Reply-To: <52E698D7.4090102@gmail.com>
References: <52E698D7.4090102@gmail.com>
Message-ID: <1390850388733-5045451.post@n6.nabble.com>

I just pushed version 0.4.3 of Vincent, which *should* fix the error issue.
Please let me know here: https://github.com/wrobstory/vincent/issues/92 if
it's still broken. 

Regarding other mapping tools, it wouldn't take a tremendous amount of work
to get Folium working in the notebook: https://github.com/wrobstory/folium. 

As Zoltan mentioned, you  might want to try hooking up mpld3 to basemap:
http://matplotlib.org/basemap/ I'm not entirely sure how well this will
work, but it's worth a shot. 

Cheers, 

Rob



--
View this message in context: http://python.6.x6.nabble.com/displaying-JavaScript-based-maps-in-Notebook-tips-tp5045435p5045451.html
Sent from the IPython - Development mailing list archive at Nabble.com.


From raymond.yee at gmail.com  Mon Jan 27 15:27:20 2014
From: raymond.yee at gmail.com (Raymond Yee)
Date: Mon, 27 Jan 2014 12:27:20 -0800
Subject: [IPython-dev] displaying JavaScript-based maps in Notebook:
	tips?
In-Reply-To: <1390850388733-5045451.post@n6.nabble.com>
References: <52E698D7.4090102@gmail.com>
	<1390850388733-5045451.post@n6.nabble.com>
Message-ID: <52E6C128.6080402@gmail.com>

Hi Rob,

First of all, thanks so much for vincent -- I definitely plan to use it
personally and in my course.

Alas, v 0.4.3 has the same problem for me as v 0.4.2.  I can't get a
world map to show because the TopoJSON library is not loading.  I've
reported the issue: https://github.com/wrobstory/vincent/issues/93

I'll definitely take a look at folium.  And I've started plowing through
mpld3.  Didn't think too hard earlier about hooking basemap up with
mpld3 because I find basemap takes a bit of crunching to show maps and
thought naively that hooking it up with mpld3 might be slow -- but your
encouragement gets me to take a look to test my naive notions. :-)

-Raymond

On 1/27/14 11:19 AM, wrobstory wrote:
> I just pushed version 0.4.3 of Vincent, which *should* fix the error issue.
> Please let me know here: https://github.com/wrobstory/vincent/issues/92 if
> it's still broken. 
>
> Regarding other mapping tools, it wouldn't take a tremendous amount of work
> to get Folium working in the notebook: https://github.com/wrobstory/folium. 
>
> As Zoltan mentioned, you  might want to try hooking up mpld3 to basemap:
> http://matplotlib.org/basemap/ I'm not entirely sure how well this will
> work, but it's worth a shot. 
>
> Cheers, 
>
> Rob
>
>
>


From wstein at gmail.com  Tue Jan 28 00:46:44 2014
From: wstein at gmail.com (William Stein)
Date: Mon, 27 Jan 2014 21:46:44 -0800
Subject: [IPython-dev] [sage-cloud] Re: YouTube video in IPython notebook
In-Reply-To: <7fe1f328-e513-46f2-99eb-2be527852391@googlegroups.com>
References: <7ebdccfd-001e-47ff-97f4-9995a94df76b@googlegroups.com>
	<9caaf62c-91e3-4a19-967b-a14179808a3b@googlegroups.com>
	<7fe1f328-e513-46f2-99eb-2be527852391@googlegroups.com>
Message-ID: <CACLE5GAdz=U1VQP+63wwXzNwQM-nN=tuNX+66N_mikkoY_Ks-Q@mail.gmail.com>

I'm cross-posting this to ipython-dev. It's about user doing

    from IPython.display import YouTubeVideo
    YouTubeVideo('YyEReiAYGlU')

and it not working when using IPython in SageMathCloud
(https://cloud.sagemath.com), which is a hosted IPython service.
See below -- the problem is that the iframe grabs the http youtube
site instead of https...

On Mon, Jan 27, 2014 at 9:32 PM, Ivica Naki? <zzivee at gmail.com> wrote:
> The code works in the local IPython notebook on my computer, and the
> versions on my computer and SMC are the same (1.1.0). So I don't see how
> that can be an upstream bug.
> The same thing happens on SMC also for IPython notebook which is run from
> the terminal.

I think Harald didn't explain himself very clearly.  IPython outputs

<iframe width="400" height="300;"
src="http://www.youtube.com/embed/YyEReiAYGlU" frameborder="0"
allowfullscreen=""></iframe>

and indeed this can't work in SMC, because SMC is served securely over
SSL.     Instead, what IPython needs to do is output

<iframe width="400" height="300;"
src="https://www.youtube.com/embed/YyEReiAYGlU" frameborder="0"
allowfullscreen=""></iframe>

In fact, I just tried changing the http to https using the Chrome
debugger, and the video then works fine.
The IPython source code has http (instead of https) hard coded, unfortunately.

William


>
> Ivica
>
>
> Dana ponedjeljak, 27. sije?nja 2014. 20:47:07 UTC+1, korisnik Harald Schilly
> napisao je:
>>
>> The generated code by IPython is
>>
>> <iframe width="400" height="300&quot;"
>> src="http://www.youtube.com/embed/YyEReiAYGlU" frameborder="0"
>> allowfullscreen=""></iframe>
>>
>> ... hence it cannot work. Maybe, somebody should post that as an upstream
>> ticket (easy to fix) or search if there already exists one?
>>
>> Harald
>>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-cloud" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-cloud+unsubscribe at googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-cloud/7fe1f328-e513-46f2-99eb-2be527852391%40googlegroups.com.
>
> For more options, visit https://groups.google.com/groups/opt_out.



-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.org


From ellisonbg at gmail.com  Tue Jan 28 01:01:17 2014
From: ellisonbg at gmail.com (Brian Granger)
Date: Mon, 27 Jan 2014 22:01:17 -0800
Subject: [IPython-dev] [sage-cloud] Re: YouTube video in IPython notebook
In-Reply-To: <CACLE5GAdz=U1VQP+63wwXzNwQM-nN=tuNX+66N_mikkoY_Ks-Q@mail.gmail.com>
References: <7ebdccfd-001e-47ff-97f4-9995a94df76b@googlegroups.com>
	<9caaf62c-91e3-4a19-967b-a14179808a3b@googlegroups.com>
	<7fe1f328-e513-46f2-99eb-2be527852391@googlegroups.com>
	<CACLE5GAdz=U1VQP+63wwXzNwQM-nN=tuNX+66N_mikkoY_Ks-Q@mail.gmail.com>
Message-ID: <CAH4pYpSQ5RJZeDN56cNKzPHGcnW_4=2zeh9YfOJ_A+wpXV3eTA@mail.gmail.com>

Can you file a GitHub issue for this? Thanks.

On Mon, Jan 27, 2014 at 9:46 PM, William Stein <wstein at gmail.com> wrote:
> I'm cross-posting this to ipython-dev. It's about user doing
>
>     from IPython.display import YouTubeVideo
>     YouTubeVideo('YyEReiAYGlU')
>
> and it not working when using IPython in SageMathCloud
> (https://cloud.sagemath.com), which is a hosted IPython service.
> See below -- the problem is that the iframe grabs the http youtube
> site instead of https...
>
> On Mon, Jan 27, 2014 at 9:32 PM, Ivica Naki? <zzivee at gmail.com> wrote:
>> The code works in the local IPython notebook on my computer, and the
>> versions on my computer and SMC are the same (1.1.0). So I don't see how
>> that can be an upstream bug.
>> The same thing happens on SMC also for IPython notebook which is run from
>> the terminal.
>
> I think Harald didn't explain himself very clearly.  IPython outputs
>
> <iframe width="400" height="300;"
> src="http://www.youtube.com/embed/YyEReiAYGlU" frameborder="0"
> allowfullscreen=""></iframe>
>
> and indeed this can't work in SMC, because SMC is served securely over
> SSL.     Instead, what IPython needs to do is output
>
> <iframe width="400" height="300;"
> src="https://www.youtube.com/embed/YyEReiAYGlU" frameborder="0"
> allowfullscreen=""></iframe>
>
> In fact, I just tried changing the http to https using the Chrome
> debugger, and the video then works fine.
> The IPython source code has http (instead of https) hard coded, unfortunately.
>
> William
>
>
>>
>> Ivica
>>
>>
>> Dana ponedjeljak, 27. sije?nja 2014. 20:47:07 UTC+1, korisnik Harald Schilly
>> napisao je:
>>>
>>> The generated code by IPython is
>>>
>>> <iframe width="400" height="300&quot;"
>>> src="http://www.youtube.com/embed/YyEReiAYGlU" frameborder="0"
>>> allowfullscreen=""></iframe>
>>>
>>> ... hence it cannot work. Maybe, somebody should post that as an upstream
>>> ticket (easy to fix) or search if there already exists one?
>>>
>>> Harald
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "sage-cloud" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to sage-cloud+unsubscribe at googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/sage-cloud/7fe1f328-e513-46f2-99eb-2be527852391%40googlegroups.com.
>>
>> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
> --
> William Stein
> Professor of Mathematics
> University of Washington
> http://wstein.org
> _______________________________________________
> 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


From konrad.hinsen at fastmail.net  Tue Jan 28 04:07:56 2014
From: konrad.hinsen at fastmail.net (Konrad Hinsen)
Date: Tue, 28 Jan 2014 10:07:56 +0100
Subject: [IPython-dev] Filename with accents in the Git repository
Message-ID: <21223.29548.142831.373351@wifi-172-30-24-78.wifi.univ-paris5.fr>

I just pulled in the latest changes from GitHub, which include the
addition of the file

    IPython/nbconvert/tests/files/nb1_an?lisis.ipynb

Git seems to have problems with this filename, at least
under MacOS X. It reports is as "untracked", but if I delete
it, it becomes marked as "deleted". Even a fresh clone
of the repository, right from GitHub, has this untracked file.

Is there some Git configuration trick to fix this?

Konrad.


From konrad.hinsen at fastmail.net  Tue Jan 28 04:10:53 2014
From: konrad.hinsen at fastmail.net (Konrad Hinsen)
Date: Tue, 28 Jan 2014 10:10:53 +0100
Subject: [IPython-dev] Debugging a NotebookManager
Message-ID: <21223.29725.397615.208409@wifi-172-30-24-78.wifi.univ-paris5.fr>

I am writing a custom NotebookManager for integrating ActivePapers
with IPython. Is there a way to use the Python debugger for this?
It's frustrating to get stack traces but not be able to run
pdb.pm().

Konrad.


From harald.schilly at gmail.com  Tue Jan 28 04:50:44 2014
From: harald.schilly at gmail.com (Harald Schilly)
Date: Tue, 28 Jan 2014 10:50:44 +0100
Subject: [IPython-dev] [sage-cloud] Re: YouTube video in IPython notebook
In-Reply-To: <CACLE5GAdz=U1VQP+63wwXzNwQM-nN=tuNX+66N_mikkoY_Ks-Q@mail.gmail.com>
References: <7ebdccfd-001e-47ff-97f4-9995a94df76b@googlegroups.com>
	<9caaf62c-91e3-4a19-967b-a14179808a3b@googlegroups.com>
	<7fe1f328-e513-46f2-99eb-2be527852391@googlegroups.com>
	<CACLE5GAdz=U1VQP+63wwXzNwQM-nN=tuNX+66N_mikkoY_Ks-Q@mail.gmail.com>
Message-ID: <CAGG4CB6a5vrj9mUCvyhhf5mA0E2=77gvzNGs72aucVQ_JGegyQ@mail.gmail.com>

On Tue, Jan 28, 2014 at 6:46 AM, William Stein <wstein at gmail.com> wrote:
>   Instead, what IPython needs to do is output
>
> <iframe width="400" height="300;"
> src="https://www.youtube.com/embed/YyEReiAYGlU" frameborder="0"
> allowfullscreen=""></iframe>


Err sorry, I thought it is obvious. what it should do is what the OP
posted in the first email!

https://groups.google.com/d/msg/sage-cloud/NotysYVKjrw/CXoQiDk-B1oJ

i.e.
src="//www.youtube.com/embed/YyEReiAYGlU"

double "//" in the beginning!

Harald


From konrad.hinsen at fastmail.net  Tue Jan 28 06:31:49 2014
From: konrad.hinsen at fastmail.net (Konrad Hinsen)
Date: Tue, 28 Jan 2014 12:31:49 +0100
Subject: [IPython-dev] Passing information to a NotebookManager
Message-ID: <21223.38181.870931.557255@wifi-172-30-24-78.wifi.univ-paris5.fr>

Creating a NotebookApp with a modified notebook manager is easy enough:
just configure NotebookApp.notebook_manager_class. But I need additional
information passed to my notebook manager. Since I don't control the
creation of the notebook manager object, I need to find some other way.

I tried to use the configuration system, setting configuration options
at run time:

    from IPython.html.notebookapp import NotebookApp

    app = NotebookApp()
    app.config.NotebookApp.notebook_manager_class = 'activepapers.notebooks.ActivePapersNotebookManager'
    app.config.ActivePapersNotebookManager.active_paper_path = filename
    app.config.ActivePapersNotebookManager.may_write = True
    app.initialize(argv=[])
    app.start()

In my class ActivePapersNotebookManager, I have

    class ActivePapersNotebookManager(NotebookManager):

        active_paper_path = Unicode(config=True)
        active_paper_may_write = Bool(config=True)

followed by the code. This works fine for active_paper_path, but
active_paper_may_write ends up being False.

Questions:

 1) Is this the right approach, or should I try something else entirely?
 2) How can I debug the information transfer through the configuration system?

Thanks in advance,
  Konrad.


From konrad.hinsen at fastmail.net  Tue Jan 28 07:03:01 2014
From: konrad.hinsen at fastmail.net (Konrad Hinsen)
Date: Tue, 28 Jan 2014 13:03:01 +0100
Subject: [IPython-dev]  Filename with accents in the Git repository
In-Reply-To: <21223.29548.142831.373351@wifi-172-30-24-78.wifi.univ-paris5.fr>
References: <21223.29548.142831.373351@wifi-172-30-24-78.wifi.univ-paris5.fr>
Message-ID: <21223.40053.643869.231886@wifi-172-30-24-78.wifi.univ-paris5.fr>

Konrad Hinsen writes:

 > Git seems to have problems with this filename, at least
 > under MacOS X. It reports is as "untracked", but if I delete
 > it, it becomes marked as "deleted". Even a fresh clone
 > of the repository, right from GitHub, has this untracked file.
 > 
 > Is there some Git configuration trick to fix this?

I just ran into a Git expert on the corridor, so I can answer my own
question.

MacOS users need to set a special Git configuration option:

  git config --global core.precomposeunicode true

This takes effect for all repositories created or cloned in the
future. There is no way to fix existing repositories, they must
be cloned again.

Konrad.


From bussonniermatthias at gmail.com  Tue Jan 28 08:00:07 2014
From: bussonniermatthias at gmail.com (Matthias BUSSONNIER)
Date: Tue, 28 Jan 2014 14:00:07 +0100
Subject: [IPython-dev] Passing information to a NotebookManager
In-Reply-To: <21223.38181.870931.557255@wifi-172-30-24-78.wifi.univ-paris5.fr>
References: <21223.38181.870931.557255@wifi-172-30-24-78.wifi.univ-paris5.fr>
Message-ID: <86B19CC4-6F1D-4C24-AFC7-ECA1662F156E@gmail.com>


Le 28 janv. 2014 ? 12:31, Konrad Hinsen a ?crit :

> Creating a NotebookApp with a modified notebook manager is easy enough:
> just configure NotebookApp.notebook_manager_class. But I need additional
> information passed to my notebook manager. Since I don't control the
> creation of the notebook manager object, I need to find some other way.
> 
> I tried to use the configuration system, setting configuration options
> at run time:
> 
>    from IPython.html.notebookapp import NotebookApp


You could create a config object (from IPython.config.loader import Config)
add pass it as the config kwarg to NotebookApp, 
or at lead use NotebookApp.update_config methods. 

> 
>    app = NotebookApp()
>    app.config.NotebookApp.notebook_manager_class = 'activepapers.notebooks.ActivePapersNotebookManager'
>    app.config.ActivePapersNotebookManager.active_paper_path = filename
>    app.config.ActivePapersNotebookManager.may_write = True
>    app.initialize(argv=[])
>    app.start()
> 
> In my class ActivePapersNotebookManager, I have
> 
>    class ActivePapersNotebookManager(NotebookManager):
> 
>        active_paper_path = Unicode(config=True)
>        active_paper_may_write = Bool(config=True)
> 
> followed by the code. This works fine for active_paper_path, but
> active_paper_may_write ends up being False.
> 
> Questions:
> 
> 1) Is this the right approach, or should I try something else entirely?
> 2) How can I debug the information transfer through the configuration system?


Usually anything that can have "Configurable" traits should accept a config object at creation time. 
config object would bubble into IPython.config.configurable:Configurable where the magic happens.

Any traits like the one you use can have on_change or validate methods that will trigger when value change or are set. 
-- 
M

> 
> Thanks in advance,
>  Konrad.
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev



From konrad.hinsen at fastmail.net  Tue Jan 28 10:01:25 2014
From: konrad.hinsen at fastmail.net (Konrad Hinsen)
Date: Tue, 28 Jan 2014 16:01:25 +0100
Subject: [IPython-dev] Passing information to a NotebookManager
In-Reply-To: <86B19CC4-6F1D-4C24-AFC7-ECA1662F156E@gmail.com>
References: <21223.38181.870931.557255@wifi-172-30-24-78.wifi.univ-paris5.fr>
	<86B19CC4-6F1D-4C24-AFC7-ECA1662F156E@gmail.com>
Message-ID: <21223.50757.964286.890742@wifi-172-30-24-78.wifi.univ-paris5.fr>

Matthias BUSSONNIER writes:

 > You could create a config object (from IPython.config.loader import Config)
 > add pass it as the config kwarg to NotebookApp, 
 > or at lead use NotebookApp.update_config methods. 

OK, that looks a bit cleaner indeed - and it works :-)

 > Usually anything that can have "Configurable" traits should accept
 > a config object at creation time.  config object would bubble into
 > IPython.config.configurable:Configurable where the magic happens.
 > 
 > Any traits like the one you use can have on_change or validate
 > methods that will trigger when value change or are set.

Thanks, that helped me debug my problem (which ended up being a simple typo).
I added validators to trace the changes.

Konrad.


From konrad.hinsen at fastmail.net  Tue Jan 28 10:14:38 2014
From: konrad.hinsen at fastmail.net (Konrad Hinsen)
Date: Tue, 28 Jan 2014 16:14:38 +0100
Subject: [IPython-dev] NotebookManager API
Message-ID: <21223.51550.920715.143837@wifi-172-30-24-78.wifi.univ-paris5.fr>

I am working on my NotebookManager, using IPython.html.services.notebooks.nbmanager,
IPython.html.services.notebooks.filenbmanager, and the "bookstore" plugin
as a guidance. However, my NotebookManager differs in one fundamental aspect:
its backing store is not a filesystem, meaning there are no filenames and in
particular no extensions.

Is there any documentation for the NotebookManager API that is more
precise than the existing implementations? I wonder in particular
about the rules for the "path" and "name" arguments of the various
methods. One problem I am fighting with is that my get_notebook_model
gets called sometimes with the notebook names that I return in
list_notebooks, but sometimes with the names suffixed with ".ipynb". I
also see calls to list_notebooks with values of "path" that don't
satisfy my path_exists test.

Inspecting the source code, I wonder what the distinction between the
classes NotebookManager and FileNotebookManager is. The names suggest
that FileNotebookManager is specific to a filesystem-based manager,
whereas NotebookManager is generic, but NotebookManager already
contains calls to os.path. I am writing my own manager as a subclass
of NotebookManager, but perhaps I shouldn't.

Konrad.


From bussonniermatthias at gmail.com  Tue Jan 28 10:23:27 2014
From: bussonniermatthias at gmail.com (Matthias BUSSONNIER)
Date: Tue, 28 Jan 2014 16:23:27 +0100
Subject: [IPython-dev] NotebookManager API
In-Reply-To: <21223.51550.920715.143837@wifi-172-30-24-78.wifi.univ-paris5.fr>
References: <21223.51550.920715.143837@wifi-172-30-24-78.wifi.univ-paris5.fr>
Message-ID: <BE6EFD37-9001-4EED-804E-E56265DE4F50@gmail.com>

Hi Konrad, 

You are probably one of the first to go this route, 
I suggest you open github issues about that and we can fix them as we go. 

But otherwise, I think that inheriting NotebookManager  is the good way to go. 
-- 
Matthias

Le 28 janv. 2014 ? 16:14, Konrad Hinsen a ?crit :

> I am working on my NotebookManager, using IPython.html.services.notebooks.nbmanager,
> IPython.html.services.notebooks.filenbmanager, and the "bookstore" plugin
> as a guidance. However, my NotebookManager differs in one fundamental aspect:
> its backing store is not a filesystem, meaning there are no filenames and in
> particular no extensions.
> 
> Is there any documentation for the NotebookManager API that is more
> precise than the existing implementations? I wonder in particular
> about the rules for the "path" and "name" arguments of the various
> methods. One problem I am fighting with is that my get_notebook_model
> gets called sometimes with the notebook names that I return in
> list_notebooks, but sometimes with the names suffixed with ".ipynb". I
> also see calls to list_notebooks with values of "path" that don't
> satisfy my path_exists test.
> 
> Inspecting the source code, I wonder what the distinction between the
> classes NotebookManager and FileNotebookManager is. The names suggest
> that FileNotebookManager is specific to a filesystem-based manager,
> whereas NotebookManager is generic, but NotebookManager already
> contains calls to os.path. I am writing my own manager as a subclass
> of NotebookManager, but perhaps I shouldn't.
> 
> Konrad.
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev



From doug.blank at gmail.com  Tue Jan 28 10:46:44 2014
From: doug.blank at gmail.com (Doug Blank)
Date: Tue, 28 Jan 2014 10:46:44 -0500
Subject: [IPython-dev] NotebookManager API
In-Reply-To: <BE6EFD37-9001-4EED-804E-E56265DE4F50@gmail.com>
References: <21223.51550.920715.143837@wifi-172-30-24-78.wifi.univ-paris5.fr>
	<BE6EFD37-9001-4EED-804E-E56265DE4F50@gmail.com>
Message-ID: <CAAusYCgzaUK5XHLs17m4WAL+NP0px7YTBej4g3nRkKHMyBay=A@mail.gmail.com>

I just found out what a NoteBook manager is, but I see that there is a gist
here from a year ago:

https://gist.github.com/zylinqk/4107048

Don't know if that would be helpful.

-Doug


On Tue, Jan 28, 2014 at 10:23 AM, Matthias BUSSONNIER <
bussonniermatthias at gmail.com> wrote:

> Hi Konrad,
>
> You are probably one of the first to go this route,
> I suggest you open github issues about that and we can fix them as we go.
>
> But otherwise, I think that inheriting NotebookManager  is the good way to
> go.
> --
> Matthias
>
> Le 28 janv. 2014 ? 16:14, Konrad Hinsen a ?crit :
>
> > I am working on my NotebookManager, using
> IPython.html.services.notebooks.nbmanager,
> > IPython.html.services.notebooks.filenbmanager, and the "bookstore" plugin
> > as a guidance. However, my NotebookManager differs in one fundamental
> aspect:
> > its backing store is not a filesystem, meaning there are no filenames
> and in
> > particular no extensions.
> >
> > Is there any documentation for the NotebookManager API that is more
> > precise than the existing implementations? I wonder in particular
> > about the rules for the "path" and "name" arguments of the various
> > methods. One problem I am fighting with is that my get_notebook_model
> > gets called sometimes with the notebook names that I return in
> > list_notebooks, but sometimes with the names suffixed with ".ipynb". I
> > also see calls to list_notebooks with values of "path" that don't
> > satisfy my path_exists test.
> >
> > Inspecting the source code, I wonder what the distinction between the
> > classes NotebookManager and FileNotebookManager is. The names suggest
> > that FileNotebookManager is specific to a filesystem-based manager,
> > whereas NotebookManager is generic, but NotebookManager already
> > contains calls to os.path. I am writing my own manager as a subclass
> > of NotebookManager, but perhaps I shouldn't.
> >
> > Konrad.
> > _______________________________________________
> > 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/20140128/411249e0/attachment.html>

From konrad.hinsen at fastmail.net  Tue Jan 28 11:48:34 2014
From: konrad.hinsen at fastmail.net (Konrad Hinsen)
Date: Tue, 28 Jan 2014 17:48:34 +0100
Subject: [IPython-dev] NotebookManager API
In-Reply-To: <BE6EFD37-9001-4EED-804E-E56265DE4F50@gmail.com>
References: <21223.51550.920715.143837@wifi-172-30-24-78.wifi.univ-paris5.fr>
	<BE6EFD37-9001-4EED-804E-E56265DE4F50@gmail.com>
Message-ID: <21223.57186.41921.714779@wifi-172-30-24-78.wifi.univ-paris5.fr>

Matthias BUSSONNIER writes:

 > You are probably one of the first to go this route, 
 > I suggest you open github issues about that and we can fix them as we go. 

OK.

Doug Blank writes:

 > I just found out what a NoteBook manager is, but I see that there is a gist here from a
 > year ago:
 > 
 > https://gist.github.com/zylinqk/4107048
 > 
 > Don't know if that would be helpful.

In principle, yes, but this looks outdated, quite different from what the
interface in 2.0 looks like.

But this gives me an idea: in the spirit of your simple_kernel, I will
prepare a simple_notebook_manager module, which stores notebooks in
Python data structures in memory. That's completely useless, but
everyone can understand it easily (no dependencies on outside
technology). It should be a good basis to (1) clarify what the API is
or should be and (2) help others develop alternative notebook
managers.

Konrad.


From doug.blank at gmail.com  Tue Jan 28 12:11:52 2014
From: doug.blank at gmail.com (Doug Blank)
Date: Tue, 28 Jan 2014 12:11:52 -0500
Subject: [IPython-dev] A Kernel for Java, Scheme, Boo, Logo, Basic,
	and more
In-Reply-To: <CADwqtCPoVJziMHMbnQZbzoKcAi2KFvBfdx-EgLGip0Q-Wb83ww@mail.gmail.com>
References: <CAAusYCg04WZk_dcFhME0b2KVaW1hDQWVEkYa0EzLYAx+sdizJQ@mail.gmail.com>
	<CAH4pYpS94jpZ_WG8Q-yrkU+N1a8ze6NjwmaMFYq+z7P4SpZPQQ@mail.gmail.com>
	<CAAusYChzmnUZwpQAhkf3amJbkHt6G0DND2PhwXYC_G=EwRBM5A@mail.gmail.com>
	<CADwqtCPoVJziMHMbnQZbzoKcAi2KFvBfdx-EgLGip0Q-Wb83ww@mail.gmail.com>
Message-ID: <CAAusYChpOmmr1vS2_e_OL7oHe-fwn5SsgtqYhvT3MCpdRSTYtA@mail.gmail.com>

On Sun, Jan 26, 2014 at 5:19 PM, Gabriel Becker <gmbecker at ucdavis.edu>wrote:

> Doug,
>
> This looks very interesting (no love for R though? :( ). Nice work.
>
>
So, this system is a collection of all of the languages that we can run on
a VM (like Mono and .NET's CLR or JVM; we use IKVM to move bytes from one
VM to the other). So, if you know of an implementation of R for one of the
virtual machines, we'd gladly use it.


> Have you considered differentiating the languages by the cells/messages
> themselves, rather than directvies within the cell's contents?
>
> I have always thought that code language would be better as an attribute
> of the code itself and a distinct part of the message sent. The magics work
> the way they do because technically they are still IPython code, and are
> evaluated with the IPython evaluator. If your kernel is doing the dispatch
> to different evaluators itself, though, there is no need to stick to that
> paradigm.
>
>
You are absolutely correct that this is a concern, especially for use with
those metacommands that change global state. If you rearrange the cells,
you might be in a different state (ie, language) and then it fails. In our
own IDE, we keep track of shell history, and keep the executing language at
the time with it.

In reality, jumping from one language to another is not yet the norm for
many programmers (unless one of the languages is bash). Also, I would only
be interested in considering such an option if there were developed a
standard API in IPython for the kernel to talk to the frontend, and an API
for setting/getting cell values. We hope that our kernel will be part of
the IPython ecosystem.

-Doug


> Just my 2 cents.
> ~G
>
>
>
> On Sun, Jan 26, 2014 at 12:58 PM, Doug Blank <doug.blank at gmail.com> wrote:
>
>> On Sun, Jan 26, 2014 at 3:28 PM, Brian Granger <ellisonbg at gmail.com>wrote:
>>
>>> Doug,
>>>
>>> Awesome, thanks so much for sharing this! I had a quick look. I really
>>> like the :lang abstraction, especially how it is stateful when run in
>>> a cell by itself. It will be fun to watch where this goes. Having
>>> learned to program with logo, I am especially interested in seeing
>>> where that goes. Have you been able to get the pyout and display_data
>>> messages working for rich output?
>>>
>>>
>> Thanks! Actually, I am trying to figure out how display_data and rich
>> messages work right now. I see the mime-type keys in the data dictionary,
>> but having some trouble figuring out how they get there from a function
>> wrapped around a value. Is there an overview that describes the approach?
>> Or maybe you can point me to the relevant code? I suspect that the Python
>> kernel side of things has a nice infrastructure... but what is the simplest
>> approach just as proof of concept to get, say, a gif to appear in the
>> notebook?
>>
>> -Doug
>>
>>
>>
>>> Cheers,
>>>
>>> Brian
>>>
>>> On Sun, Jan 26, 2014 at 11:40 AM, Doug Blank <doug.blank at gmail.com>
>>> wrote:
>>> > Just a quick status update on a new kernel. Once I got the
>>> simple_kernel.py
>>> > [1] written and understood, at least to a level, we were able to make
>>> fast
>>> > progress (a few afternoon hacks) on the real project. This new kernel
>>> is
>>> > written in C# [2], but is really a wrapper around a set of languages,
>>> > including Java, Scheme, Boo, Logo, Python, Ruby, Basic, and some
>>> others,
>>> > including an assembly language.
>>> >
>>> > Not only can you run all of these via notebook, console, and
>>> qtconsole, but
>>> > many of the languages share data and functions with each other. Here
>>> is a
>>> > pointer to a top-level notebook (refresh, as it is changing quickly):
>>> >
>>> >
>>> http://nbviewer.ipython.org/urls/bitbucket.org/ipre/calico/raw/master/notebooks/Calico%20Overview.ipynb
>>> >
>>> > Still a lot to do, but just wanted to point to recent results, and say
>>> > thanks for the help so far!
>>> >
>>> > -Doug
>>> >
>>> >
>>> > [1] - https://github.com/dsblank/simple_kernel/blob/master/README.md
>>> > [2] -
>>> >
>>> https://bitbucket.org/ipre/calico/src/master/Source/Calico/ZMQServer.cs?at=master
>>> >
>>> >
>>> >
>>> > _______________________________________________
>>> > 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
>>
>>
>
>
> --
> Gabriel Becker
> Graduate Student
> Statistics Department
> University of California, Davis
>
> _______________________________________________
> 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/20140128/06fed58b/attachment.html>

From ellisonbg at gmail.com  Tue Jan 28 12:31:26 2014
From: ellisonbg at gmail.com (Brian Granger)
Date: Tue, 28 Jan 2014 09:31:26 -0800
Subject: [IPython-dev] Filename with accents in the Git repository
In-Reply-To: <21223.40053.643869.231886@wifi-172-30-24-78.wifi.univ-paris5.fr>
References: <21223.29548.142831.373351@wifi-172-30-24-78.wifi.univ-paris5.fr>
	<21223.40053.643869.231886@wifi-172-30-24-78.wifi.univ-paris5.fr>
Message-ID: <CAH4pYpTff0R=SUkyhkAAWJLuhCtARGUY4JqgRXEfqai=r9ckTg@mail.gmail.com>

I am seeing this as well. Min, how are you dealing with this?

On Tue, Jan 28, 2014 at 4:03 AM, Konrad Hinsen
<konrad.hinsen at fastmail.net> wrote:
> Konrad Hinsen writes:
>
>  > Git seems to have problems with this filename, at least
>  > under MacOS X. It reports is as "untracked", but if I delete
>  > it, it becomes marked as "deleted". Even a fresh clone
>  > of the repository, right from GitHub, has this untracked file.
>  >
>  > Is there some Git configuration trick to fix this?
>
> I just ran into a Git expert on the corridor, so I can answer my own
> question.
>
> MacOS users need to set a special Git configuration option:
>
>   git config --global core.precomposeunicode true
>
> This takes effect for all repositories created or cloned in the
> future. There is no way to fix existing repositories, they must
> be cloned again.
>
> Konrad.
> _______________________________________________
> 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


From ellisonbg at gmail.com  Tue Jan 28 12:36:54 2014
From: ellisonbg at gmail.com (Brian Granger)
Date: Tue, 28 Jan 2014 09:36:54 -0800
Subject: [IPython-dev] NotebookManager API
In-Reply-To: <21223.51550.920715.143837@wifi-172-30-24-78.wifi.univ-paris5.fr>
References: <21223.51550.920715.143837@wifi-172-30-24-78.wifi.univ-paris5.fr>
Message-ID: <CAH4pYpTjUoo2OifTWbTOm=FEHaYk7DN8F9m8F79tTO6ZGNwd0A@mail.gmail.com>

Konrad,

On Tue, Jan 28, 2014 at 7:14 AM, Konrad Hinsen
<konrad.hinsen at fastmail.net> wrote:
> I am working on my NotebookManager, using IPython.html.services.notebooks.nbmanager,
> IPython.html.services.notebooks.filenbmanager, and the "bookstore" plugin
> as a guidance. However, my NotebookManager differs in one fundamental aspect:
> its backing store is not a filesystem, meaning there are no filenames and in
> particular no extensions.

While the backend doesn't need to be a filesystem, it does need to
have the same abstractions:

* /paths/like/this
* filesname
* filename extensions

You can store this in you storage backend in whatever way you want,
but this stuff is hard coding throughout the web application, not just
the nbmanager. This is a deliberate choice that we have no plans on
changing. In fact we just refactored all of this stuff to give it this
design since 1.0.

Here is our IPEP on the topic:

https://github.com/ipython/ipython/wiki/IPEP-16%3A-Notebook-multi-directory-dashboard-and-URL-mapping

> Is there any documentation for the NotebookManager API that is more
> precise than the existing implementations? I wonder in particular
> about the rules for the "path" and "name" arguments of the various
> methods. One problem I am fighting with is that my get_notebook_model
> gets called sometimes with the notebook names that I return in
> list_notebooks, but sometimes with the names suffixed with ".ipynb". I
> also see calls to list_notebooks with values of "path" that don't
> satisfy my path_exists test.

We don't have anything on NotebookManager per-se, but the above IPEP
will describe things from a conceptual perspective and how all it maps
onto URLs.

> Inspecting the source code, I wonder what the distinction between the
> classes NotebookManager and FileNotebookManager is. The names suggest
> that FileNotebookManager is specific to a filesystem-based manager,
> whereas NotebookManager is generic, but NotebookManager already
> contains calls to os.path. I am writing my own manager as a subclass
> of NotebookManager, but perhaps I shouldn't.

We may have some leakage in the base class that needs to be fixed, but
yes, you should be subclassing the base class.

Cheers,

Brian

> Konrad.
> _______________________________________________
> 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


From takowl at gmail.com  Tue Jan 28 12:38:05 2014
From: takowl at gmail.com (Thomas Kluyver)
Date: Tue, 28 Jan 2014 09:38:05 -0800
Subject: [IPython-dev] NotebookManager API
In-Reply-To: <21223.57186.41921.714779@wifi-172-30-24-78.wifi.univ-paris5.fr>
References: <21223.51550.920715.143837@wifi-172-30-24-78.wifi.univ-paris5.fr>
	<BE6EFD37-9001-4EED-804E-E56265DE4F50@gmail.com>
	<21223.57186.41921.714779@wifi-172-30-24-78.wifi.univ-paris5.fr>
Message-ID: <CAOvn4qjR=dnicVW8=Uv5GkNaJPLdBJ5vZvbzY_7KE6r3KiEjBA@mail.gmail.com>

On 28 January 2014 08:48, Konrad Hinsen <konrad.hinsen at fastmail.net> wrote:

> But this gives me an idea: in the spirit of your simple_kernel, I will
> prepare a simple_notebook_manager module, which stores notebooks in
> Python data structures in memory. That's completely useless, but
> everyone can understand it easily (no dependencies on outside
> technology). It should be a good basis to (1) clarify what the API is
> or should be and (2) help others develop alternative notebook
> managers.
>

I think this is an excellent idea.

Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140128/2711e68c/attachment.html>

From sychan at lbl.gov  Tue Jan 28 12:42:22 2014
From: sychan at lbl.gov (Stephen Chan)
Date: Tue, 28 Jan 2014 09:42:22 -0800
Subject: [IPython-dev] NotebookManager API
In-Reply-To: <CAOvn4qjR=dnicVW8=Uv5GkNaJPLdBJ5vZvbzY_7KE6r3KiEjBA@mail.gmail.com>
References: <21223.51550.920715.143837@wifi-172-30-24-78.wifi.univ-paris5.fr>
	<BE6EFD37-9001-4EED-804E-E56265DE4F50@gmail.com>
	<21223.57186.41921.714779@wifi-172-30-24-78.wifi.univ-paris5.fr>
	<CAOvn4qjR=dnicVW8=Uv5GkNaJPLdBJ5vZvbzY_7KE6r3KiEjBA@mail.gmail.com>
Message-ID: <CA+n9Yfqh=k6z6oqxQoqyUdzMwkQ+zA0vtWR5rGT0ppqvb_nAvg@mail.gmail.com>

   This would be very helpful - we have a IPython 1.x notebook manager that
stores notebooks in a document store (basically a wrapper around mongodb +
filesystem blob store), and it would be handy to have a reference for
migrating this code to the 2.0 API.

   Steve


On Tue, Jan 28, 2014 at 9:38 AM, Thomas Kluyver <takowl at gmail.com> wrote:

> On 28 January 2014 08:48, Konrad Hinsen <konrad.hinsen at fastmail.net>wrote:
>
>> But this gives me an idea: in the spirit of your simple_kernel, I will
>> prepare a simple_notebook_manager module, which stores notebooks in
>> Python data structures in memory. That's completely useless, but
>> everyone can understand it easily (no dependencies on outside
>> technology). It should be a good basis to (1) clarify what the API is
>> or should be and (2) help others develop alternative notebook
>> managers.
>>
>
> I think this is an excellent idea.
>
> Thomas
>
> _______________________________________________
> 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/20140128/35f8cc3c/attachment.html>

From sychan at lbl.gov  Tue Jan 28 12:46:55 2014
From: sychan at lbl.gov (Stephen Chan)
Date: Tue, 28 Jan 2014 09:46:55 -0800
Subject: [IPython-dev] Debugging a NotebookManager
In-Reply-To: <21223.29725.397615.208409@wifi-172-30-24-78.wifi.univ-paris5.fr>
References: <21223.29725.397615.208409@wifi-172-30-24-78.wifi.univ-paris5.fr>
Message-ID: <CA+n9Yfrio1kcrB6ZPsf_MR2cVLpX4qGUnA_2DUK3_686zpx+dQ@mail.gmail.com>

   With the 1.x NotebookManager, I am able to bring up the IPython command
line, load my custom notebook manager and use ipdb to step through API
calls. Is it any different in the 2.0 nbmanager?

   Steve


On Tue, Jan 28, 2014 at 1:10 AM, Konrad Hinsen
<konrad.hinsen at fastmail.net>wrote:

> I am writing a custom NotebookManager for integrating ActivePapers
> with IPython. Is there a way to use the Python debugger for this?
> It's frustrating to get stack traces but not be able to run
> pdb.pm().
>
> Konrad.
> _______________________________________________
> 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/20140128/ce3bdb0a/attachment.html>

From benjaminrk at gmail.com  Tue Jan 28 12:58:46 2014
From: benjaminrk at gmail.com (MinRK)
Date: Tue, 28 Jan 2014 09:58:46 -0800
Subject: [IPython-dev] [sage-cloud] Re: YouTube video in IPython notebook
In-Reply-To: <CAGG4CB6a5vrj9mUCvyhhf5mA0E2=77gvzNGs72aucVQ_JGegyQ@mail.gmail.com>
References: <7ebdccfd-001e-47ff-97f4-9995a94df76b@googlegroups.com>
	<9caaf62c-91e3-4a19-967b-a14179808a3b@googlegroups.com>
	<7fe1f328-e513-46f2-99eb-2be527852391@googlegroups.com>
	<CACLE5GAdz=U1VQP+63wwXzNwQM-nN=tuNX+66N_mikkoY_Ks-Q@mail.gmail.com>
	<CAGG4CB6a5vrj9mUCvyhhf5mA0E2=77gvzNGs72aucVQ_JGegyQ@mail.gmail.com>
Message-ID: <CAHNn8BVoZ1dB7VVX2HYcVqm+we8bhcPLjTQCMPDV9+DM1K-byQ@mail.gmail.com>

Seems like it should actually be https all the time. The disadvantage of
'//' is that it won't work in a static html export, where it could point to
file://youtube.com.

-MinRK


On Tue, Jan 28, 2014 at 1:50 AM, Harald Schilly <harald.schilly at gmail.com>wrote:

> On Tue, Jan 28, 2014 at 6:46 AM, William Stein <wstein at gmail.com> wrote:
> >   Instead, what IPython needs to do is output
> >
> > <iframe width="400" height="300;"
> > src="https://www.youtube.com/embed/YyEReiAYGlU" frameborder="0"
> > allowfullscreen=""></iframe>
>
>
> Err sorry, I thought it is obvious. what it should do is what the OP
> posted in the first email!
>
> https://groups.google.com/d/msg/sage-cloud/NotysYVKjrw/CXoQiDk-B1oJ
>
> i.e.
> src="//www.youtube.com/embed/YyEReiAYGlU"
>
> double "//" in the beginning!
>
> Harald
> _______________________________________________
> 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/20140128/7808b164/attachment.html>

From wking at tremily.us  Tue Jan 28 13:04:10 2014
From: wking at tremily.us (W. Trevor King)
Date: Tue, 28 Jan 2014 10:04:10 -0800
Subject: [IPython-dev] Filename with accents in the Git repository
In-Reply-To: <CAH4pYpTff0R=SUkyhkAAWJLuhCtARGUY4JqgRXEfqai=r9ckTg@mail.gmail.com>
References: <21223.29548.142831.373351@wifi-172-30-24-78.wifi.univ-paris5.fr>
	<21223.40053.643869.231886@wifi-172-30-24-78.wifi.univ-paris5.fr>
	<CAH4pYpTff0R=SUkyhkAAWJLuhCtARGUY4JqgRXEfqai=r9ckTg@mail.gmail.com>
Message-ID: <20140128180410.GM14197@odin.tremily.us>

On Tue, Jan 28, 2014 at 09:31:26AM -0800, Brian Granger wrote:
> I am seeing this as well. Min, how are you dealing with this?

I think Konrad's:

  $ git config --global core.precomposeunicode true

is the official solution.  Links into Git's history:

* git on MacOSX and files with decomposed utf-8 file names, 2008-01-16
  [1].
* b856ad6 (Merge branch 'tb/sanitize-decomposed-utf-8-pathname',
  2012-07-13 [2]).
* 76759c7 (git on Mac OS and precomposed unicode, 2012-07-08 [3]).
  This commit added core.precomposeunicode.

Cheers,
Trevor

[1]: http://thread.gmane.org/gmane.comp.version-control.git/70688/
[2]: http://git.kernel.org/cgit/git/git.git/commit/?id=b856ad623e4f686815986c0b9341dd1bfd791e71
[3]: http://git.kernel.org/cgit/git/git.git/commit/?id=76759c7dff53e8c84e975b88cb8245587c14c7ba

-- 
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140128/359770c1/attachment.sig>

From benjaminrk at gmail.com  Tue Jan 28 13:04:19 2014
From: benjaminrk at gmail.com (MinRK)
Date: Tue, 28 Jan 2014 10:04:19 -0800
Subject: [IPython-dev] Filename with accents in the Git repository
In-Reply-To: <CAH4pYpTff0R=SUkyhkAAWJLuhCtARGUY4JqgRXEfqai=r9ckTg@mail.gmail.com>
References: <21223.29548.142831.373351@wifi-172-30-24-78.wifi.univ-paris5.fr>
	<21223.40053.643869.231886@wifi-172-30-24-78.wifi.univ-paris5.fr>
	<CAH4pYpTff0R=SUkyhkAAWJLuhCtARGUY4JqgRXEfqai=r9ckTg@mail.gmail.com>
Message-ID: <CAHNn8BVVhW9_yC8hQdXT7j7Ucx0rU103OTuU+esVRef6ixZxgA@mail.gmail.com>

I haven't done any configuration, and it seems to be working fine.
But given that some are having this issue (Julian has seen similar on the
Ubuntu test bot), maybe we should compose that file at test time, rather
than just ship it.

-MinRK


On Tue, Jan 28, 2014 at 9:31 AM, Brian Granger <ellisonbg at gmail.com> wrote:

> I am seeing this as well. Min, how are you dealing with this?
>
> On Tue, Jan 28, 2014 at 4:03 AM, Konrad Hinsen
> <konrad.hinsen at fastmail.net> wrote:
> > Konrad Hinsen writes:
> >
> >  > Git seems to have problems with this filename, at least
> >  > under MacOS X. It reports is as "untracked", but if I delete
> >  > it, it becomes marked as "deleted". Even a fresh clone
> >  > of the repository, right from GitHub, has this untracked file.
> >  >
> >  > Is there some Git configuration trick to fix this?
> >
> > I just ran into a Git expert on the corridor, so I can answer my own
> > question.
> >
> > MacOS users need to set a special Git configuration option:
> >
> >   git config --global core.precomposeunicode true
> >
> > This takes effect for all repositories created or cloned in the
> > future. There is no way to fix existing repositories, they must
> > be cloned again.
> >
> > Konrad.
> > _______________________________________________
> > 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140128/e86d33d9/attachment.html>

From fperez.net at gmail.com  Tue Jan 28 14:25:10 2014
From: fperez.net at gmail.com (Fernando Perez)
Date: Tue, 28 Jan 2014 11:25:10 -0800
Subject: [IPython-dev] [sage-cloud] Re: YouTube video in IPython notebook
In-Reply-To: <CAHNn8BVoZ1dB7VVX2HYcVqm+we8bhcPLjTQCMPDV9+DM1K-byQ@mail.gmail.com>
References: <7ebdccfd-001e-47ff-97f4-9995a94df76b@googlegroups.com>
	<9caaf62c-91e3-4a19-967b-a14179808a3b@googlegroups.com>
	<7fe1f328-e513-46f2-99eb-2be527852391@googlegroups.com>
	<CACLE5GAdz=U1VQP+63wwXzNwQM-nN=tuNX+66N_mikkoY_Ks-Q@mail.gmail.com>
	<CAGG4CB6a5vrj9mUCvyhhf5mA0E2=77gvzNGs72aucVQ_JGegyQ@mail.gmail.com>
	<CAHNn8BVoZ1dB7VVX2HYcVqm+we8bhcPLjTQCMPDV9+DM1K-byQ@mail.gmail.com>
Message-ID: <CAHAreOoxHCuVCMXCjAfnvwaE0yu1nEDUaHLY4NK_jKW9WZhOaw@mail.gmail.com>

agreed. This should be a single character fix, s/http/https/ in the
YouTubeVideo object.

And this lets me submit a PR again! :)

https://github.com/ipython/ipython/pull/4904

Cheers,

f


On Tue, Jan 28, 2014 at 9:58 AM, MinRK <benjaminrk at gmail.com> wrote:

> Seems like it should actually be https all the time. The disadvantage of
> '//' is that it won't work in a static html export, where it could point to
> file://youtube.com.
>
> -MinRK
>
>
>
> On Tue, Jan 28, 2014 at 1:50 AM, Harald Schilly <harald.schilly at gmail.com>wrote:
>
>> On Tue, Jan 28, 2014 at 6:46 AM, William Stein <wstein at gmail.com> wrote:
>> >   Instead, what IPython needs to do is output
>> >
>> > <iframe width="400" height="300;"
>> > src="https://www.youtube.com/embed/YyEReiAYGlU" frameborder="0"
>> > allowfullscreen=""></iframe>
>>
>>
>> Err sorry, I thought it is obvious. what it should do is what the OP
>> posted in the first email!
>>
>> https://groups.google.com/d/msg/sage-cloud/NotysYVKjrw/CXoQiDk-B1oJ
>>
>> i.e.
>> src="//www.youtube.com/embed/YyEReiAYGlU"
>>
>> double "//" in the beginning!
>>
>> Harald
>> _______________________________________________
>> 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
>
>


-- 
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140128/05bac628/attachment.html>

From tburnett at myuw.net  Tue Jan 28 14:47:48 2014
From: tburnett at myuw.net (Toby Burnett)
Date: Tue, 28 Jan 2014 19:47:48 +0000
Subject: [IPython-dev] Spell check with the new modal input?
Message-ID: <53526623b13a4351be72dfd44d5fdb4a@BLUPR01MB306.prod.exchangelabs.com>

I'm happily using the new modal input in 2.0-dev, very nice, especially as my fingers get trained. :)
But I'm used to writing text with spell check, and wondered if there was a way to get that. Chrome will do it, but only in a "text field" and a markdown cell does not count, I guess.

--Toby Burnett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140128/60e99df2/attachment.html>

From damianavila at gmail.com  Tue Jan 28 15:05:43 2014
From: damianavila at gmail.com (=?ISO-8859-1?Q?Dami=E1n_Avila?=)
Date: Tue, 28 Jan 2014 18:05:43 -0200
Subject: [IPython-dev] Spell check with the new modal input?
In-Reply-To: <53526623b13a4351be72dfd44d5fdb4a@BLUPR01MB306.prod.exchangelabs.com>
References: <53526623b13a4351be72dfd44d5fdb4a@BLUPR01MB306.prod.exchangelabs.com>
Message-ID: <CAH+mRR1mN0urSV8XBxd872d9brC4PqOvES7BVz3Cr2Nhv6vOXg@mail.gmail.com>

There is no easy way to spellcheck codemirror instances, well... there is a
way using a codemirror layout... but you have to deal with it...

As a workaround, I develop an nbextension to spellcheck your cell content.
You have the details here:
http://www.damian.oquanta.info/posts/a-poor-man-spell-checker-for-the-ipython-notebook.html

Hope it helps!


2014-01-28 Toby Burnett <tburnett at myuw.net>

>  I'm happily using the new modal input in 2.0-dev, very nice, especially
> as my fingers get trained. J
>
> But I'm used to writing text with spell check, and wondered if there was a
> way to get that. Chrome will do it, but only in a "text field" and a
> markdown cell does not count, I guess.
>
>
>
> --Toby Burnett
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>


-- 
Dami?n Avila
Scientific Python Developer
Quantitative Finance Analyst
Statistics, Biostatistics and Econometrics Consultant
Biochemist
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140128/0800e9d0/attachment.html>

From fperez.net at gmail.com  Tue Jan 28 16:42:58 2014
From: fperez.net at gmail.com (Fernando Perez)
Date: Tue, 28 Jan 2014 13:42:58 -0800
Subject: [IPython-dev] IPython Notebook wins Dr. Dobbs Jolt Award for
	Productivity
Message-ID: <CAHAreOpzq7V=WFQ0+mVFj2TK_hiugE=C=MYTsLyFdh9MR3-Phg@mail.gmail.com>

Hi folks,

I just got word that the Notebook won Dr. Dobbs' Jolt Award for
Productivity in Coding Tools:

http://www.drdobbs.com/joltawards/jolt-awards-coding-tools/240165725?pgno=5

Congratulations to an amazing team that keeps impressing everyone with
great quality ideas and tools!!!

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140128/ea8698d8/attachment.html>

From patrickfuller at gmail.com  Tue Jan 28 17:18:08 2014
From: patrickfuller at gmail.com (Patrick Fuller)
Date: Tue, 28 Jan 2014 16:18:08 -0600
Subject: [IPython-dev] Parallel computing segfault behavior
Message-ID: <CA+LJwtth-wxcDtW3D7-vMozLfsGDX1ueNCVFnGokBM7RNnrLYg@mail.gmail.com>

Hi,

Has there been any discussion around how ipython parallel handles
segfaulting?

To make this question more specific, the following code will cause some
workers to crash. All results will become unreadable (or at least
un-iterable), and future runs require a restart of the cluster. Is this
behavior intended, or is it just something that hasn't been discussed?

from IPython.parallel import Clientfrom random import random
def segfaulty_function(random_number, chance=0.25):
    if random_number < chance:
        import ctypes
        i = ctypes.c_char('a')
        j = ctypes.pointer(i)
        c = 0
        while True:
            j[c] = 'a'
            c += 1
        return j
    else:
        return random_number

view = Client(profile="something-parallel-here").load_balanced_view()
results = view.map(segfaulty_function, [random() for _ in range(100)])
for i, result in enumerate(results):
    print i, result

Backstory: Recently I've been working with a large monte carlo library that
segfaults for, like, no reason at all. It's due to some weird underlying
random number issue and happens once every 5-10 thousand runs. I currently
have each worker spin out a child process to isolate the occasional
segfault, but this seems excessive. (I'm also trying to fix the source of
the segfaults, but debugging is a slow process.)

Thanks,
Pat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140128/4f818b02/attachment.html>

From ellisonbg at gmail.com  Tue Jan 28 18:22:31 2014
From: ellisonbg at gmail.com (Brian Granger)
Date: Tue, 28 Jan 2014 15:22:31 -0800
Subject: [IPython-dev] displaying JavaScript-based maps in Notebook:
	tips?
In-Reply-To: <52E698D7.4090102@gmail.com>
References: <52E698D7.4090102@gmail.com>
Message-ID: <CAH4pYpQy69EwPv=3x1U9=ipLE=sWsxadMXrBSa4Bvoj_j_+T7g@mail.gmail.com>

Another option would be the new JavaScript widgets that just got
merged into master...

Cheers,

Brian

On Mon, Jan 27, 2014 at 9:35 AM, Raymond Yee <raymond.yee at gmail.com> wrote:
> Hi everyone,
>
> For the Working with Open Data course I'm currently teaching
> (http://is.gd/wwod14), I would like to work out with my students a way
> to generate light-weight maps to be displayed inside of the IPython
> notebook. Specifically, I would like to generate data to feed to various
> JavaScript libraries including:
>
> * Google geo charts:
> https://developers.google.com/chart/interactive/docs/gallery/geochart
> * d3.js (for many uses, for most immediately for a US county choropleth:
> http://bl.ocks.org/mbostock/4060606
> * vega via vincent -- e.g.,
> https://vincent.readthedocs.org/en/latest/quickstart.html#map-data-binding
> * richer JavaScript maps with underlying layers, such as provided by
> leaflet.js (e.g., http://leafletjs.com/examples/choropleth.html)
>
> I've been superficially aware of the rich data display capabilities of
> the Notebook. And it's great to have some good working details on how to
> exploit such capabilities in the IPython in Depth tutorial
> (http://conference.scipy.org/scipy2013/tutorial_detail.php?id=104):
>
> * IPython's Rich Display System:
> http://nbviewer.ipython.org/github/ipython/ipython-in-depth/blob/master/notebooks/03%20-%20Rich%20Display%20System.ipynb
>
> * Defining Custom Display Logic for Your Own Objects:
> http://nbviewer.ipython.org/github/ipython/ipython-in-depth/blob/master/notebooks/04%20-%20Custom%20Display%20Logic.ipynb
>
> The path I've started down the last few days is to:
>
> * Get examples of the various JavaScript libraries working in a
> stand-alone HTML page
> * Get the example to work in an IPython notebook
> * Generalize the examples into Python classes to use the display system
>
> I've encountered a mix of success and confusion. But I know enough to
> ask a few questions:
>
> * Any pitfalls you've seen around IPython's use of require.js that I
> should be mindful of?
>
> I *think* that I've been running into bad interactions with require.js
> that I don't yet understand. In one simple case of trying to use d3.js,
> I found that I couldn't instantiate the d3 JavaScript object. The
> symptoms I saw are reminiscent of ones reported in stackoverflow -- and
> to which Matthias had responded to:
> http://stackoverflow.com/questions/19487121/how-can-i-load-raphael-within-ipython-notebook-avoiding-some-issues-that-arise
>
>
> This morning I have a notebook (running IPython 1.1 + vincent 0.4.2)
> that runs a vincent example well the first time -- but when I reset the
> kernel and run it the second time (without closing the tab), I encounter
> the following error:
>
> Javascript error adding output! Error {requireType: "mismatch",
> requireModules: undefined, stack: (...), message: "Mismatched anonymous
> define() module: [object
> Object]?http://requirejs.org/docs/errors.html#mismatch"}
>
> [I can write this observation up more rigorously if necessary.]
>
> * Given that there's a lot of changes happening on the JavaScript
> integration front, is it still worthwhile following the approaches laid
> out in the IPython in Depth tutorials around working with the display
> system and JavaScript? Or should I be patient? (I know I could, for
> example, focus on generating HTML output to be written out and loaded
> outside of the notebook to avoid direct integration while things shake
> out....
>
> BTW, in looking up Fernando & Brian's SciPy2013 IPython tutorial, I
> found Using geospatial data with python
> (http://conference.scipy.org/scipy2013/tutorial_detail.php?id=110),
> which I should look at soon!
>
> Thanks!
>
> -Raymond
>
> _______________________________________________
> 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


From benjaminrk at gmail.com  Tue Jan 28 19:45:54 2014
From: benjaminrk at gmail.com (MinRK)
Date: Tue, 28 Jan 2014 16:45:54 -0800
Subject: [IPython-dev] Parallel computing segfault behavior
In-Reply-To: <CA+LJwtth-wxcDtW3D7-vMozLfsGDX1ueNCVFnGokBM7RNnrLYg@mail.gmail.com>
References: <CA+LJwtth-wxcDtW3D7-vMozLfsGDX1ueNCVFnGokBM7RNnrLYg@mail.gmail.com>
Message-ID: <CAHNn8BWf+BQevtzEE-nBXoFYX2HsxoQB0Yu+yfX8g4r6wx8kpQ@mail.gmail.com>

I get an EngineError when an engine dies running a task:

http://nbviewer.ipython.org/gist/minrk/8679553

I think this is the desired behavior.


On Tue, Jan 28, 2014 at 2:18 PM, Patrick Fuller <patrickfuller at gmail.com>wrote:

> Hi,
>
> Has there been any discussion around how ipython parallel handles
> segfaulting?
>
> To make this question more specific, the following code will cause some
> workers to crash. All results will become unreadable (or at least
> un-iterable), and future runs require a restart of the cluster. Is this
> behavior intended, or is it just something that hasn?t been discussed?
>
> from IPython.parallel import Clientfrom random import random
> def segfaulty_function(random_number, chance=0.25):
>     if random_number < chance:
>         import ctypes
>         i = ctypes.c_char('a')
>         j = ctypes.pointer(i)
>         c = 0
>         while True:
>             j[c] = 'a'
>             c += 1
>         return j
>     else:
>         return random_number
>
> view = Client(profile="something-parallel-here").load_balanced_view()
> results = view.map(segfaulty_function, [random() for _ in range(100)])
> for i, result in enumerate(results):
>     print i, result
>
> Backstory: Recently I?ve been working with a large monte carlo library
> that segfaults for, like, no reason at all. It?s due to some weird
> underlying random number issue and happens once every 5-10 thousand runs. I
> currently have each worker spin out a child process to isolate the
> occasional segfault, but this seems excessive. (I'm also trying to fix the
> source of the segfaults, but debugging is a slow process.)
>
> Thanks,
> Pat
>
> _______________________________________________
> 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/20140128/fa19da0a/attachment.html>

From doug.blank at gmail.com  Tue Jan 28 19:58:06 2014
From: doug.blank at gmail.com (Doug Blank)
Date: Tue, 28 Jan 2014 19:58:06 -0500
Subject: [IPython-dev] Implementing inline images in a kernel
Message-ID: <CAAusYCh057N9udHycA6ovMRUhhxTQi9=oyeEenPxFsN7822HJg@mail.gmail.com>

Devs,

In implementing a new kernel, I can appropriately turn returned values into
their rich representation messages. But I'm wrestling with the idea that
the kernel could somehow, in the middle of computing, send such rich
representations to be displayed.

I've seen bits of code that appear to examine strings to see if they begin
with certain signatures that could detect PNG or JPEG encodings. Is that
how it would work... you just send a 64-bit encoded string to the front
end, and it automatically detects it as a rich representation? Or is there
a general standard for marking strings automatically as rich
representations? Or must the kernel construct a message to get any rich
reps? I could make the kernel monitor for special strings (sent from lower
levels), intercept them, and then send the special rich message.

If this question is confusing, perhaps it is because my kernel interfaces
with many subsystems that can generate strings to the output, but hooking
up the lower-level to the rich message system would be hard. I suspect that
this is similar to making an external language, like R, generate images
inline. How does it do it?

Thanks for any pointers,

-Doug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140128/755f95bc/attachment.html>

From asmeurer at gmail.com  Tue Jan 28 19:59:52 2014
From: asmeurer at gmail.com (Aaron Meurer)
Date: Tue, 28 Jan 2014 18:59:52 -0600
Subject: [IPython-dev] Spell check with the new modal input?
In-Reply-To: <CAH+mRR1mN0urSV8XBxd872d9brC4PqOvES7BVz3Cr2Nhv6vOXg@mail.gmail.com>
References: <53526623b13a4351be72dfd44d5fdb4a@BLUPR01MB306.prod.exchangelabs.com>
	<CAH+mRR1mN0urSV8XBxd872d9brC4PqOvES7BVz3Cr2Nhv6vOXg@mail.gmail.com>
Message-ID: <CAKgW=6+FR729BSVQn5ob6xv=1pW6QG-n4w=3P9QcQqhPxwq8bw@mail.gmail.com>

Hmm, I was hoping the new UI would have fixed this. I tend to avoid
the notebook because of this.

Aaron Meurer

On Tue, Jan 28, 2014 at 2:05 PM, Dami?n Avila <damianavila at gmail.com> wrote:
> There is no easy way to spellcheck codemirror instances, well... there is a
> way using a codemirror layout... but you have to deal with it...
>
> As a workaround, I develop an nbextension to spellcheck your cell content.
> You have the details here:
> http://www.damian.oquanta.info/posts/a-poor-man-spell-checker-for-the-ipython-notebook.html
>
> Hope it helps!
>
>
> 2014-01-28 Toby Burnett <tburnett at myuw.net>
>>
>> I'm happily using the new modal input in 2.0-dev, very nice, especially as
>> my fingers get trained. J
>>
>> But I'm used to writing text with spell check, and wondered if there was a
>> way to get that. Chrome will do it, but only in a "text field" and a
>> markdown cell does not count, I guess.
>>
>>
>>
>> --Toby Burnett
>>
>>
>> _______________________________________________
>> IPython-dev mailing list
>> IPython-dev at scipy.org
>> http://mail.scipy.org/mailman/listinfo/ipython-dev
>>
>
>
>
> --
> Dami?n Avila
> Scientific Python Developer
> Quantitative Finance Analyst
> Statistics, Biostatistics and Econometrics Consultant
> Biochemist
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>


From patrickfuller at gmail.com  Tue Jan 28 20:01:30 2014
From: patrickfuller at gmail.com (Patrick Fuller)
Date: Tue, 28 Jan 2014 19:01:30 -0600
Subject: [IPython-dev] Parallel computing segfault behavior
In-Reply-To: <CAHNn8BWf+BQevtzEE-nBXoFYX2HsxoQB0Yu+yfX8g4r6wx8kpQ@mail.gmail.com>
References: <CA+LJwtth-wxcDtW3D7-vMozLfsGDX1ueNCVFnGokBM7RNnrLYg@mail.gmail.com>
	<CAHNn8BWf+BQevtzEE-nBXoFYX2HsxoQB0Yu+yfX8g4r6wx8kpQ@mail.gmail.com>
Message-ID: <CA+LJwtuu5Gqgy_xsKzjo_+3==yz_-Wrw9FqHsfwc=tKsqD1O1Q@mail.gmail.com>

I guess my question is more along the lines of: should the cluster continue
on to complete the queued jobs (as it would if the segfaults were instead
python exceptions)?

On Tuesday, January 28, 2014, MinRK <benjaminrk at gmail.com> wrote:

> I get an EngineError when an engine dies running a task:
>
> http://nbviewer.ipython.org/gist/minrk/8679553
>
> I think this is the desired behavior.
>
>
> On Tue, Jan 28, 2014 at 2:18 PM, Patrick Fuller <patrickfuller at gmail.com<javascript:_e({}, 'cvml', 'patrickfuller at gmail.com');>
> > wrote:
>
>> Hi,
>>
>> Has there been any discussion around how ipython parallel handles
>> segfaulting?
>>
>> To make this question more specific, the following code will cause some
>> workers to crash. All results will become unreadable (or at least
>> un-iterable), and future runs require a restart of the cluster. Is this
>> behavior intended, or is it just something that hasn't been discussed?
>>
>> from IPython.parallel import Clientfrom random import random
>> def segfaulty_function(random_number, chance=0.25):
>>     if random_number < chance:
>>         import ctypes
>>         i = ctypes.c_char('a')
>>         j = ctypes.pointer(i)
>>         c = 0
>>         while True:
>>             j[c] = 'a'
>>             c += 1
>>         return j
>>     else:
>>         return random_number
>>
>> view = Client(profile="something-parallel-here").load_balanced_view()
>> results = view.map(segfaulty_function, [random() for _ in range(100)])
>> for i, result in enumerate(results):
>>     print i, result
>>
>> Backstory: Recently I've been working with a large monte carlo library
>> that segfaults for, like, no reason at all. It's due to some weird
>> underlying random number issue and happens once every 5-10 thousand runs. I
>> currently have each worker spin out a child process to isolate the
>> occasional segfault, but this seems excessive. (I'm also trying to fix the
>> source of the segfaults, but debugging is a slow process.)
>>
>> Thanks,
>> Pat
>>
>> _______________________________________________
>> IPython-dev mailing list
>> IPython-dev at scipy.org <javascript:_e({}, 'cvml',
>> '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/20140128/871bdcef/attachment.html>

From patrickfuller at gmail.com  Tue Jan 28 20:04:05 2014
From: patrickfuller at gmail.com (Patrick Fuller)
Date: Tue, 28 Jan 2014 19:04:05 -0600
Subject: [IPython-dev] Parallel computing segfault behavior
In-Reply-To: <CA+LJwtuu5Gqgy_xsKzjo_+3==yz_-Wrw9FqHsfwc=tKsqD1O1Q@mail.gmail.com>
References: <CA+LJwtth-wxcDtW3D7-vMozLfsGDX1ueNCVFnGokBM7RNnrLYg@mail.gmail.com>
	<CAHNn8BWf+BQevtzEE-nBXoFYX2HsxoQB0Yu+yfX8g4r6wx8kpQ@mail.gmail.com>
	<CA+LJwtuu5Gqgy_xsKzjo_+3==yz_-Wrw9FqHsfwc=tKsqD1O1Q@mail.gmail.com>
Message-ID: <CA+LJwtsRi5j94VDF7o9uyxM1oHkBz2w+VJ-cw78v-y3xQZaR4g@mail.gmail.com>

...the difference being that this would require starting a new engine on
each segfault

On Tuesday, January 28, 2014, Patrick Fuller <patrickfuller at gmail.com>
wrote:

> I guess my question is more along the lines of: should the cluster
> continue on to complete the queued jobs (as it would if the segfaults were
> instead python exceptions)?
>
> On Tuesday, January 28, 2014, MinRK <benjaminrk at gmail.com<javascript:_e({}, 'cvml', 'benjaminrk at gmail.com');>>
> wrote:
>
>> I get an EngineError when an engine dies running a task:
>>
>> http://nbviewer.ipython.org/gist/minrk/8679553
>>
>> I think this is the desired behavior.
>>
>>
>> On Tue, Jan 28, 2014 at 2:18 PM, Patrick Fuller <patrickfuller at gmail.com>wrote:
>>
>>> Hi,
>>>
>>> Has there been any discussion around how ipython parallel handles
>>> segfaulting?
>>>
>>> To make this question more specific, the following code will cause some
>>> workers to crash. All results will become unreadable (or at least
>>> un-iterable), and future runs require a restart of the cluster. Is this
>>> behavior intended, or is it just something that hasn't been discussed?
>>>
>>> from IPython.parallel import Clientfrom random import random
>>> def segfaulty_function(random_number, chance=0.25):
>>>     if random_number < chance:
>>>         import ctypes
>>>         i = ctypes.c_char('a')
>>>         j = ctypes.pointer(i)
>>>         c = 0
>>>         while True:
>>>             j[c] = 'a'
>>>             c += 1
>>>         return j
>>>     else:
>>>         return random_number
>>>
>>> view = Client(profile="something-parallel-here").load_balanced_view()
>>> results = view.map(segfaulty_function, [random() for _ in range(100)])
>>> for i, result in enumerate(results):
>>>     print i, result
>>>
>>> Backstory: Recently I've been working with a large monte carlo library
>>> that segfaults for, like, no reason at all. It's due to some weird
>>> underlying random number issue and happens once every 5-10 thousand runs. I
>>> currently have each worker spin out a child process to isolate the
>>> occasional segfault, but this seems excessive. (I'm also trying to fix the
>>> source of the segfaults, but debugging is a slow process.)
>>>
>>> Thanks,
>>> Pat
>>>
>>> _______________________________________________
>>> 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/20140128/b2eff95f/attachment.html>

From ellisonbg at gmail.com  Tue Jan 28 20:24:15 2014
From: ellisonbg at gmail.com (Brian Granger)
Date: Tue, 28 Jan 2014 17:24:15 -0800
Subject: [IPython-dev] Spell check with the new modal input?
In-Reply-To: <CAKgW=6+FR729BSVQn5ob6xv=1pW6QG-n4w=3P9QcQqhPxwq8bw@mail.gmail.com>
References: <53526623b13a4351be72dfd44d5fdb4a@BLUPR01MB306.prod.exchangelabs.com>
	<CAH+mRR1mN0urSV8XBxd872d9brC4PqOvES7BVz3Cr2Nhv6vOXg@mail.gmail.com>
	<CAKgW=6+FR729BSVQn5ob6xv=1pW6QG-n4w=3P9QcQqhPxwq8bw@mail.gmail.com>
Message-ID: <CAH4pYpT8uCsGBvQ+fGEC405d52K0jprZbCyChxNxUmikXZ2iyQ@mail.gmail.com>

The new modal UI was a very targeted effort to fix/improve one part of
the experience. Definitely not related to spellchecking in any way.
Sorry.

Brian

On Tue, Jan 28, 2014 at 4:59 PM, Aaron Meurer <asmeurer at gmail.com> wrote:
> Hmm, I was hoping the new UI would have fixed this. I tend to avoid
> the notebook because of this.
>
> Aaron Meurer
>
> On Tue, Jan 28, 2014 at 2:05 PM, Dami?n Avila <damianavila at gmail.com> wrote:
>> There is no easy way to spellcheck codemirror instances, well... there is a
>> way using a codemirror layout... but you have to deal with it...
>>
>> As a workaround, I develop an nbextension to spellcheck your cell content.
>> You have the details here:
>> http://www.damian.oquanta.info/posts/a-poor-man-spell-checker-for-the-ipython-notebook.html
>>
>> Hope it helps!
>>
>>
>> 2014-01-28 Toby Burnett <tburnett at myuw.net>
>>>
>>> I'm happily using the new modal input in 2.0-dev, very nice, especially as
>>> my fingers get trained. J
>>>
>>> But I'm used to writing text with spell check, and wondered if there was a
>>> way to get that. Chrome will do it, but only in a "text field" and a
>>> markdown cell does not count, I guess.
>>>
>>>
>>>
>>> --Toby Burnett
>>>
>>>
>>> _______________________________________________
>>> IPython-dev mailing list
>>> IPython-dev at scipy.org
>>> http://mail.scipy.org/mailman/listinfo/ipython-dev
>>>
>>
>>
>>
>> --
>> Dami?n Avila
>> Scientific Python Developer
>> Quantitative Finance Analyst
>> Statistics, Biostatistics and Econometrics Consultant
>> Biochemist
>>
>> _______________________________________________
>> 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


From damianavila at gmail.com  Tue Jan 28 20:25:27 2014
From: damianavila at gmail.com (=?ISO-8859-1?Q?Dami=E1n_Avila?=)
Date: Tue, 28 Jan 2014 23:25:27 -0200
Subject: [IPython-dev] Spell check with the new modal input?
In-Reply-To: <CAH4pYpT8uCsGBvQ+fGEC405d52K0jprZbCyChxNxUmikXZ2iyQ@mail.gmail.com>
References: <53526623b13a4351be72dfd44d5fdb4a@BLUPR01MB306.prod.exchangelabs.com>
	<CAH+mRR1mN0urSV8XBxd872d9brC4PqOvES7BVz3Cr2Nhv6vOXg@mail.gmail.com>
	<CAKgW=6+FR729BSVQn5ob6xv=1pW6QG-n4w=3P9QcQqhPxwq8bw@mail.gmail.com>
	<CAH4pYpT8uCsGBvQ+fGEC405d52K0jprZbCyChxNxUmikXZ2iyQ@mail.gmail.com>
Message-ID: <CAH+mRR0SHuiCwFbfAQzE5T4X-sP7N6Kvq_88w0T5D8rMT745HQ@mail.gmail.com>

The problems comes from the codemirror instance itself... in fact there is
no a "common" text area, so... your browser do not know how to spellcheck
something that did not exist as a text area (although it looks like one).
It is no so difficult to do find an "optimal" solution with codemirror
layouts, but you need to know how to apply it, and you will also need a js
library which perform the spellcheck... so, because I wanted something
useful very quickly, I developed the extension I linked before... It is not
the best solution, I know, but I can spell check now  (in a "poor man" way
;-))


2014-01-28 Brian Granger <ellisonbg at gmail.com>

> The new modal UI was a very targeted effort to fix/improve one part of
> the experience. Definitely not related to spellchecking in any way.
> Sorry.
>
> Brian
>
> On Tue, Jan 28, 2014 at 4:59 PM, Aaron Meurer <asmeurer at gmail.com> wrote:
> > Hmm, I was hoping the new UI would have fixed this. I tend to avoid
> > the notebook because of this.
> >
> > Aaron Meurer
> >
> > On Tue, Jan 28, 2014 at 2:05 PM, Dami?n Avila <damianavila at gmail.com>
> wrote:
> >> There is no easy way to spellcheck codemirror instances, well... there
> is a
> >> way using a codemirror layout... but you have to deal with it...
> >>
> >> As a workaround, I develop an nbextension to spellcheck your cell
> content.
> >> You have the details here:
> >>
> http://www.damian.oquanta.info/posts/a-poor-man-spell-checker-for-the-ipython-notebook.html
> >>
> >> Hope it helps!
> >>
> >>
> >> 2014-01-28 Toby Burnett <tburnett at myuw.net>
> >>>
> >>> I'm happily using the new modal input in 2.0-dev, very nice,
> especially as
> >>> my fingers get trained. J
> >>>
> >>> But I'm used to writing text with spell check, and wondered if there
> was a
> >>> way to get that. Chrome will do it, but only in a "text field" and a
> >>> markdown cell does not count, I guess.
> >>>
> >>>
> >>>
> >>> --Toby Burnett
> >>>
> >>>
> >>> _______________________________________________
> >>> IPython-dev mailing list
> >>> IPython-dev at scipy.org
> >>> http://mail.scipy.org/mailman/listinfo/ipython-dev
> >>>
> >>
> >>
> >>
> >> --
> >> Dami?n Avila
> >> Scientific Python Developer
> >> Quantitative Finance Analyst
> >> Statistics, Biostatistics and Econometrics Consultant
> >> Biochemist
> >>
> >> _______________________________________________
> >> 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
>



-- 
Dami?n Avila
Scientific Python Developer
Quantitative Finance Analyst
Statistics, Biostatistics and Econometrics Consultant
Biochemist
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140128/0ae0a02a/attachment.html>

From takowl at gmail.com  Tue Jan 28 20:33:50 2014
From: takowl at gmail.com (Thomas Kluyver)
Date: Tue, 28 Jan 2014 17:33:50 -0800
Subject: [IPython-dev] Implementing inline images in a kernel
In-Reply-To: <CAAusYCh057N9udHycA6ovMRUhhxTQi9=oyeEenPxFsN7822HJg@mail.gmail.com>
References: <CAAusYCh057N9udHycA6ovMRUhhxTQi9=oyeEenPxFsN7822HJg@mail.gmail.com>
Message-ID: <CAOvn4qh-ny0xYZAoNs9UobbSdvOZehFzUQ2uXpbiCStoMmS7Eg@mail.gmail.com>

Hi Doug,

On 28 January 2014 16:58, Doug Blank <doug.blank at gmail.com> wrote:

> In implementing a new kernel, I can appropriately turn returned values
> into their rich representation messages. But I'm wrestling with the idea
> that the kernel could somehow, in the middle of computing, send such rich
> representations to be displayed.
>
> I've seen bits of code that appear to examine strings to see if they begin
> with certain signatures that could detect PNG or JPEG encodings. Is that
> how it would work... you just send a 64-bit encoded string to the front
> end, and it automatically detects it as a rich representation? Or is there
> a general standard for marking strings automatically as rich
> representations? Or must the kernel construct a message to get any rich
> reps? I could make the kernel monitor for special strings (sent from lower
> levels), intercept them, and then send the special rich message.
>
> If this question is confusing, perhaps it is because my kernel interfaces
> with many subsystems that can generate strings to the output, but hooking
> up the lower-level to the rich message system would be hard. I suspect that
> this is similar to making an external language, like R, generate images
> inline. How does it do it?
>

The code in question does have to know something about the message spec; we
don't try to detect things like images from a simple stream. The code needs
to builds a dictionary keyed by the mimetypes of the outputs it offers, and
send that to the frontend in a display_data message:
http://ipython.org/ipython-doc/dev/development/messaging.html#display-data

So a simple function to display a PNG might look like this:

 def display(pngdata):

shell_channel.send_msg(type='display_data',

content={'source': 'my display func', #Not sure what this is used for

'data': {'image/png': base64encode(pngdata)},

'metadata': {'image/png': {'width':640, 'height':480}},

},

parent=last_execute_request

)

(this is abstract, not written against any real kernel APIs)

For Python, we've extended Python's concept of a __repr__ magic method to
support other formats, e.g. _repr_html_. Then we have a convenient
function, IPython.display.display(), which builds the dictionary of output
formats and takes care of sending it.

The R magic is a bit of a special case: it gets R to save the images it
generates to files in a temporary directory, and after the R code has
finished, it reads all the files from that directory back and sends
display_data messages for them. That's only practical because of the way
R's plotting backends work, and it still leads to problems on Windows.

Your kernel could intercept strings written to stdout, spot certain
patterns, and turn them into display messages, but it has the feel of a bad
idea - what if you actually want to print the first hundred bytes of a PNG,
for instance.

I hope that helps,
Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140128/47f7953e/attachment.html>

From ellisonbg at gmail.com  Tue Jan 28 20:59:28 2014
From: ellisonbg at gmail.com (Brian Granger)
Date: Tue, 28 Jan 2014 17:59:28 -0800
Subject: [IPython-dev] Implementing inline images in a kernel
In-Reply-To: <CAAusYCh057N9udHycA6ovMRUhhxTQi9=oyeEenPxFsN7822HJg@mail.gmail.com>
References: <CAAusYCh057N9udHycA6ovMRUhhxTQi9=oyeEenPxFsN7822HJg@mail.gmail.com>
Message-ID: <CAH4pYpT+BgP93BFud2FTySe4KT+VWOZN1jx_u43RVJ7zwXco4w@mail.gmail.com>

> In implementing a new kernel, I can appropriately turn returned values into
> their rich representation messages. But I'm wrestling with the idea that the
> kernel could somehow, in the middle of computing, send such rich
> representations to be displayed.

The best starting place for this is our message spec:

http://ipython.org/ipython-doc/dev/development/messaging.html

The basic idea is that you just need to send these messages.  But it
sounds like you are already doing this part?

> I've seen bits of code that appear to examine strings to see if they begin
> with certain signatures that could detect PNG or JPEG encodings. Is that how
> it would work... you just send a 64-bit encoded string to the front end, and
> it automatically detects it as a rich representation? Or is there a general
> standard for marking strings automatically as rich representations? Or must
> the kernel construct a message to get any rich reps? I could make the kernel
> monitor for special strings (sent from lower levels), intercept them, and
> then send the special rich message.

I don't think you want to try to guess the rich representation based
on pure string values. In the IPython kernel, we have very detailed
Python APIs for plugging into the messaging layer.  Thomas has
described some of that. I would have a look at the various parts of
IPython.core that have this if you want to see how we do it in
IPython:

https://github.com/ipython/ipython/tree/master/IPython/core

displayhook.py
display.py
displaypub.py
formatters.py

There is actually a lot of complexity there.


> If this question is confusing, perhaps it is because my kernel interfaces
> with many subsystems that can generate strings to the output, but hooking up
> the lower-level to the rich message system would be hard. I suspect that
> this is similar to making an external language, like R, generate images
> inline. How does it do it?

You will have to be able to call the subsystems and be able to track
the various rich representations that the subsystems can track.

A side point though:

Having one kernel that can run different languages is similar to the
main IPython kernel and our %% magic syntax. This works OK, but is
very limited because of a number of aspects:

* You have to abstract things like tab completion for all of your sub
systems through the main kernel.
* You have to figure out how to get rich reprs from the sub systems to
the main kernel which will send the messages.
* It will almost certainly be difficult to impossible to use our new
widget architecture in the subsystems.
* Things like syntax highlighting in the browser will be broken.

Because of this, our feeling is that for any real, serious notebook
work in another language, it should be done as a completely
independent native kernel.  What do I mean by this? The best example
is the Julia kernel, which is written in pure Julia and ties Julia
code to our message spec for rich reprs, tab completion, etc. It works
exactly like the real IPython kernel with all of the same
capabilities. Similarly, a Ruby kernel would be written in Ruby and
run only Ruby code.

As we move to IPython 3.0 our support for other kernels is going to
improve dramatically - it will be possible to change the kernels with
simple dropdown in the notebook.

Given the limitations of the nested kernel approach and all of the
strong support for multiple native kernels, I am wondering if the
nested kernel approach makes sense in the long run. The only case
where I think it makes sense to use the nested approach is for toy
languages like logo that are well suited to a full blown kernel
itself. But it would be quite simple to write a %%logo magic for the
existing IPython kernels.

Cheers,

Brian

> Thanks for any pointers,
>
> -Doug
>
>
> _______________________________________________
> 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


From doug.blank at gmail.com  Tue Jan 28 21:02:11 2014
From: doug.blank at gmail.com (Doug Blank)
Date: Tue, 28 Jan 2014 21:02:11 -0500
Subject: [IPython-dev] Implementing inline images in a kernel
In-Reply-To: <CAOvn4qh-ny0xYZAoNs9UobbSdvOZehFzUQ2uXpbiCStoMmS7Eg@mail.gmail.com>
References: <CAAusYCh057N9udHycA6ovMRUhhxTQi9=oyeEenPxFsN7822HJg@mail.gmail.com>
	<CAOvn4qh-ny0xYZAoNs9UobbSdvOZehFzUQ2uXpbiCStoMmS7Eg@mail.gmail.com>
Message-ID: <CAAusYCgCu94OxcbN0LpwDLPBgkZreFtdpnoEqAZGKn1G5qXYSg@mail.gmail.com>

On Tue, Jan 28, 2014 at 8:33 PM, Thomas Kluyver <takowl at gmail.com> wrote:

> Hi Doug,
>
> On 28 January 2014 16:58, Doug Blank <doug.blank at gmail.com> wrote:
>
>> In implementing a new kernel, I can appropriately turn returned values
>> into their rich representation messages. But I'm wrestling with the idea
>> that the kernel could somehow, in the middle of computing, send such rich
>> representations to be displayed.
>>
>> I've seen bits of code that appear to examine strings to see if they
>> begin with certain signatures that could detect PNG or JPEG encodings. Is
>> that how it would work... you just send a 64-bit encoded string to the
>> front end, and it automatically detects it as a rich representation? Or is
>> there a general standard for marking strings automatically as rich
>> representations? Or must the kernel construct a message to get any rich
>> reps? I could make the kernel monitor for special strings (sent from lower
>> levels), intercept them, and then send the special rich message.
>>
>> If this question is confusing, perhaps it is because my kernel interfaces
>> with many subsystems that can generate strings to the output, but hooking
>> up the lower-level to the rich message system would be hard. I suspect that
>> this is similar to making an external language, like R, generate images
>> inline. How does it do it?
>>
>
> The code in question does have to know something about the message spec;
> we don't try to detect things like images from a simple stream. The code
> needs to builds a dictionary keyed by the mimetypes of the outputs it
> offers, and send that to the frontend in a display_data message:
> http://ipython.org/ipython-doc/dev/development/messaging.html#display-data
>
> So a simple function to display a PNG might look like this:
>
> def display(pngdata):
>
> shell_channel.send_msg(type='display_data',
>
> content={'source': 'my display func', #Not sure what this is used for
>
> 'data': {'image/png': base64encode(pngdata)},
>
> 'metadata': {'image/png': {'width':640, 'height':480}},
>
> },
>
> parent=last_execute_request
>
> )
>
> (this is abstract, not written against any real kernel APIs)
>
>
Thanks, yes, I have pretty much that in the high-level kernel. I ask the
lower parts to eval the notebook cell code, and I can convert that as you
show.


> For Python, we've extended Python's concept of a __repr__ magic method to
> support other formats, e.g. _repr_html_. Then we have a convenient
> function, IPython.display.display(), which builds the dictionary of output
> formats and takes care of sending it.
>
>
Right, I could do that, but would require doing it for each language at the
lower level. Looking for a solution at the higher level where everything
must go through on the way to the frontend.


> The R magic is a bit of a special case: it gets R to save the images it
> generates to files in a temporary directory, and after the R code has
> finished, it reads all the files from that directory back and sends
> display_data messages for them. That's only practical because of the way
> R's plotting backends work, and it still leads to problems on Windows.
>
>
Interesting, but I think I can do better than that with this kernel.


> Your kernel could intercept strings written to stdout, spot certain
> patterns, and turn them into display messages, but it has the feel of a bad
> idea - what if you actually want to print the first hundred bytes of a PNG,
> for instance.
>

Perhaps I can make it smell better :) Yes, this method would be embedding
rich text in a string, but in such a manner that wouldn't be confused with
real strings.

But maybe you are correct... maybe I can make available to the low level a
display() function... I'll try that first.

Thanks!

-Doug


>
> I hope that helps,
> Thomas
>
> _______________________________________________
> 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/20140128/ecaccd66/attachment.html>

From jason-sage at creativetrax.com  Tue Jan 28 21:05:31 2014
From: jason-sage at creativetrax.com (Jason Grout)
Date: Tue, 28 Jan 2014 20:05:31 -0600
Subject: [IPython-dev] Implementing inline images in a kernel
In-Reply-To: <CAH4pYpT+BgP93BFud2FTySe4KT+VWOZN1jx_u43RVJ7zwXco4w@mail.gmail.com>
References: <CAAusYCh057N9udHycA6ovMRUhhxTQi9=oyeEenPxFsN7822HJg@mail.gmail.com>
	<CAH4pYpT+BgP93BFud2FTySe4KT+VWOZN1jx_u43RVJ7zwXco4w@mail.gmail.com>
Message-ID: <52E861EB.2010701@creativetrax.com>

On 1/28/14 7:59 PM, Brian Granger wrote:
> As we move to IPython 3.0 our support for other kernels is going to
> improve dramatically - it will be possible to change the kernels with
> simple dropdown in the notebook.

What if we supported different kernels on a per-cell basis?  Then it 
would be similar to the %% magics.  There could be a number of kernels 
associated with a notebook, and the metadata on a cell would tell where 
to send the code and get output from?

Thanks,

Jason



From ellisonbg at gmail.com  Tue Jan 28 21:10:58 2014
From: ellisonbg at gmail.com (Brian Granger)
Date: Tue, 28 Jan 2014 18:10:58 -0800
Subject: [IPython-dev] Implementing inline images in a kernel
In-Reply-To: <52E861EB.2010701@creativetrax.com>
References: <CAAusYCh057N9udHycA6ovMRUhhxTQi9=oyeEenPxFsN7822HJg@mail.gmail.com>
	<CAH4pYpT+BgP93BFud2FTySe4KT+VWOZN1jx_u43RVJ7zwXco4w@mail.gmail.com>
	<52E861EB.2010701@creativetrax.com>
Message-ID: <CAH4pYpR2F0AEqvth0XBQY1Ph=yk141a0e9cLJgENvJ4os_NxcA@mail.gmail.com>

> What if we supported different kernels on a per-cell basis?  Then it
> would be similar to the %% magics.  There could be a number of kernels
> associated with a notebook, and the metadata on a cell would tell where
> to send the code and get output from?

User's heads will already explode with the ability to change kernels
on the fly for an entire notebook. Allowing that for individual cells
would lead to a further explosion of UI complexity and cognitive load.
Obviously, anyone is free to build such a beast, but I can't imagine
that ever being within scope for IPython itself.

Cheers,

Brian

> Thanks,
>
> Jason
>
> _______________________________________________
> 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


From doug.blank at gmail.com  Tue Jan 28 21:11:16 2014
From: doug.blank at gmail.com (Doug Blank)
Date: Tue, 28 Jan 2014 21:11:16 -0500
Subject: [IPython-dev] Implementing inline images in a kernel
In-Reply-To: <CAH4pYpT+BgP93BFud2FTySe4KT+VWOZN1jx_u43RVJ7zwXco4w@mail.gmail.com>
References: <CAAusYCh057N9udHycA6ovMRUhhxTQi9=oyeEenPxFsN7822HJg@mail.gmail.com>
	<CAH4pYpT+BgP93BFud2FTySe4KT+VWOZN1jx_u43RVJ7zwXco4w@mail.gmail.com>
Message-ID: <CAAusYCiC=yVXib5iqY3Wr6WC1ZXKZotMM0B=YCFwRgPANvNCng@mail.gmail.com>

On Tue, Jan 28, 2014 at 8:59 PM, Brian Granger <ellisonbg at gmail.com> wrote:

> > In implementing a new kernel, I can appropriately turn returned values
> into
> > their rich representation messages. But I'm wrestling with the idea that
> the
> > kernel could somehow, in the middle of computing, send such rich
> > representations to be displayed.
>
> The best starting place for this is our message spec:
>
> http://ipython.org/ipython-doc/dev/development/messaging.html
>
> The basic idea is that you just need to send these messages.  But it
> sounds like you are already doing this part?
>
> > I've seen bits of code that appear to examine strings to see if they
> begin
> > with certain signatures that could detect PNG or JPEG encodings. Is that
> how
> > it would work... you just send a 64-bit encoded string to the front end,
> and
> > it automatically detects it as a rich representation? Or is there a
> general
> > standard for marking strings automatically as rich representations? Or
> must
> > the kernel construct a message to get any rich reps? I could make the
> kernel
> > monitor for special strings (sent from lower levels), intercept them, and
> > then send the special rich message.
>
> I don't think you want to try to guess the rich representation based
> on pure string values. In the IPython kernel, we have very detailed
> Python APIs for plugging into the messaging layer.  Thomas has
> described some of that. I would have a look at the various parts of
> IPython.core that have this if you want to see how we do it in
> IPython:
>
> https://github.com/ipython/ipython/tree/master/IPython/core
>
> displayhook.py
> display.py
> displaypub.py
> formatters.py
>
> There is actually a lot of complexity there.
>
>
> > If this question is confusing, perhaps it is because my kernel interfaces
> > with many subsystems that can generate strings to the output, but
> hooking up
> > the lower-level to the rich message system would be hard. I suspect that
> > this is similar to making an external language, like R, generate images
> > inline. How does it do it?
>
> You will have to be able to call the subsystems and be able to track
> the various rich representations that the subsystems can track.
>
>
Yes, I have the message-level figured out :) But this is about getting that
exposed to the subsystems. Down there, output is just strings.


> A side point though:
>
> Having one kernel that can run different languages is similar to the
> main IPython kernel and our %% magic syntax. This works OK, but is
> very limited because of a number of aspects:
>
> * You have to abstract things like tab completion for all of your sub
> systems through the main kernel.
> * You have to figure out how to get rich reprs from the sub systems to
> the main kernel which will send the messages.
> * It will almost certainly be difficult to impossible to use our new
> widget architecture in the subsystems.
> * Things like syntax highlighting in the browser will be broken.
>
> Because of this, our feeling is that for any real, serious notebook
> work in another language, it should be done as a completely
> independent native kernel.  What do I mean by this? The best example
> is the Julia kernel, which is written in pure Julia and ties Julia
> code to our message spec for rich reprs, tab completion, etc. It works
> exactly like the real IPython kernel with all of the same
> capabilities. Similarly, a Ruby kernel would be written in Ruby and
> run only Ruby code.
>
>
Well, that is probably true in general. But Calico is a very different kind
of beast. It doesn't run the languages independently in their own space...
all of the languages run in the same space. They can share data and
functions and memory, but not by marshaling between systems.


> As we move to IPython 3.0 our support for other kernels is going to
> improve dramatically - it will be possible to change the kernels with
> simple dropdown in the notebook.
>
>
I suspect that Calico muddies the water a bit by having all of its
languages in a single environment/kernel. But this is very different (the
way that I understand it) from the way that bash, R, and Python interact in
IPython.


> Given the limitations of the nested kernel approach and all of the
> strong support for multiple native kernels, I am wondering if the
> nested kernel approach makes sense in the long run. The only case
> where I think it makes sense to use the nested approach is for toy
> languages like logo that are well suited to a full blown kernel
> itself. But it would be quite simple to write a %%logo magic for the
> existing IPython kernels.
>
>
There are other issues too; for example, our Logo can do anything that
Python can do because it uses the same libraries. You write the library
once, and it is available for all languages as if it were written in that
language.

Thanks!

-Doug


> Cheers,
>
> Brian
>
> > Thanks for any pointers,
> >
> > -Doug
> >
> >
> > _______________________________________________
> > 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140128/03ad675b/attachment.html>

From doug.blank at gmail.com  Tue Jan 28 21:15:11 2014
From: doug.blank at gmail.com (Doug Blank)
Date: Tue, 28 Jan 2014 21:15:11 -0500
Subject: [IPython-dev] Implementing inline images in a kernel
In-Reply-To: <CAH4pYpR2F0AEqvth0XBQY1Ph=yk141a0e9cLJgENvJ4os_NxcA@mail.gmail.com>
References: <CAAusYCh057N9udHycA6ovMRUhhxTQi9=oyeEenPxFsN7822HJg@mail.gmail.com>
	<CAH4pYpT+BgP93BFud2FTySe4KT+VWOZN1jx_u43RVJ7zwXco4w@mail.gmail.com>
	<52E861EB.2010701@creativetrax.com>
	<CAH4pYpR2F0AEqvth0XBQY1Ph=yk141a0e9cLJgENvJ4os_NxcA@mail.gmail.com>
Message-ID: <CAAusYCivBM3t5KNKW3gYwr89kL1rS9yaZdDjSn4J-fvbcfHR+A@mail.gmail.com>

On Tue, Jan 28, 2014 at 9:10 PM, Brian Granger <ellisonbg at gmail.com> wrote:

> > What if we supported different kernels on a per-cell basis?  Then it
> > would be similar to the %% magics.  There could be a number of kernels
> > associated with a notebook, and the metadata on a cell would tell where
> > to send the code and get output from?
>
> User's heads will already explode with the ability to change kernels
> on the fly for an entire notebook. Allowing that for individual cells
> would lead to a further explosion of UI complexity and cognitive load.
> Obviously, anyone is free to build such a beast, but I can't imagine
> that ever being within scope for IPython itself.
>
>
I could image that the kernel could send some config options to the
frontend regarding cell tags, or menu options. That way, not every design
decision needs to happen by IPython, but by the kernel developers. But,
yes, I think that would be a lot of work for little gain.

-Doug


> Cheers,
>
> Brian
>
> > Thanks,
> >
> > Jason
> >
> > _______________________________________________
> > 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140128/2a5fc686/attachment.html>

From ellisonbg at gmail.com  Tue Jan 28 21:17:05 2014
From: ellisonbg at gmail.com (Brian Granger)
Date: Tue, 28 Jan 2014 18:17:05 -0800
Subject: [IPython-dev] Implementing inline images in a kernel
In-Reply-To: <CAH4pYpR2F0AEqvth0XBQY1Ph=yk141a0e9cLJgENvJ4os_NxcA@mail.gmail.com>
References: <CAAusYCh057N9udHycA6ovMRUhhxTQi9=oyeEenPxFsN7822HJg@mail.gmail.com>
	<CAH4pYpT+BgP93BFud2FTySe4KT+VWOZN1jx_u43RVJ7zwXco4w@mail.gmail.com>
	<52E861EB.2010701@creativetrax.com>
	<CAH4pYpR2F0AEqvth0XBQY1Ph=yk141a0e9cLJgENvJ4os_NxcA@mail.gmail.com>
Message-ID: <CAH4pYpR+x+YJHop8rtJbU0AKRyo+FvNrnTLWGPxL=ooSNdcEtA@mail.gmail.com>

Jason, to illustrate:

Id?e int?ressante

?? ? ?????, ??? ???? ????????? ????????

Ben kullan?c?lar i?in ?ok kafa kar??t?r?c? olaca??n? d???n?yorum

???????????1????????????????

???? ???? ??? ???? ???? ????????? ??????? ?? ??????? ?? ????? ???? ???

French, Russian, Turkish, Japanese, Hebrew. Have fun translating :)

On Tue, Jan 28, 2014 at 6:10 PM, Brian Granger <ellisonbg at gmail.com> wrote:
>> What if we supported different kernels on a per-cell basis?  Then it
>> would be similar to the %% magics.  There could be a number of kernels
>> associated with a notebook, and the metadata on a cell would tell where
>> to send the code and get output from?
>
> User's heads will already explode with the ability to change kernels
> on the fly for an entire notebook. Allowing that for individual cells
> would lead to a further explosion of UI complexity and cognitive load.
> Obviously, anyone is free to build such a beast, but I can't imagine
> that ever being within scope for IPython itself.
>
> Cheers,
>
> Brian
>
>> Thanks,
>>
>> Jason
>>
>> _______________________________________________
>> 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



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


From benjaminrk at gmail.com  Tue Jan 28 21:32:48 2014
From: benjaminrk at gmail.com (MinRK)
Date: Tue, 28 Jan 2014 18:32:48 -0800
Subject: [IPython-dev] Parallel computing segfault behavior
In-Reply-To: <CA+LJwtsRi5j94VDF7o9uyxM1oHkBz2w+VJ-cw78v-y3xQZaR4g@mail.gmail.com>
References: <CA+LJwtth-wxcDtW3D7-vMozLfsGDX1ueNCVFnGokBM7RNnrLYg@mail.gmail.com>
	<CAHNn8BWf+BQevtzEE-nBXoFYX2HsxoQB0Yu+yfX8g4r6wx8kpQ@mail.gmail.com>
	<CA+LJwtuu5Gqgy_xsKzjo_+3==yz_-Wrw9FqHsfwc=tKsqD1O1Q@mail.gmail.com>
	<CA+LJwtsRi5j94VDF7o9uyxM1oHkBz2w+VJ-cw78v-y3xQZaR4g@mail.gmail.com>
Message-ID: <CAHNn8BU2xR5CR1ZUhFXEEdDbqPwQNYv_B0smbuO-UZz4p2C4UA@mail.gmail.com>

On Tue, Jan 28, 2014 at 5:04 PM, Patrick Fuller <patrickfuller at gmail.com>wrote:

> ...the difference being that this would require starting a new engine on
> each segfault
>
>
> On Tuesday, January 28, 2014, Patrick Fuller <patrickfuller at gmail.com>
> wrote:
>
>> I guess my question is more along the lines of: should the cluster
>> continue on to complete the queued jobs (as it would if the segfaults were
>> instead python exceptions)?
>
>
I see what you mean - the generator halts when it sees an exception, so
it's inconvenient to get the successes, while ignoring the failures. I
guess we could add separate methods that only iterate through just the
successful results.

As far as task submission goes, it does indeed do what you seem to expect,
so it's just viewing the results where there is an issue.

Here is an example <http://nbviewer.ipython.org/gist/minrk/8680688> of
iterating through only the successful results of a map that segfaults.

-MinRK


>
>> On Tuesday, January 28, 2014, MinRK <benjaminrk at gmail.com> wrote:
>>
>>> I get an EngineError when an engine dies running a task:
>>>
>>> http://nbviewer.ipython.org/gist/minrk/8679553
>>>
>>> I think this is the desired behavior.
>>>
>>>
>>> On Tue, Jan 28, 2014 at 2:18 PM, Patrick Fuller <patrickfuller at gmail.com
>>> > wrote:
>>>
>>>> Hi,
>>>>
>>>> Has there been any discussion around how ipython parallel handles
>>>> segfaulting?
>>>>
>>>> To make this question more specific, the following code will cause some
>>>> workers to crash. All results will become unreadable (or at least
>>>> un-iterable), and future runs require a restart of the cluster. Is this
>>>> behavior intended, or is it just something that hasn?t been discussed?
>>>>
>>>> from IPython.parallel import Clientfrom random import random
>>>> def segfaulty_function(random_number, chance=0.25):
>>>>     if random_number < chance:
>>>>         import ctypes
>>>>         i = ctypes.c_char('a')
>>>>         j = ctypes.pointer(i)
>>>>         c = 0
>>>>         while True:
>>>>             j[c] = 'a'
>>>>             c += 1
>>>>         return j
>>>>     else:
>>>>         return random_number
>>>>
>>>> view = Client(profile="something-parallel-here").load_balanced_view()
>>>> results = view.map(segfaulty_function, [random() for _ in range(100)])
>>>> for i, result in enumerate(results):
>>>>     print i, result
>>>>
>>>> Backstory: Recently I?ve been working with a large monte carlo library
>>>> that segfaults for, like, no reason at all. It?s due to some weird
>>>> underlying random number issue and happens once every 5-10 thousand runs. I
>>>> currently have each worker spin out a child process to isolate the
>>>> occasional segfault, but this seems excessive. (I'm also trying to fix the
>>>> source of the segfaults, but debugging is a slow process.)
>>>>
>>>> Thanks,
>>>> Pat
>>>>
>>>> _______________________________________________
>>>> 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/20140128/6f80c0af/attachment.html>

From doug.blank at gmail.com  Tue Jan 28 21:48:37 2014
From: doug.blank at gmail.com (Doug Blank)
Date: Tue, 28 Jan 2014 21:48:37 -0500
Subject: [IPython-dev] displaying JavaScript-based maps in Notebook:
	tips?
In-Reply-To: <CAH4pYpQy69EwPv=3x1U9=ipLE=sWsxadMXrBSa4Bvoj_j_+T7g@mail.gmail.com>
References: <52E698D7.4090102@gmail.com>
	<CAH4pYpQy69EwPv=3x1U9=ipLE=sWsxadMXrBSa4Bvoj_j_+T7g@mail.gmail.com>
Message-ID: <CAAusYChBsCEjJN1-sTvte4jXFUUa_cWeaAyzRHnWfukrdQ4wDA@mail.gmail.com>

On Tue, Jan 28, 2014 at 6:22 PM, Brian Granger <ellisonbg at gmail.com> wrote:

> Another option would be the new JavaScript widgets that just got
> merged into master...
>

I just checked out the new widgets...very nice! What is the time frame for
releasing IPython 2.0?

-Doug


>
> Cheers,
>
> Brian
>
> On Mon, Jan 27, 2014 at 9:35 AM, Raymond Yee <raymond.yee at gmail.com>
> wrote:
> > Hi everyone,
> >
> > For the Working with Open Data course I'm currently teaching
> > (http://is.gd/wwod14), I would like to work out with my students a way
> > to generate light-weight maps to be displayed inside of the IPython
> > notebook. Specifically, I would like to generate data to feed to various
> > JavaScript libraries including:
> >
> > * Google geo charts:
> > https://developers.google.com/chart/interactive/docs/gallery/geochart
> > * d3.js (for many uses, for most immediately for a US county choropleth:
> > http://bl.ocks.org/mbostock/4060606
> > * vega via vincent -- e.g.,
> >
> https://vincent.readthedocs.org/en/latest/quickstart.html#map-data-binding
> > * richer JavaScript maps with underlying layers, such as provided by
> > leaflet.js (e.g., http://leafletjs.com/examples/choropleth.html)
> >
> > I've been superficially aware of the rich data display capabilities of
> > the Notebook. And it's great to have some good working details on how to
> > exploit such capabilities in the IPython in Depth tutorial
> > (http://conference.scipy.org/scipy2013/tutorial_detail.php?id=104):
> >
> > * IPython's Rich Display System:
> >
> http://nbviewer.ipython.org/github/ipython/ipython-in-depth/blob/master/notebooks/03%20-%20Rich%20Display%20System.ipynb
> >
> > * Defining Custom Display Logic for Your Own Objects:
> >
> http://nbviewer.ipython.org/github/ipython/ipython-in-depth/blob/master/notebooks/04%20-%20Custom%20Display%20Logic.ipynb
> >
> > The path I've started down the last few days is to:
> >
> > * Get examples of the various JavaScript libraries working in a
> > stand-alone HTML page
> > * Get the example to work in an IPython notebook
> > * Generalize the examples into Python classes to use the display system
> >
> > I've encountered a mix of success and confusion. But I know enough to
> > ask a few questions:
> >
> > * Any pitfalls you've seen around IPython's use of require.js that I
> > should be mindful of?
> >
> > I *think* that I've been running into bad interactions with require.js
> > that I don't yet understand. In one simple case of trying to use d3.js,
> > I found that I couldn't instantiate the d3 JavaScript object. The
> > symptoms I saw are reminiscent of ones reported in stackoverflow -- and
> > to which Matthias had responded to:
> >
> http://stackoverflow.com/questions/19487121/how-can-i-load-raphael-within-ipython-notebook-avoiding-some-issues-that-arise
> >
> >
> > This morning I have a notebook (running IPython 1.1 + vincent 0.4.2)
> > that runs a vincent example well the first time -- but when I reset the
> > kernel and run it the second time (without closing the tab), I encounter
> > the following error:
> >
> > Javascript error adding output! Error {requireType: "mismatch",
> > requireModules: undefined, stack: (...), message: "Mismatched anonymous
> > define() module: [object
> > Object]?http://requirejs.org/docs/errors.html#mismatch"}
> >
> > [I can write this observation up more rigorously if necessary.]
> >
> > * Given that there's a lot of changes happening on the JavaScript
> > integration front, is it still worthwhile following the approaches laid
> > out in the IPython in Depth tutorials around working with the display
> > system and JavaScript? Or should I be patient? (I know I could, for
> > example, focus on generating HTML output to be written out and loaded
> > outside of the notebook to avoid direct integration while things shake
> > out....
> >
> > BTW, in looking up Fernando & Brian's SciPy2013 IPython tutorial, I
> > found Using geospatial data with python
> > (http://conference.scipy.org/scipy2013/tutorial_detail.php?id=110),
> > which I should look at soon!
> >
> > Thanks!
> >
> > -Raymond
> >
> > _______________________________________________
> > 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140128/870d5fd4/attachment.html>

From ellisonbg at gmail.com  Tue Jan 28 22:07:47 2014
From: ellisonbg at gmail.com (Brian Granger)
Date: Tue, 28 Jan 2014 19:07:47 -0800
Subject: [IPython-dev] displaying JavaScript-based maps in Notebook:
	tips?
In-Reply-To: <CAAusYChBsCEjJN1-sTvte4jXFUUa_cWeaAyzRHnWfukrdQ4wDA@mail.gmail.com>
References: <52E698D7.4090102@gmail.com>
	<CAH4pYpQy69EwPv=3x1U9=ipLE=sWsxadMXrBSa4Bvoj_j_+T7g@mail.gmail.com>
	<CAAusYChBsCEjJN1-sTvte4jXFUUa_cWeaAyzRHnWfukrdQ4wDA@mail.gmail.com>
Message-ID: <CAH4pYpSiBTt=AXmwEFXvy=huSVJWOXj2cjikPpnyZxiTNOoAPQ@mail.gmail.com>

Next few weeks.

On Tue, Jan 28, 2014 at 6:48 PM, Doug Blank <doug.blank at gmail.com> wrote:
> On Tue, Jan 28, 2014 at 6:22 PM, Brian Granger <ellisonbg at gmail.com> wrote:
>>
>> Another option would be the new JavaScript widgets that just got
>> merged into master...
>
>
> I just checked out the new widgets...very nice! What is the time frame for
> releasing IPython 2.0?
>
> -Doug
>
>>
>>
>> Cheers,
>>
>> Brian
>>
>> On Mon, Jan 27, 2014 at 9:35 AM, Raymond Yee <raymond.yee at gmail.com>
>> wrote:
>> > Hi everyone,
>> >
>> > For the Working with Open Data course I'm currently teaching
>> > (http://is.gd/wwod14), I would like to work out with my students a way
>> > to generate light-weight maps to be displayed inside of the IPython
>> > notebook. Specifically, I would like to generate data to feed to various
>> > JavaScript libraries including:
>> >
>> > * Google geo charts:
>> > https://developers.google.com/chart/interactive/docs/gallery/geochart
>> > * d3.js (for many uses, for most immediately for a US county choropleth:
>> > http://bl.ocks.org/mbostock/4060606
>> > * vega via vincent -- e.g.,
>> >
>> > https://vincent.readthedocs.org/en/latest/quickstart.html#map-data-binding
>> > * richer JavaScript maps with underlying layers, such as provided by
>> > leaflet.js (e.g., http://leafletjs.com/examples/choropleth.html)
>> >
>> > I've been superficially aware of the rich data display capabilities of
>> > the Notebook. And it's great to have some good working details on how to
>> > exploit such capabilities in the IPython in Depth tutorial
>> > (http://conference.scipy.org/scipy2013/tutorial_detail.php?id=104):
>> >
>> > * IPython's Rich Display System:
>> >
>> > http://nbviewer.ipython.org/github/ipython/ipython-in-depth/blob/master/notebooks/03%20-%20Rich%20Display%20System.ipynb
>> >
>> > * Defining Custom Display Logic for Your Own Objects:
>> >
>> > http://nbviewer.ipython.org/github/ipython/ipython-in-depth/blob/master/notebooks/04%20-%20Custom%20Display%20Logic.ipynb
>> >
>> > The path I've started down the last few days is to:
>> >
>> > * Get examples of the various JavaScript libraries working in a
>> > stand-alone HTML page
>> > * Get the example to work in an IPython notebook
>> > * Generalize the examples into Python classes to use the display system
>> >
>> > I've encountered a mix of success and confusion. But I know enough to
>> > ask a few questions:
>> >
>> > * Any pitfalls you've seen around IPython's use of require.js that I
>> > should be mindful of?
>> >
>> > I *think* that I've been running into bad interactions with require.js
>> > that I don't yet understand. In one simple case of trying to use d3.js,
>> > I found that I couldn't instantiate the d3 JavaScript object. The
>> > symptoms I saw are reminiscent of ones reported in stackoverflow -- and
>> > to which Matthias had responded to:
>> >
>> > http://stackoverflow.com/questions/19487121/how-can-i-load-raphael-within-ipython-notebook-avoiding-some-issues-that-arise
>> >
>> >
>> > This morning I have a notebook (running IPython 1.1 + vincent 0.4.2)
>> > that runs a vincent example well the first time -- but when I reset the
>> > kernel and run it the second time (without closing the tab), I encounter
>> > the following error:
>> >
>> > Javascript error adding output! Error {requireType: "mismatch",
>> > requireModules: undefined, stack: (...), message: "Mismatched anonymous
>> > define() module: [object
>> > Object]?http://requirejs.org/docs/errors.html#mismatch"}
>> >
>> > [I can write this observation up more rigorously if necessary.]
>> >
>> > * Given that there's a lot of changes happening on the JavaScript
>> > integration front, is it still worthwhile following the approaches laid
>> > out in the IPython in Depth tutorials around working with the display
>> > system and JavaScript? Or should I be patient? (I know I could, for
>> > example, focus on generating HTML output to be written out and loaded
>> > outside of the notebook to avoid direct integration while things shake
>> > out....
>> >
>> > BTW, in looking up Fernando & Brian's SciPy2013 IPython tutorial, I
>> > found Using geospatial data with python
>> > (http://conference.scipy.org/scipy2013/tutorial_detail.php?id=110),
>> > which I should look at soon!
>> >
>> > Thanks!
>> >
>> > -Raymond
>> >
>> > _______________________________________________
>> > 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


From gmbecker at ucdavis.edu  Tue Jan 28 23:30:42 2014
From: gmbecker at ucdavis.edu (Gabriel Becker)
Date: Tue, 28 Jan 2014 20:30:42 -0800
Subject: [IPython-dev] Implementing inline images in a kernel
In-Reply-To: <CAH4pYpR+x+YJHop8rtJbU0AKRyo+FvNrnTLWGPxL=ooSNdcEtA@mail.gmail.com>
References: <CAAusYCh057N9udHycA6ovMRUhhxTQi9=oyeEenPxFsN7822HJg@mail.gmail.com>
	<CAH4pYpT+BgP93BFud2FTySe4KT+VWOZN1jx_u43RVJ7zwXco4w@mail.gmail.com>
	<52E861EB.2010701@creativetrax.com>
	<CAH4pYpR2F0AEqvth0XBQY1Ph=yk141a0e9cLJgENvJ4os_NxcA@mail.gmail.com>
	<CAH4pYpR+x+YJHop8rtJbU0AKRyo+FvNrnTLWGPxL=ooSNdcEtA@mail.gmail.com>
Message-ID: <CADwqtCMZJ2-giWAk3hJN+GUoJH=2a88MjJ7TmBPCjSdk8yPovQ@mail.gmail.com>

Is there any reason a kernel (or metakernel if you want to call it
something else) cannot know how to send code to more than one evaluator? It
seems to me that the magics themselves are proof that this could easily be
achieved in (I)Python. It seems like it should be pretty straightforward to
push that dispatch up from the "now evaluate our python code" step into a
new intermediary "check the language and evaluate accordingly" step.

Signalling the language of a particular code cell to the user could be done
with a small icon or other indicator in the page.

I had toyed with the idea of building such a metakernel myself (why build
an R kernel when I could build a kernel for truly multilanguage notebooks)
but I never found the time.

~G


On Tue, Jan 28, 2014 at 6:17 PM, Brian Granger <ellisonbg at gmail.com> wrote:

> Jason, to illustrate:
>
> Id?e int?ressante
>
> ?? ? ?????, ??? ???? ????????? ????????
>
> Ben kullan?c?lar i?in ?ok kafa kar??t?r?c? olaca??n? d???n?yorum
>
> ???????????1????????????????
>
> ???? ???? ??? ???? ???? ????????? ??????? ?? ??????? ?? ????? ???? ???
>
> French, Russian, Turkish, Japanese, Hebrew. Have fun translating :)
>
> On Tue, Jan 28, 2014 at 6:10 PM, Brian Granger <ellisonbg at gmail.com>
> wrote:
> >> What if we supported different kernels on a per-cell basis?  Then it
> >> would be similar to the %% magics.  There could be a number of kernels
> >> associated with a notebook, and the metadata on a cell would tell where
> >> to send the code and get output from?
> >
> > User's heads will already explode with the ability to change kernels
> > on the fly for an entire notebook. Allowing that for individual cells
> > would lead to a further explosion of UI complexity and cognitive load.
> > Obviously, anyone is free to build such a beast, but I can't imagine
> > that ever being within scope for IPython itself.
> >
> > Cheers,
> >
> > Brian
> >
> >> Thanks,
> >>
> >> Jason
> >>
> >> _______________________________________________
> >> 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
>
>
>
> --
> 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
>



-- 
Gabriel Becker
Graduate Student
Statistics Department
University of California, Davis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140128/7f62780c/attachment.html>

From fperez.net at gmail.com  Tue Jan 28 23:41:34 2014
From: fperez.net at gmail.com (Fernando Perez)
Date: Tue, 28 Jan 2014 20:41:34 -0800
Subject: [IPython-dev] Implementing inline images in a kernel
In-Reply-To: <CAAusYCiC=yVXib5iqY3Wr6WC1ZXKZotMM0B=YCFwRgPANvNCng@mail.gmail.com>
References: <CAAusYCh057N9udHycA6ovMRUhhxTQi9=oyeEenPxFsN7822HJg@mail.gmail.com>
	<CAH4pYpT+BgP93BFud2FTySe4KT+VWOZN1jx_u43RVJ7zwXco4w@mail.gmail.com>
	<CAAusYCiC=yVXib5iqY3Wr6WC1ZXKZotMM0B=YCFwRgPANvNCng@mail.gmail.com>
Message-ID: <CAHAreOpZi0eS0c788umYAkfyGK_dLoBQk-C=AHLsKxt-cPo7vw@mail.gmail.com>

On Tue, Jan 28, 2014 at 6:11 PM, Doug Blank <doug.blank at gmail.com> wrote:

> Well, that is probably true in general. But Calico is a very different
> kind of beast. It doesn't run the languages independently in their own
> space... all of the languages run in the same space. They can share data
> and functions and memory, but not by marshaling between systems.


Actually, that's sort of how the %julia magics work: we initialize the
julia interpreter in-process, by dlopen'ing libjulia and then create a
julia interpreter, passing it a pointer to the underlying Python VM.  This
allows the two languages to seamlessly share data structures in-memory.

I'm not saying that you shouldn't  build your own native kernel, as there's
obviously a ton of things that should be done that way (and that's why, in
addition to %julia, there's also a real, native julia kernel as Brian
mentioned).  I just wanted to point out that language %magics in the
IPython kernel aren't limited to working out-of-process.

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140128/25c18ff5/attachment.html>

From tarun.gaba7 at gmail.com  Wed Jan 29 00:27:14 2014
From: tarun.gaba7 at gmail.com (TARUN GABA)
Date: Wed, 29 Jan 2014 10:57:14 +0530
Subject: [IPython-dev] BackgroundJobManager: Killing a background job
Message-ID: <CAHAono0skYYDM9tL9k+N6M0J4HUSw8mfLhzaT0t3RD+3xiUSqg@mail.gmail.com>

Hi,
I am using BackgroundJobManager to run some jobs in background..
I want to kill a particular job, manually, when it exceeds running for more
than a particular interval of time.. Is there any method in
BackgroundJobManager to do that?

One more thing
I have added KeyBoardInterrupt detector in that job(job is a python
function). How can I send keyboard commands to that job(which is in
background).

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140129/2fdc0601/attachment.html>

From doug.blank at gmail.com  Wed Jan 29 02:44:22 2014
From: doug.blank at gmail.com (Doug Blank)
Date: Wed, 29 Jan 2014 02:44:22 -0500
Subject: [IPython-dev] Implementing inline images in a kernel
In-Reply-To: <CAHAreOpZi0eS0c788umYAkfyGK_dLoBQk-C=AHLsKxt-cPo7vw@mail.gmail.com>
References: <CAAusYCh057N9udHycA6ovMRUhhxTQi9=oyeEenPxFsN7822HJg@mail.gmail.com>
	<CAH4pYpT+BgP93BFud2FTySe4KT+VWOZN1jx_u43RVJ7zwXco4w@mail.gmail.com>
	<CAAusYCiC=yVXib5iqY3Wr6WC1ZXKZotMM0B=YCFwRgPANvNCng@mail.gmail.com>
	<CAHAreOpZi0eS0c788umYAkfyGK_dLoBQk-C=AHLsKxt-cPo7vw@mail.gmail.com>
Message-ID: <CAAusYCigtC6YiuNWj3Pc1gv-VgTKVJhArOdoXsSwXD1=b7od6A@mail.gmail.com>

On Tue, Jan 28, 2014 at 11:41 PM, Fernando Perez <fperez.net at gmail.com>wrote:

>
> On Tue, Jan 28, 2014 at 6:11 PM, Doug Blank <doug.blank at gmail.com> wrote:
>
>> Well, that is probably true in general. But Calico is a very different
>> kind of beast. It doesn't run the languages independently in their own
>> space... all of the languages run in the same space. They can share data
>> and functions and memory, but not by marshaling between systems.
>
>
> Actually, that's sort of how the %julia magics work: we initialize the
> julia interpreter in-process, by dlopen'ing libjulia and then create a
> julia interpreter, passing it a pointer to the underlying Python VM.  This
> allows the two languages to seamlessly share data structures in-memory.
>
> I'm not saying that you shouldn't  build your own native kernel, as
> there's obviously a ton of things that should be done that way (and that's
> why, in addition to %julia, there's also a real, native julia kernel as
> Brian mentioned).  I just wanted to point out that language %magics in the
> IPython kernel aren't limited to working out-of-process.
>
>
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...

-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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140129/97b2ab52/attachment.html>

From ellisonbg at gmail.com  Wed Jan 29 03:08:11 2014
From: ellisonbg at gmail.com (Brian Granger)
Date: Wed, 29 Jan 2014 00:08:11 -0800
Subject: [IPython-dev] Implementing inline images in a kernel
In-Reply-To: <CADwqtCMZJ2-giWAk3hJN+GUoJH=2a88MjJ7TmBPCjSdk8yPovQ@mail.gmail.com>
References: <CAAusYCh057N9udHycA6ovMRUhhxTQi9=oyeEenPxFsN7822HJg@mail.gmail.com>
	<CAH4pYpT+BgP93BFud2FTySe4KT+VWOZN1jx_u43RVJ7zwXco4w@mail.gmail.com>
	<52E861EB.2010701@creativetrax.com>
	<CAH4pYpR2F0AEqvth0XBQY1Ph=yk141a0e9cLJgENvJ4os_NxcA@mail.gmail.com>
	<CAH4pYpR+x+YJHop8rtJbU0AKRyo+FvNrnTLWGPxL=ooSNdcEtA@mail.gmail.com>
	<CADwqtCMZJ2-giWAk3hJN+GUoJH=2a88MjJ7TmBPCjSdk8yPovQ@mail.gmail.com>
Message-ID: <CAH4pYpQz2iEN3u8LJAv5fFyFZvQPXN5YQJXEpU_bTqwJbv7Sjg@mail.gmail.com>

On Tue, Jan 28, 2014 at 8:30 PM, Gabriel Becker <gmbecker at ucdavis.edu> wrote:
> Is there any reason a kernel (or metakernel if you want to call it something
> else) cannot know how to send code to more than one evaluator? It seems to
> me that the magics themselves are proof that this could easily be achieved
> in (I)Python. It seems like it should be pretty straightforward to push that
> dispatch up from the "now evaluate our python code" step into a new
> intermediary "check the language and evaluate accordingly" step.

With a little bit of thinking...

To do a sucky job it wouldn't be hard. Do just as you say, make
everything work through an in process blocking API passing simple data
structures from the evaluators to the "routing kernel"

To do a good job and have everything (tab completion, tooltips, async
output, widgets, etc.) work is extremely difficult and would require
very careful asynchronous routing logic using all of our zeromq
sockets from the backend "evaluators" to the main "routing kernel".
Not to mention that if all of these evaluators are running in process,
they will actively block one another. What happens if your user tab
completely in a logo cell while a VisualBasic one is running? How do
you route that? What happens if your user drags a slider in a Java
backed IPython Widget? How do you route that? What if the entire
backend is blocked by code running in another evaluator? What if some
of these objects are shared in different evaluators? Which one gets to
handle output at any given moment in time?

People tend of think of the messaging in IPython as being simple
request/reply. Browser sends code to the kernel, kernel replies with
output. Nothing can be further from that. Message can be sent
bidirectionally at any moment in time by either party. The
widgets/comm stuff use that all over the place.

Summary: if you are going to want a kernel with all the features that
IPython offers (not just blocking code execution) don't try to build
this type of "routing kernel" - build kernels that run code in one
language.

> Signalling the language of a particular code cell to the user could be done
> with a small icon or other indicator in the page.

Yes, that is perhaps the only trivial part...

Cheers,

Brian

> I had toyed with the idea of building such a metakernel myself (why build an
> R kernel when I could build a kernel for truly multilanguage notebooks) but
> I never found the time.
>
> ~G
>
>
> On Tue, Jan 28, 2014 at 6:17 PM, Brian Granger <ellisonbg at gmail.com> wrote:
>>
>> Jason, to illustrate:
>>
>> Id?e int?ressante
>>
>> ?? ? ?????, ??? ???? ????????? ????????
>>
>> Ben kullan?c?lar i?in ?ok kafa kar??t?r?c? olaca??n? d???n?yorum
>>
>> ???????????1????????????????
>>
>> ???? ???? ??? ???? ???? ????????? ??????? ?? ??????? ?? ????? ???? ???
>>
>> French, Russian, Turkish, Japanese, Hebrew. Have fun translating :)
>>
>> On Tue, Jan 28, 2014 at 6:10 PM, Brian Granger <ellisonbg at gmail.com>
>> wrote:
>> >> What if we supported different kernels on a per-cell basis?  Then it
>> >> would be similar to the %% magics.  There could be a number of kernels
>> >> associated with a notebook, and the metadata on a cell would tell where
>> >> to send the code and get output from?
>> >
>> > User's heads will already explode with the ability to change kernels
>> > on the fly for an entire notebook. Allowing that for individual cells
>> > would lead to a further explosion of UI complexity and cognitive load.
>> > Obviously, anyone is free to build such a beast, but I can't imagine
>> > that ever being within scope for IPython itself.
>> >
>> > Cheers,
>> >
>> > Brian
>> >
>> >> Thanks,
>> >>
>> >> Jason
>> >>
>> >> _______________________________________________
>> >> 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
>>
>>
>>
>> --
>> 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
>
>
>
>
> --
> Gabriel Becker
> Graduate Student
> Statistics Department
> University of California, Davis
>
> _______________________________________________
> 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


From doug.blank at gmail.com  Wed Jan 29 03:09:08 2014
From: doug.blank at gmail.com (Doug Blank)
Date: Wed, 29 Jan 2014 03:09:08 -0500
Subject: [IPython-dev] Implementing inline images in a kernel
In-Reply-To: <CAAusYCigtC6YiuNWj3Pc1gv-VgTKVJhArOdoXsSwXD1=b7od6A@mail.gmail.com>
References: <CAAusYCh057N9udHycA6ovMRUhhxTQi9=oyeEenPxFsN7822HJg@mail.gmail.com>
	<CAH4pYpT+BgP93BFud2FTySe4KT+VWOZN1jx_u43RVJ7zwXco4w@mail.gmail.com>
	<CAAusYCiC=yVXib5iqY3Wr6WC1ZXKZotMM0B=YCFwRgPANvNCng@mail.gmail.com>
	<CAHAreOpZi0eS0c788umYAkfyGK_dLoBQk-C=AHLsKxt-cPo7vw@mail.gmail.com>
	<CAAusYCigtC6YiuNWj3Pc1gv-VgTKVJhArOdoXsSwXD1=b7od6A@mail.gmail.com>
Message-ID: <CAAusYCi3brHtx223E8G1d953tH2GMeqUmAAd7pVnTsu35d3FgA@mail.gmail.com>

Here is a nice demo reimagined in Python by colleague Keith O'Hara
demonstrating the physics of plucking a guitar string:

http://nbviewer.ipython.org/urls/bitbucket.org/ipre/calico/raw/master/notebooks/Plucking%20a%20Guitar%20String.ipynb

Change calico.Audio() to the appropriate IPython code, and it should work
there as well.

BTW, how does IPython get the last expression in a set of statements to be
the return value? It can't be an eval(), because it can't handle
statements, and it can't be exec() because it doesn't get the return
value... the only thing it could be would be to parse the statements, and
eval/exec each one?

-Doug


On Wed, Jan 29, 2014 at 2:44 AM, Doug Blank <doug.blank at gmail.com> wrote:

> On Tue, Jan 28, 2014 at 11:41 PM, Fernando Perez <fperez.net at gmail.com>wrote:
>
>>
>> On Tue, Jan 28, 2014 at 6:11 PM, Doug Blank <doug.blank at gmail.com> wrote:
>>
>>> Well, that is probably true in general. But Calico is a very different
>>> kind of beast. It doesn't run the languages independently in their own
>>> space... all of the languages run in the same space. They can share data
>>> and functions and memory, but not by marshaling between systems.
>>
>>
>> Actually, that's sort of how the %julia magics work: we initialize the
>> julia interpreter in-process, by dlopen'ing libjulia and then create a
>> julia interpreter, passing it a pointer to the underlying Python VM.  This
>> allows the two languages to seamlessly share data structures in-memory.
>>
>> I'm not saying that you shouldn't  build your own native kernel, as
>> there's obviously a ton of things that should be done that way (and that's
>> why, in addition to %julia, there's also a real, native julia kernel as
>> Brian mentioned).  I just wanted to point out that language %magics in the
>> IPython kernel aren't limited to working out-of-process.
>>
>>
> 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...
>
> -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
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140129/125b9a7c/attachment.html>

From ellisonbg at gmail.com  Wed Jan 29 03:10:12 2014
From: ellisonbg at gmail.com (Brian Granger)
Date: Wed, 29 Jan 2014 00:10:12 -0800
Subject: [IPython-dev] Implementing inline images in a kernel
In-Reply-To: <CAAusYCigtC6YiuNWj3Pc1gv-VgTKVJhArOdoXsSwXD1=b7od6A@mail.gmail.com>
References: <CAAusYCh057N9udHycA6ovMRUhhxTQi9=oyeEenPxFsN7822HJg@mail.gmail.com>
	<CAH4pYpT+BgP93BFud2FTySe4KT+VWOZN1jx_u43RVJ7zwXco4w@mail.gmail.com>
	<CAAusYCiC=yVXib5iqY3Wr6WC1ZXKZotMM0B=YCFwRgPANvNCng@mail.gmail.com>
	<CAHAreOpZi0eS0c788umYAkfyGK_dLoBQk-C=AHLsKxt-cPo7vw@mail.gmail.com>
	<CAAusYCigtC6YiuNWj3Pc1gv-VgTKVJhArOdoXsSwXD1=b7od6A@mail.gmail.com>
Message-ID: <CAH4pYpR_ZFcSJXeQFKwSts=EMwNUuZkg1HJvtOQq69C=k2dh8Q@mail.gmail.com>

> 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.



> -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


From doug.blank at gmail.com  Wed Jan 29 03:14:08 2014
From: doug.blank at gmail.com (Doug Blank)
Date: Wed, 29 Jan 2014 03:14:08 -0500
Subject: [IPython-dev] Implementing inline images in a kernel
In-Reply-To: <CAH4pYpR_ZFcSJXeQFKwSts=EMwNUuZkg1HJvtOQq69C=k2dh8Q@mail.gmail.com>
References: <CAAusYCh057N9udHycA6ovMRUhhxTQi9=oyeEenPxFsN7822HJg@mail.gmail.com>
	<CAH4pYpT+BgP93BFud2FTySe4KT+VWOZN1jx_u43RVJ7zwXco4w@mail.gmail.com>
	<CAAusYCiC=yVXib5iqY3Wr6WC1ZXKZotMM0B=YCFwRgPANvNCng@mail.gmail.com>
	<CAHAreOpZi0eS0c788umYAkfyGK_dLoBQk-C=AHLsKxt-cPo7vw@mail.gmail.com>
	<CAAusYCigtC6YiuNWj3Pc1gv-VgTKVJhArOdoXsSwXD1=b7od6A@mail.gmail.com>
	<CAH4pYpR_ZFcSJXeQFKwSts=EMwNUuZkg1HJvtOQq69C=k2dh8Q@mail.gmail.com>
Message-ID: <CAAusYCiUm75U4KZH=0gfoR5AdCRgCUG+fu2nTHzsZwkGg9XSUg@mail.gmail.com>

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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140129/8b25976d/attachment.html>

From ellisonbg at gmail.com  Wed Jan 29 03:26:05 2014
From: ellisonbg at gmail.com (Brian Granger)
Date: Wed, 29 Jan 2014 00:26:05 -0800
Subject: [IPython-dev] Implementing inline images in a kernel
In-Reply-To: <CAAusYCiUm75U4KZH=0gfoR5AdCRgCUG+fu2nTHzsZwkGg9XSUg@mail.gmail.com>
References: <CAAusYCh057N9udHycA6ovMRUhhxTQi9=oyeEenPxFsN7822HJg@mail.gmail.com>
	<CAH4pYpT+BgP93BFud2FTySe4KT+VWOZN1jx_u43RVJ7zwXco4w@mail.gmail.com>
	<CAAusYCiC=yVXib5iqY3Wr6WC1ZXKZotMM0B=YCFwRgPANvNCng@mail.gmail.com>
	<CAHAreOpZi0eS0c788umYAkfyGK_dLoBQk-C=AHLsKxt-cPo7vw@mail.gmail.com>
	<CAAusYCigtC6YiuNWj3Pc1gv-VgTKVJhArOdoXsSwXD1=b7od6A@mail.gmail.com>
	<CAH4pYpR_ZFcSJXeQFKwSts=EMwNUuZkg1HJvtOQq69C=k2dh8Q@mail.gmail.com>
	<CAAusYCiUm75U4KZH=0gfoR5AdCRgCUG+fu2nTHzsZwkGg9XSUg@mail.gmail.com>
Message-ID: <CAH4pYpSc_MrGZ=ZDqLohKubJE2NPekLVojOegg5_W94Q6UM8YQ@mail.gmail.com>

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


From gmbecker at ucdavis.edu  Wed Jan 29 04:50:48 2014
From: gmbecker at ucdavis.edu (Gabriel Becker)
Date: Wed, 29 Jan 2014 01:50:48 -0800
Subject: [IPython-dev] Implementing inline images in a kernel
In-Reply-To: <CAH4pYpQz2iEN3u8LJAv5fFyFZvQPXN5YQJXEpU_bTqwJbv7Sjg@mail.gmail.com>
References: <CAAusYCh057N9udHycA6ovMRUhhxTQi9=oyeEenPxFsN7822HJg@mail.gmail.com>
	<CAH4pYpT+BgP93BFud2FTySe4KT+VWOZN1jx_u43RVJ7zwXco4w@mail.gmail.com>
	<52E861EB.2010701@creativetrax.com>
	<CAH4pYpR2F0AEqvth0XBQY1Ph=yk141a0e9cLJgENvJ4os_NxcA@mail.gmail.com>
	<CAH4pYpR+x+YJHop8rtJbU0AKRyo+FvNrnTLWGPxL=ooSNdcEtA@mail.gmail.com>
	<CADwqtCMZJ2-giWAk3hJN+GUoJH=2a88MjJ7TmBPCjSdk8yPovQ@mail.gmail.com>
	<CAH4pYpQz2iEN3u8LJAv5fFyFZvQPXN5YQJXEpU_bTqwJbv7Sjg@mail.gmail.com>
Message-ID: <CADwqtCOJTrFV1jU9zrdBTHbajGo_zEtTP+cyOrPPcTKnp+uM=A@mail.gmail.com>

Brian,

Apologies if anything I say below is no logner true. I'm in the process of
porting the modified version I use to the latest release, but I haven't
finished yet so I'm lagging a bit behind.

On Wed, Jan 29, 2014 at 12:08 AM, Brian Granger <ellisonbg at gmail.com> wrote:

> On Tue, Jan 28, 2014 at 8:30 PM, Gabriel Becker <gmbecker at ucdavis.edu>
> wrote:
> > Is there any reason a kernel (or metakernel if you want to call it
> something
> > else) cannot know how to send code to more than one evaluator? It seems
> to
> > me that the magics themselves are proof that this could easily be
> achieved
> > in (I)Python. It seems like it should be pretty straightforward to push
> that
> > dispatch up from the "now evaluate our python code" step into a new
> > intermediary "check the language and evaluate accordingly" step.
>
> With a little bit of thinking...
>
> To do a sucky job it wouldn't be hard. Do just as you say, make
> everything work through an in process blocking API passing simple data
> structures from the evaluators to the "routing kernel"
>

I'm not surprised it is more complicated to do something right than just
take the naive approach :)


>
> To do a good job and have everything (tab completion, tooltips, async
> output, widgets, etc.) work is extremely difficult and would require
> very careful asynchronous routing logic using all of our zeromq
> sockets from the backend "evaluators" to the main "routing kernel".
>

At least some, if not all, of things already don't work with the full cell
magics (at least not the %%R magic on my machine). I know that for some of
the issues (tab completion, tooltips) that is because technically it is
python code, but in some sense that is the whole issue.


> Not to mention that if all of these evaluators are running in process,
> they will actively block one another. What happens if your user tab
> completely in a logo cell while a VisualBasic one is running?


As above, the magics (or at least the R one) already blocks tab completion
from other cells while running.


> How do
> you route that? What happens if your user drags a slider in a Java
> backed IPython Widget? How do you route that? What if the entire
> backend is blocked by code running in another evaluator? What if some
> of these objects are shared in different evaluators? Which one gets to
> handle output at any given moment in time?
>

I admit that I don't know too much about the workings widget stuff. It
seems very cool, but we've chatted previously about why its conceptual
model doesn't meet my needs so I haven't delved into it too deeply (also
i'm extremely busy and have been for a while).



>
> People tend of think of the messaging in IPython as being simple
> request/reply. Browser sends code to the kernel, kernel replies with
> output. Nothing can be further from that. Message can be sent
> bidirectionally at any moment in time by either party. The
> widgets/comm stuff use that all over the place.
>
> Summary: if you are going to want a kernel with all the features that
> IPython offers (not just blocking code execution) don't try to build
> this type of "routing kernel" - build kernels that run code in one
> language.
>

I guess the issue is probably that because I use (a modified version of)
IPython Notebook for R analyses, I've been using it without all this
"extra" stuff the whole time. Maybe when I find a handful of hours
somewhere (Ha!) I'll put together an R kernel and see what the fuss is
about.

Anyway, thanks for the detailed response to my naive musings.

~G


>
> > Signalling the language of a particular code cell to the user could be
> done
> > with a small icon or other indicator in the page.
>
> Yes, that is perhaps the only trivial part...
>
> Cheers,
>
> Brian
>
> > I had toyed with the idea of building such a metakernel myself (why
> build an
> > R kernel when I could build a kernel for truly multilanguage notebooks)
> but
> > I never found the time.
> >
> > ~G
> >
> >
> > On Tue, Jan 28, 2014 at 6:17 PM, Brian Granger <ellisonbg at gmail.com>
> wrote:
> >>
> >> Jason, to illustrate:
> >>
> >> Id?e int?ressante
> >>
> >> ?? ? ?????, ??? ???? ????????? ????????
> >>
> >> Ben kullan?c?lar i?in ?ok kafa kar??t?r?c? olaca??n? d???n?yorum
> >>
> >> ???????????1????????????????
> >>
> >> ???? ???? ??? ???? ???? ????????? ??????? ?? ??????? ?? ????? ???? ???
> >>
> >> French, Russian, Turkish, Japanese, Hebrew. Have fun translating :)
> >>
> >> On Tue, Jan 28, 2014 at 6:10 PM, Brian Granger <ellisonbg at gmail.com>
> >> wrote:
> >> >> What if we supported different kernels on a per-cell basis?  Then it
> >> >> would be similar to the %% magics.  There could be a number of
> kernels
> >> >> associated with a notebook, and the metadata on a cell would tell
> where
> >> >> to send the code and get output from?
> >> >
> >> > User's heads will already explode with the ability to change kernels
> >> > on the fly for an entire notebook. Allowing that for individual cells
> >> > would lead to a further explosion of UI complexity and cognitive load.
> >> > Obviously, anyone is free to build such a beast, but I can't imagine
> >> > that ever being within scope for IPython itself.
> >> >
> >> > Cheers,
> >> >
> >> > Brian
> >> >
> >> >> Thanks,
> >> >>
> >> >> Jason
> >> >>
> >> >> _______________________________________________
> >> >> 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
> >>
> >>
> >>
> >> --
> >> 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
> >
> >
> >
> >
> > --
> > Gabriel Becker
> > Graduate Student
> > Statistics Department
> > University of California, Davis
> >
> > _______________________________________________
> > 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
>



-- 
Gabriel Becker
Graduate Student
Statistics Department
University of California, Davis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140129/d3bc0c49/attachment.html>

From konrad.hinsen at fastmail.net  Wed Jan 29 05:32:30 2014
From: konrad.hinsen at fastmail.net (Konrad Hinsen)
Date: Wed, 29 Jan 2014 11:32:30 +0100
Subject: [IPython-dev] NotebookManager API
In-Reply-To: <21223.57186.41921.714779@wifi-172-30-24-78.wifi.univ-paris5.fr>
References: <21223.51550.920715.143837@wifi-172-30-24-78.wifi.univ-paris5.fr>
	<BE6EFD37-9001-4EED-804E-E56265DE4F50@gmail.com>
	<21223.57186.41921.714779@wifi-172-30-24-78.wifi.univ-paris5.fr>
Message-ID: <21224.55486.190896.120720@Ordinateur-de-Catherine-Konrad.local>

Konrad Hinsen writes:

 > But this gives me an idea: in the spirit of your simple_kernel, I will
 > prepare a simple_notebook_manager module, which stores notebooks in
 > Python data structures in memory.

Here is a first cut:

  http://github.com/khinsen/simple_notebook_manager

It permits creating new notebooks. Saving doesn't work yet, because
the checkpointing methods are not implemented yet. Evaluating expressions
doesn't work either, for reasons that I haven't explored yet.

I have created an issue in which I document features of the NotebookManager
API and its current implementation in IPython that I find surprising
or worth noting:

  http://github.com/khinsen/simple_notebook_manager/issues/1

Comments are welcome!

Konrad.


From ocefpaf at gmail.com  Wed Jan 29 05:27:34 2014
From: ocefpaf at gmail.com (Filipe Pires Alvarenga Fernandes)
Date: Wed, 29 Jan 2014 08:27:34 -0200
Subject: [IPython-dev] Spell check with the new modal input?
In-Reply-To: <CAH+mRR0SHuiCwFbfAQzE5T4X-sP7N6Kvq_88w0T5D8rMT745HQ@mail.gmail.com>
References: <53526623b13a4351be72dfd44d5fdb4a@BLUPR01MB306.prod.exchangelabs.com>
	<CAH+mRR1mN0urSV8XBxd872d9brC4PqOvES7BVz3Cr2Nhv6vOXg@mail.gmail.com>
	<CAKgW=6+FR729BSVQn5ob6xv=1pW6QG-n4w=3P9QcQqhPxwq8bw@mail.gmail.com>
	<CAH4pYpT8uCsGBvQ+fGEC405d52K0jprZbCyChxNxUmikXZ2iyQ@mail.gmail.com>
	<CAH+mRR0SHuiCwFbfAQzE5T4X-sP7N6Kvq_88w0T5D8rMT745HQ@mail.gmail.com>
Message-ID: <CAH2VmmD4dgRDGs81S6sZyG2OS8PWjkrmGv2XAxzrazRHSZrHCQ@mail.gmail.com>

Hi Dami?n,

Nice extension!  Did not know about it.  I was using firefox+"It's all
text" before to open the text cells into a text editor.

Thanks,

-Filipe


On Tue, Jan 28, 2014 at 11:25 PM, Dami?n Avila <damianavila at gmail.com>wrote:

> The problems comes from the codemirror instance itself... in fact there is
> no a "common" text area, so... your browser do not know how to spellcheck
> something that did not exist as a text area (although it looks like one).
> It is no so difficult to do find an "optimal" solution with codemirror
> layouts, but you need to know how to apply it, and you will also need a js
> library which perform the spellcheck... so, because I wanted something
> useful very quickly, I developed the extension I linked before... It is not
> the best solution, I know, but I can spell check now  (in a "poor man" way
> ;-))
>
>
> 2014-01-28 Brian Granger <ellisonbg at gmail.com>
>
>  The new modal UI was a very targeted effort to fix/improve one part of
>> the experience. Definitely not related to spellchecking in any way.
>> Sorry.
>>
>> Brian
>>
>> On Tue, Jan 28, 2014 at 4:59 PM, Aaron Meurer <asmeurer at gmail.com> wrote:
>> > Hmm, I was hoping the new UI would have fixed this. I tend to avoid
>> > the notebook because of this.
>> >
>> > Aaron Meurer
>> >
>> > On Tue, Jan 28, 2014 at 2:05 PM, Dami?n Avila <damianavila at gmail.com>
>> wrote:
>> >> There is no easy way to spellcheck codemirror instances, well... there
>> is a
>> >> way using a codemirror layout... but you have to deal with it...
>> >>
>> >> As a workaround, I develop an nbextension to spellcheck your cell
>> content.
>> >> You have the details here:
>> >>
>> http://www.damian.oquanta.info/posts/a-poor-man-spell-checker-for-the-ipython-notebook.html
>> >>
>> >> Hope it helps!
>> >>
>> >>
>> >> 2014-01-28 Toby Burnett <tburnett at myuw.net>
>> >>>
>> >>> I'm happily using the new modal input in 2.0-dev, very nice,
>> especially as
>> >>> my fingers get trained. J
>> >>>
>> >>> But I'm used to writing text with spell check, and wondered if there
>> was a
>> >>> way to get that. Chrome will do it, but only in a "text field" and a
>> >>> markdown cell does not count, I guess.
>> >>>
>> >>>
>> >>>
>> >>> --Toby Burnett
>> >>>
>> >>>
>> >>> _______________________________________________
>> >>> IPython-dev mailing list
>> >>> IPython-dev at scipy.org
>> >>> http://mail.scipy.org/mailman/listinfo/ipython-dev
>> >>>
>> >>
>> >>
>> >>
>> >> --
>> >> Dami?n Avila
>> >> Scientific Python Developer
>> >> Quantitative Finance Analyst
>> >> Statistics, Biostatistics and Econometrics Consultant
>> >> Biochemist
>> >>
>> >> _______________________________________________
>> >> 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
>>
>
>
>
> --
> Dami?n Avila
> Scientific Python Developer
> Quantitative Finance Analyst
> Statistics, Biostatistics and Econometrics Consultant
> Biochemist
>
> _______________________________________________
> 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/20140129/356dd28d/attachment.html>

From konrad.hinsen at fastmail.net  Wed Jan 29 05:40:15 2014
From: konrad.hinsen at fastmail.net (Konrad Hinsen)
Date: Wed, 29 Jan 2014 11:40:15 +0100
Subject: [IPython-dev] NotebookManager API
In-Reply-To: <CAH4pYpTjUoo2OifTWbTOm=FEHaYk7DN8F9m8F79tTO6ZGNwd0A@mail.gmail.com>
References: <21223.51550.920715.143837@wifi-172-30-24-78.wifi.univ-paris5.fr>
	<CAH4pYpTjUoo2OifTWbTOm=FEHaYk7DN8F9m8F79tTO6ZGNwd0A@mail.gmail.com>
Message-ID: <21224.55951.208481.908216@Ordinateur-de-Catherine-Konrad.local>

Brian,

Thanks for your comments, which were very helpful for me. In particular the
pointer to IPEP 16 - I didn't even know about IPEPs.

 > While the backend doesn't need to be a filesystem, it does need to
 > have the same abstractions:
 > 
 > * /paths/like/this
 > * filesname
 > * filename extensions

That's fine, but it would be nice to have the exact properties of the
abstractions written down somewhere. Imitating basic filesystem
abstractions is always doable, but I wouldn't like to implement a
complete POSIX layer just to make sure I am not missing anything.

Currently the NotebookManager base class uses functions from os.path
to work on its own abstractions for paths and names. Considering that
os.path is platform-dependent, this looks like a strange approach.

 > We don't have anything on NotebookManager per-se, but the above IPEP
 > will describe things from a conceptual perspective and how all it maps
 > onto URLs.

That's indeed quite useful. What's still missing is a clear statement
about notebook names: do they include the extension .ipynb or not?
My overall conclusion is "yes", but this isn't written down anywhere
unambiguously, and there is code in NotebookManager that doesn't
respect this rule (at least increment_filename()).

I am collecting all my observations of this kind on a GitHub issue:

  http://github.com/khinsen/simple_notebook_manager/issues/1

Comments from you and the other core developers are more than welcome!

Konrad.


From konrad.hinsen at fastmail.net  Wed Jan 29 05:43:43 2014
From: konrad.hinsen at fastmail.net (Konrad Hinsen)
Date: Wed, 29 Jan 2014 11:43:43 +0100
Subject: [IPython-dev] Debugging a NotebookManager
In-Reply-To: <CA+n9Yfrio1kcrB6ZPsf_MR2cVLpX4qGUnA_2DUK3_686zpx+dQ@mail.gmail.com>
References: <21223.29725.397615.208409@wifi-172-30-24-78.wifi.univ-paris5.fr>
	<CA+n9Yfrio1kcrB6ZPsf_MR2cVLpX4qGUnA_2DUK3_686zpx+dQ@mail.gmail.com>
Message-ID: <21224.56159.305064.415603@Ordinateur-de-Catherine-Konrad.local>

Stephen Chan writes:

 > With the 1.x NotebookManager, I am able to bring up the IPython command line, load my
 > custom notebook manager and use ipdb to step through API calls. Is it any different in
 > the 2.0 nbmanager?

Perhaps not. What I tried until now (with no success) is to get an
access to post-mortem debugging the NotebookManager methods called
through callbacks from tornado. Maybe that's not the right approach.

Konrad.


From doug.blank at gmail.com  Wed Jan 29 07:40:56 2014
From: doug.blank at gmail.com (Doug Blank)
Date: Wed, 29 Jan 2014 07:40:56 -0500
Subject: [IPython-dev] Implementing inline images in a kernel
In-Reply-To: <CAH4pYpSc_MrGZ=ZDqLohKubJE2NPekLVojOegg5_W94Q6UM8YQ@mail.gmail.com>
References: <CAAusYCh057N9udHycA6ovMRUhhxTQi9=oyeEenPxFsN7822HJg@mail.gmail.com>
	<CAH4pYpT+BgP93BFud2FTySe4KT+VWOZN1jx_u43RVJ7zwXco4w@mail.gmail.com>
	<CAAusYCiC=yVXib5iqY3Wr6WC1ZXKZotMM0B=YCFwRgPANvNCng@mail.gmail.com>
	<CAHAreOpZi0eS0c788umYAkfyGK_dLoBQk-C=AHLsKxt-cPo7vw@mail.gmail.com>
	<CAAusYCigtC6YiuNWj3Pc1gv-VgTKVJhArOdoXsSwXD1=b7od6A@mail.gmail.com>
	<CAH4pYpR_ZFcSJXeQFKwSts=EMwNUuZkg1HJvtOQq69C=k2dh8Q@mail.gmail.com>
	<CAAusYCiUm75U4KZH=0gfoR5AdCRgCUG+fu2nTHzsZwkGg9XSUg@mail.gmail.com>
	<CAH4pYpSc_MrGZ=ZDqLohKubJE2NPekLVojOegg5_W94Q6UM8YQ@mail.gmail.com>
Message-ID: <CAAusYCiPeBMLtRPh6nivtWii1nFUV_DuBs_NyY0RKkJQ0MM3FQ@mail.gmail.com>

On Wed, Jan 29, 2014 at 3:26 AM, Brian Granger <ellisonbg at gmail.com> wrote:
> 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.

Calico interpreting whatever language shows the output intermittently
over the course of the 10 seconds, just like IPython running the
Python kernel. Calico doesn't "talk" to a Python backend... Calico
*is* Python, in a sense. And it is also Basic, Logo, etc. There isn't
one primary language talking to the others---there is just the thin
socket kernel talking to a specific language's eval function. But the
eval occurs in the "same space". Lower level calls to functions like
print() in the interpreted language's eval() inject messages to the
iopub stream. Even our Java works this way.

This is why I find some of the assumptions stated
confusing---insisting that "one language/one kernel" is the future
apparently misses some possibilities in design :) It may be that we
made unique design decisions. In any event, it appears that Calico
running scripts is very different in a fundamental way that IPython's
Python running the integrated Julia.

I wonder what the best technical way to describe this difference is? I
guess that you had assumed some type of blocking behavior. Perhaps I
need a better way of describing how Calico operates. My question to
you is why does %julia block?

-Doug

> 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
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev


From doug.blank at gmail.com  Wed Jan 29 07:55:31 2014
From: doug.blank at gmail.com (Doug Blank)
Date: Wed, 29 Jan 2014 07:55:31 -0500
Subject: [IPython-dev] NotebookManager API
In-Reply-To: <21224.55951.208481.908216@Ordinateur-de-Catherine-Konrad.local>
References: <21223.51550.920715.143837@wifi-172-30-24-78.wifi.univ-paris5.fr>
	<CAH4pYpTjUoo2OifTWbTOm=FEHaYk7DN8F9m8F79tTO6ZGNwd0A@mail.gmail.com>
	<21224.55951.208481.908216@Ordinateur-de-Catherine-Konrad.local>
Message-ID: <CAAusYCg+Tge95bQdMtZ2_HPQevUaXQT1Hnt-UAgavj_aEHLhnA@mail.gmail.com>

On Wed, Jan 29, 2014 at 5:40 AM, Konrad Hinsen
<konrad.hinsen at fastmail.net> wrote:
> Brian,
>
> Thanks for your comments, which were very helpful for me. In particular the
> pointer to IPEP 16 - I didn't even know about IPEPs.

I hadn't seen this either. Thanks, Konrad, for making and sharing this
exploration!

>  > While the backend doesn't need to be a filesystem, it does need to
>  > have the same abstractions:
>  >
>  > * /paths/like/this
>  > * filesname
>  > * filename extensions
>
> That's fine, but it would be nice to have the exact properties of the
> abstractions written down somewhere. Imitating basic filesystem
> abstractions is always doable, but I wouldn't like to implement a
> complete POSIX layer just to make sure I am not missing anything.
>
> Currently the NotebookManager base class uses functions from os.path
> to work on its own abstractions for paths and names. Considering that
> os.path is platform-dependent, this looks like a strange approach.
>
>  > We don't have anything on NotebookManager per-se, but the above IPEP
>  > will describe things from a conceptual perspective and how all it maps
>  > onto URLs.
>
> That's indeed quite useful. What's still missing is a clear statement
> about notebook names: do they include the extension .ipynb or not?
> My overall conclusion is "yes", but this isn't written down anywhere
> unambiguously, and there is code in NotebookManager that doesn't
> respect this rule (at least increment_filename()).
>
> I am collecting all my observations of this kind on a GitHub issue:
>
>   http://github.com/khinsen/simple_notebook_manager/issues/1

Great idea; I will try to do the same. These types of
re-representations (especially in different languages) reveal a host
of assumptions. For example, I found my C# implementation of iso dates
had one too many decimal digits, and caused the Python interpreter to
crash.  I would especially like to see concrete examples of messages
in the documentation. If nothing else, it will make more obvious what
needs to be explained in the text.

(I don't want to sound too critical... I love the IPython system! But
there are certain places that can be improved, and I'm willing to
help. I do hope that a core developer will at some point examine your
simple manager (and the simple kernel) to give feedback about invalid
assumptions, or suggestions to make it better.)

Thanks again,

-Doug

> Comments from you and the other core developers are more than welcome!
>
> Konrad.
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev


From patrickfuller at gmail.com  Wed Jan 29 08:56:58 2014
From: patrickfuller at gmail.com (Patrick Fuller)
Date: Wed, 29 Jan 2014 07:56:58 -0600
Subject: [IPython-dev] Parallel computing segfault behavior
In-Reply-To: <CAHNn8BU2xR5CR1ZUhFXEEdDbqPwQNYv_B0smbuO-UZz4p2C4UA@mail.gmail.com>
References: <CA+LJwtth-wxcDtW3D7-vMozLfsGDX1ueNCVFnGokBM7RNnrLYg@mail.gmail.com>
	<CAHNn8BWf+BQevtzEE-nBXoFYX2HsxoQB0Yu+yfX8g4r6wx8kpQ@mail.gmail.com>
	<CA+LJwtuu5Gqgy_xsKzjo_+3==yz_-Wrw9FqHsfwc=tKsqD1O1Q@mail.gmail.com>
	<CA+LJwtsRi5j94VDF7o9uyxM1oHkBz2w+VJ-cw78v-y3xQZaR4g@mail.gmail.com>
	<CAHNn8BU2xR5CR1ZUhFXEEdDbqPwQNYv_B0smbuO-UZz4p2C4UA@mail.gmail.com>
Message-ID: <CA+LJwttDmBtH0eb+vXa5Bs2x5BCCMGOMBQsZEhUGb5CLbW=Gcw@mail.gmail.com>

Thanks for that code! It's good to know that the remaining cores are still
working and that the results are all recoverable.

One last question: each segfault offlines an engine, which means that the
cluster slows down and eventually crashes as the number of segfaults
approaches the number of ipengines. Should the controller instead start new
engines to take the place of killed ones?

Thanks,
Pat

On Tuesday, January 28, 2014, MinRK <benjaminrk at gmail.com> wrote:

>
>
> On Tue, Jan 28, 2014 at 5:04 PM, Patrick Fuller <patrickfuller at gmail.com<javascript:_e({}, 'cvml', 'patrickfuller at gmail.com');>
> > wrote:
>
>> ...the difference being that this would require starting a new engine on
>> each segfault
>>
>>
>> On Tuesday, January 28, 2014, Patrick Fuller <patrickfuller at gmail.com<javascript:_e({}, 'cvml', 'patrickfuller at gmail.com');>>
>> wrote:
>>
>>> I guess my question is more along the lines of: should the cluster
>>> continue on to complete the queued jobs (as it would if the segfaults were
>>> instead python exceptions)?
>>
>>
> I see what you mean - the generator halts when it sees an exception, so
> it's inconvenient to get the successes, while ignoring the failures. I
> guess we could add separate methods that only iterate through just the
> successful results.
>
> As far as task submission goes, it does indeed do what you seem to expect,
> so it's just viewing the results where there is an issue.
>
> Here is an example <http://nbviewer.ipython.org/gist/minrk/8680688> of
> iterating through only the successful results of a map that segfaults.
>
> -MinRK
>
>
>
> On Tuesday, January 28, 2014, MinRK <benjaminrk at gmail.com> wrote:
>
> I get an EngineError when an engine dies running a task:
>
> http://nbviewer.ipython.org/gist/minrk/8679553
>
> I think this is the desired behavior.
>
>
> On Tue, Jan 28, 2014 at 2:18 PM, Patrick Fuller <patrickfuller at gmail.com>wrote:
>
> Hi,
>
> Has there been any discussion around how ipython parallel handles
> segfaulting?
>
> To make this question more specific, the following code will cause some
> workers to crash. All results will become unreadable (or at least
> un-iterable), and future runs require a restart of the cluster. Is this
> behavior intended, or is it just something that hasn't been discussed?
>
> from IPython.parallel import Clientfrom random import random
> def segfaulty_function(random_number, chance=0.25):
>     if random_number < chance:
>         import ctypes
>         i = ctypes.c_char('a')
>         j = ctypes.pointer(i)
>         c = 0
>         while True:
>             j[c] = 'a'
>             c += 1
>         return j
>     else:
>         return random_number
>
> view = Client(profile="something-parallel-here").load_balanced_view()
> results = view.map(segfaulty_function, [random() for _ in range(100)])
> for i, result in enumerate(results):
>     print i, result
>
> Backstory: Recently I've been working with a large monte carlo library
> that segfaults for, like, no reason at all. It's due to some weird
> underlying random number issue and happens once every 5-10 thousand runs. I
> currently have each worker spin out a child process to isolate the
> occasional segfault, but this seems excessive. (I'm also trying to fix the
> source of the segfaults, but debugging is a slow process.)
>
> Thanks,
> Pat
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.sci <http://mail.scipy.org/mailman/listinfo/ipython-dev>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140129/79c2ab28/attachment.html>

From rgbkrk at gmail.com  Wed Jan 29 09:15:55 2014
From: rgbkrk at gmail.com (Kyle Kelley)
Date: Wed, 29 Jan 2014 07:15:55 -0700
Subject: [IPython-dev] NotebookManager API
In-Reply-To: <21224.55486.190896.120720@Ordinateur-de-Catherine-Konrad.local>
References: <21223.51550.920715.143837@wifi-172-30-24-78.wifi.univ-paris5.fr>
	<BE6EFD37-9001-4EED-804E-E56265DE4F50@gmail.com>
	<21223.57186.41921.714779@wifi-172-30-24-78.wifi.univ-paris5.fr>
	<21224.55486.190896.120720@Ordinateur-de-Catherine-Konrad.local>
Message-ID: <CA+tbMaXQRe0jYeLmTAfraFAqPzupb3Em16ZoUbvOM0ZfQ6Es=w@mail.gmail.com>

Konrad,

Glad to see you've made such a simple example - that's great!

Bookstore (https://github.com/rgbkrk/bookstore) currently implements
multiple checkpoints, so feel free to rip anything you want from there.
Bookstore is currently only for 1.x.x releases, so I'd keep that in mind.

Once I merge the azure notebook manager code in (was going to use a
multi-cloud lib like libcloud, may just bring it in wholesale), I'll hack
away at supporting 2.0.

-- Kyle


On Wed, Jan 29, 2014 at 3:32 AM, Konrad Hinsen
<konrad.hinsen at fastmail.net>wrote:

> Konrad Hinsen writes:
>
>  > But this gives me an idea: in the spirit of your simple_kernel, I will
>  > prepare a simple_notebook_manager module, which stores notebooks in
>  > Python data structures in memory.
>
> Here is a first cut:
>
>   http://github.com/khinsen/simple_notebook_manager
>
> It permits creating new notebooks. Saving doesn't work yet, because
> the checkpointing methods are not implemented yet. Evaluating expressions
> doesn't work either, for reasons that I haven't explored yet.
>
> I have created an issue in which I document features of the NotebookManager
> API and its current implementation in IPython that I find surprising
> or worth noting:
>
>   http://github.com/khinsen/simple_notebook_manager/issues/1
>
> Comments are welcome!
>
> Konrad.
> _______________________________________________
> 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/20140129/74e39519/attachment.html>

From mcburton at umich.edu  Wed Jan 29 09:16:33 2014
From: mcburton at umich.edu (mcburton)
Date: Wed, 29 Jan 2014 09:16:33 -0500
Subject: [IPython-dev] Spell check with the new modal input?
In-Reply-To: <CAH2VmmD4dgRDGs81S6sZyG2OS8PWjkrmGv2XAxzrazRHSZrHCQ@mail.gmail.com>
References: <53526623b13a4351be72dfd44d5fdb4a@BLUPR01MB306.prod.exchangelabs.com>
	<CAH+mRR1mN0urSV8XBxd872d9brC4PqOvES7BVz3Cr2Nhv6vOXg@mail.gmail.com>
	<CAKgW=6+FR729BSVQn5ob6xv=1pW6QG-n4w=3P9QcQqhPxwq8bw@mail.gmail.com>
	<CAH4pYpT8uCsGBvQ+fGEC405d52K0jprZbCyChxNxUmikXZ2iyQ@mail.gmail.com>
	<CAH+mRR0SHuiCwFbfAQzE5T4X-sP7N6Kvq_88w0T5D8rMT745HQ@mail.gmail.com>
	<CAH2VmmD4dgRDGs81S6sZyG2OS8PWjkrmGv2XAxzrazRHSZrHCQ@mail.gmail.com>
Message-ID: <CA+0EHHqE8pZZGrPjHy0M6hG76Bo8Gh8teiuBapQ4NSG56Mptdw@mail.gmail.com>

Spellchecking with Codemirror is a big issue for other projects as well.
The Ghost blogging platform <https://ghost.org/> is wrestling with the same
issue. I believe their proposed solution is to implement their own editor.
I think someone has also brewed up a Chrome extension for Ghost that works
similar to the one Dami?n made (thanks Dami?n!).

Creating a new editor doesn't seem to make sense here and I'm pretty sure
the IPython team has their hands full without implementing a new code/text
editor (although it would be interesting to consider different editors for
different kinds of cells).

I have heard of some people building spellcheck into Codemirror using
typo.js <https://github.com/cfinke/Typo.js>. There is a Stackoverflow
thread about it
here<http://stackoverflow.com/questions/12343922/codemirror-with-spell-checker>.
There are issues with typo.js (limited dictionaries, no unicode), which
have been discussed on
Github<https://github.com/marijnh/CodeMirror/issues/1017>.
So sadly it seems like there is no easy solution. :/ Classic case of
technical debt everyone must carry.

--
mcb


On Wed, Jan 29, 2014 at 5:27 AM, Filipe Pires Alvarenga Fernandes <
ocefpaf at gmail.com> wrote:

> Hi Dami?n,
>
> Nice extension!  Did not know about it.  I was using firefox+"It's all
> text" before to open the text cells into a text editor.
>
> Thanks,
>
> -Filipe
>
>
> On Tue, Jan 28, 2014 at 11:25 PM, Dami?n Avila <damianavila at gmail.com>wrote:
>
>> The problems comes from the codemirror instance itself... in fact there
>> is no a "common" text area, so... your browser do not know how to
>> spellcheck something that did not exist as a text area (although it looks
>> like one).
>> It is no so difficult to do find an "optimal" solution with codemirror
>> layouts, but you need to know how to apply it, and you will also need a js
>> library which perform the spellcheck... so, because I wanted something
>> useful very quickly, I developed the extension I linked before... It is not
>> the best solution, I know, but I can spell check now  (in a "poor man" way
>> ;-))
>>
>>
>> 2014-01-28 Brian Granger <ellisonbg at gmail.com>
>>
>>  The new modal UI was a very targeted effort to fix/improve one part of
>>> the experience. Definitely not related to spellchecking in any way.
>>> Sorry.
>>>
>>> Brian
>>>
>>> On Tue, Jan 28, 2014 at 4:59 PM, Aaron Meurer <asmeurer at gmail.com>
>>> wrote:
>>> > Hmm, I was hoping the new UI would have fixed this. I tend to avoid
>>> > the notebook because of this.
>>> >
>>> > Aaron Meurer
>>> >
>>> > On Tue, Jan 28, 2014 at 2:05 PM, Dami?n Avila <damianavila at gmail.com>
>>> wrote:
>>> >> There is no easy way to spellcheck codemirror instances, well...
>>> there is a
>>> >> way using a codemirror layout... but you have to deal with it...
>>> >>
>>> >> As a workaround, I develop an nbextension to spellcheck your cell
>>> content.
>>> >> You have the details here:
>>> >>
>>> http://www.damian.oquanta.info/posts/a-poor-man-spell-checker-for-the-ipython-notebook.html
>>> >>
>>> >> Hope it helps!
>>> >>
>>> >>
>>> >> 2014-01-28 Toby Burnett <tburnett at myuw.net>
>>> >>>
>>> >>> I'm happily using the new modal input in 2.0-dev, very nice,
>>> especially as
>>> >>> my fingers get trained. J
>>> >>>
>>> >>> But I'm used to writing text with spell check, and wondered if there
>>> was a
>>> >>> way to get that. Chrome will do it, but only in a "text field" and a
>>> >>> markdown cell does not count, I guess.
>>> >>>
>>> >>>
>>> >>>
>>> >>> --Toby Burnett
>>> >>>
>>> >>>
>>> >>> _______________________________________________
>>> >>> IPython-dev mailing list
>>> >>> IPython-dev at scipy.org
>>> >>> http://mail.scipy.org/mailman/listinfo/ipython-dev
>>> >>>
>>> >>
>>> >>
>>> >>
>>> >> --
>>> >> Dami?n Avila
>>> >> Scientific Python Developer
>>> >> Quantitative Finance Analyst
>>> >> Statistics, Biostatistics and Econometrics Consultant
>>> >> Biochemist
>>> >>
>>> >> _______________________________________________
>>> >> 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
>>>
>>
>>
>>
>> --
>> Dami?n Avila
>> Scientific Python Developer
>> Quantitative Finance Analyst
>> Statistics, Biostatistics and Econometrics Consultant
>> Biochemist
>>
>> _______________________________________________
>> 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/20140129/7405d82b/attachment.html>

From raymond.yee at gmail.com  Wed Jan 29 12:20:39 2014
From: raymond.yee at gmail.com (Raymond Yee)
Date: Wed, 29 Jan 2014 09:20:39 -0800
Subject: [IPython-dev] displaying JavaScript-based maps in Notebook:
	tips?
In-Reply-To: <CAH4pYpQy69EwPv=3x1U9=ipLE=sWsxadMXrBSa4Bvoj_j_+T7g@mail.gmail.com>
References: <52E698D7.4090102@gmail.com>
	<CAH4pYpQy69EwPv=3x1U9=ipLE=sWsxadMXrBSa4Bvoj_j_+T7g@mail.gmail.com>
Message-ID: <52E93867.6050400@gmail.com>

Excited to try out the widgets soon.  (I ran through the examples and
think I get the gist of what's going on.)

My understanding is that widgets don't displace a library like vincent
for displaying a map when the user interactions don't send any data back
to the kernel. But if I want to support interactions in we want to send
data back to the kernel, which may then result in updating a UI, then
widgets is the way to go.  Is that correct?

To be more specific, now that AJ Renold (who's the TA for my course) has
made vincent work for us (see
https://github.com/wrobstory/vincent/pull/94), we could forge ahead with
getting as much as we can with vincent before investing any effort in
widgets.  Is that a reasonable way to think about widgets and its
relationship to vincent (and say, mpld3).

-Raymond

On 1/28/14 3:22 PM, Brian Granger wrote:
> Another option would be the new JavaScript widgets that just got
> merged into master...
>
> Cheers,
>
> Brian
>
> On Mon, Jan 27, 2014 at 9:35 AM, Raymond Yee <raymond.yee at gmail.com> wrote:
>> Hi everyone,
>>
>> For the Working with Open Data course I'm currently teaching
>> (http://is.gd/wwod14), I would like to work out with my students a way
>> to generate light-weight maps to be displayed inside of the IPython
>> notebook. Specifically, I would like to generate data to feed to various
>> JavaScript libraries including:
>>
>> * Google geo charts:
>> https://developers.google.com/chart/interactive/docs/gallery/geochart
>> * d3.js (for many uses, for most immediately for a US county choropleth:
>> http://bl.ocks.org/mbostock/4060606
>> * vega via vincent -- e.g.,
>> https://vincent.readthedocs.org/en/latest/quickstart.html#map-data-binding
>> * richer JavaScript maps with underlying layers, such as provided by
>> leaflet.js (e.g., http://leafletjs.com/examples/choropleth.html)
>>
>> I've been superficially aware of the rich data display capabilities of
>> the Notebook. And it's great to have some good working details on how to
>> exploit such capabilities in the IPython in Depth tutorial
>> (http://conference.scipy.org/scipy2013/tutorial_detail.php?id=104):
>>
>> * IPython's Rich Display System:
>> http://nbviewer.ipython.org/github/ipython/ipython-in-depth/blob/master/notebooks/03%20-%20Rich%20Display%20System.ipynb
>>
>> * Defining Custom Display Logic for Your Own Objects:
>> http://nbviewer.ipython.org/github/ipython/ipython-in-depth/blob/master/notebooks/04%20-%20Custom%20Display%20Logic.ipynb
>>
>> The path I've started down the last few days is to:
>>
>> * Get examples of the various JavaScript libraries working in a
>> stand-alone HTML page
>> * Get the example to work in an IPython notebook
>> * Generalize the examples into Python classes to use the display system
>>
>> I've encountered a mix of success and confusion. But I know enough to
>> ask a few questions:
>>
>> * Any pitfalls you've seen around IPython's use of require.js that I
>> should be mindful of?
>>
>> I *think* that I've been running into bad interactions with require.js
>> that I don't yet understand. In one simple case of trying to use d3.js,
>> I found that I couldn't instantiate the d3 JavaScript object. The
>> symptoms I saw are reminiscent of ones reported in stackoverflow -- and
>> to which Matthias had responded to:
>> http://stackoverflow.com/questions/19487121/how-can-i-load-raphael-within-ipython-notebook-avoiding-some-issues-that-arise
>>
>>
>> This morning I have a notebook (running IPython 1.1 + vincent 0.4.2)
>> that runs a vincent example well the first time -- but when I reset the
>> kernel and run it the second time (without closing the tab), I encounter
>> the following error:
>>
>> Javascript error adding output! Error {requireType: "mismatch",
>> requireModules: undefined, stack: (...), message: "Mismatched anonymous
>> define() module: [object
>> Object]?http://requirejs.org/docs/errors.html#mismatch"}
>>
>> [I can write this observation up more rigorously if necessary.]
>>
>> * Given that there's a lot of changes happening on the JavaScript
>> integration front, is it still worthwhile following the approaches laid
>> out in the IPython in Depth tutorials around working with the display
>> system and JavaScript? Or should I be patient? (I know I could, for
>> example, focus on generating HTML output to be written out and loaded
>> outside of the notebook to avoid direct integration while things shake
>> out....
>>
>> BTW, in looking up Fernando & Brian's SciPy2013 IPython tutorial, I
>> found Using geospatial data with python
>> (http://conference.scipy.org/scipy2013/tutorial_detail.php?id=110),
>> which I should look at soon!
>>
>> Thanks!
>>
>> -Raymond
>>
>> _______________________________________________
>> IPython-dev mailing list
>> IPython-dev at scipy.org
>> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>



From benjaminrk at gmail.com  Wed Jan 29 12:29:47 2014
From: benjaminrk at gmail.com (Min RK)
Date: Wed, 29 Jan 2014 09:29:47 -0800
Subject: [IPython-dev] Parallel computing segfault behavior
In-Reply-To: <CA+LJwttDmBtH0eb+vXa5Bs2x5BCCMGOMBQsZEhUGb5CLbW=Gcw@mail.gmail.com>
References: <CA+LJwtth-wxcDtW3D7-vMozLfsGDX1ueNCVFnGokBM7RNnrLYg@mail.gmail.com>
	<CAHNn8BWf+BQevtzEE-nBXoFYX2HsxoQB0Yu+yfX8g4r6wx8kpQ@mail.gmail.com>
	<CA+LJwtuu5Gqgy_xsKzjo_+3==yz_-Wrw9FqHsfwc=tKsqD1O1Q@mail.gmail.com>
	<CA+LJwtsRi5j94VDF7o9uyxM1oHkBz2w+VJ-cw78v-y3xQZaR4g@mail.gmail.com>
	<CAHNn8BU2xR5CR1ZUhFXEEdDbqPwQNYv_B0smbuO-UZz4p2C4UA@mail.gmail.com>
	<CA+LJwttDmBtH0eb+vXa5Bs2x5BCCMGOMBQsZEhUGb5CLbW=Gcw@mail.gmail.com>
Message-ID: <C652129B-2C55-4509-A2ED-BD955E34AA6E@gmail.com>



> On Jan 29, 2014, at 5:56, Patrick Fuller <patrickfuller at gmail.com> wrote:
> 
> Thanks for that code! It's good to know that the remaining cores are still working and that the results are all recoverable.
> 
> One last question: each segfault offlines an engine, which means that the cluster slows down and eventually crashes as the number of segfaults approaches the number of ipengines. Should the controller instead start new engines to take the place of killed ones?

No, engine management is done by the user at this point, the controller never starts an engine. If you want to monitor the cluster and bring up replacement engines, this is not hard to do with an extra watcher (or starting engines with supervisord, etc.)

> 
> Thanks,
> Pat
> 
>> On Tuesday, January 28, 2014, MinRK <benjaminrk at gmail.com> wrote:
>> 
>> 
>>> On Tue, Jan 28, 2014 at 5:04 PM, Patrick Fuller <patrickfuller at gmail.com> wrote:
>>> ...the difference being that this would require starting a new engine on each segfault
>>> 
>>> 
>>>> On Tuesday, January 28, 2014, Patrick Fuller <patrickfuller at gmail.com> wrote:
>>>> I guess my question is more along the lines of: should the cluster continue on to complete the queued jobs (as it would if the segfaults were instead python exceptions)? 
>> 
>> I see what you mean - the generator halts when it sees an exception, so it's inconvenient to get the successes, while ignoring the failures. I guess we could add separate methods that only iterate through just the successful results.
>> 
>> As far as task submission goes, it does indeed do what you seem to expect, so it's just viewing the results where there is an issue.
>> 
>> Here is an example of iterating through only the successful results of a map that segfaults.
>> 
>> -MinRK
>>  
>> 
>> On Tuesday, January 28, 2014, MinRK <benjaminrk at gmail.com> wrote:
>> I get an EngineError when an engine dies running a task:
>> 
>> http://nbviewer.ipython.org/gist/minrk/8679553
>> 
>> I think this is the desired behavior.
>> 
>> 
>> On Tue, Jan 28, 2014 at 2:18 PM, Patrick Fuller <patrickfuller at gmail.com> wrote:
>> Hi,
>> 
>> Has there been any discussion around how ipython parallel handles segfaulting?
>> 
>> To make this question more specific, the following code will cause some workers to crash. All results will become unreadable (or at least un-iterable), and future runs require a restart of the cluster. Is this behavior intended, or is it just something that hasn?t been discussed?
>> 
>> from IPython.parallel import Client
>> from random import random
>> 
>> def segfaulty_function(random_number, chance=0.25):
>>     if random_number < chance:
>>         import ctypes
>>         i = ctypes.c_char('a')
>>         j = ctypes.pointer(i)
>>         c = 0
>>         while True:
>>             j[c] = 'a'
>>             c += 1
>>         return j
>>     else:
>>         return random_number
>> 
>> view = Client(profile="something-parallel-here").load_balanced_view()
>> results = view.map(segfaulty_function, [random() for _ in range(100)])
>> 
>> for i, result in enumerate(results):
>>     print i, result
>> Backstory: Recently I?ve been working with a large monte carlo library that segfaults for, like, no reason at all. It?s due to some weird underlying random number issue and happens once every 5-10 thousand runs. I currently have each worker spin out a child process to isolate the occasional segfault, but this seems excessive. (I'm also trying to fix the source of the segfaults, but debugging is a slow process.)
>> 
>> Thanks,
>> Pat
>> 
>> 
>> _______________________________________________
>> IPython-dev mailing list
>> IPython-dev at scipy.org
>> http://mail.sci
>> 
> _______________________________________________
> 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/20140129/cda9b4a7/attachment.html>

From tburnett at myuw.net  Wed Jan 29 12:42:20 2014
From: tburnett at myuw.net (Toby Burnett)
Date: Wed, 29 Jan 2014 17:42:20 +0000
Subject: [IPython-dev] executing notebooks locally
Message-ID: <7951bce353fd4cb68fd5b138dbcb5862@BLUPR01MB306.prod.exchangelabs.com>

I'm using IPython notebooks to document code, in which cell output reflects the machine it was run on. I want to export the notebooks to a different machine, and rerun them to reflect that machine's environment. That is, the equivalent of starting a server, loading each notebook in a browser, then clicking  Cell |Run All.  Obviously it would be more convenient to just run a local script to do this.

There seems to be no such option in the ipython notebook command. But I found this on stackoverflow:
http://stackoverflow.com/questions/19640280/execute-another-ipython-notebook-in-a-separate-namespace

My attempt  to do this is:

from IPython.nbformat import current
ip = get_ipython()
with open('Untitled1.ipynb') as f:
    nb = current.read(f, 'json')
code_cells = filter( lambda x: x.cell_type=='code', nb.worksheets[0].cells)
map(ip.run_cell, code_cells)

But with a result
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-16-530ade14060f> in <module>()
      4     nb = current.read(f, 'json')
      5 code_cells = filter( lambda x: x.cell_type=='code', nb.worksheets[0].cells)
----> 6 map(ip.run_cell, code_cells)

/phys/users/tburnett/anaconda/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in run_cell(self, raw_cell, store_history, silent, shell_futures)
   2642           __future__ imports are not shared in either direction.
   2643         """
-> 2644         if (not raw_cell) or raw_cell.isspace():
   2645             return
   2646

/phys/users/tburnett/anaconda/lib/python2.7/site-packages/IPython/utils/ipstruct.pyc in __getattr__(self, key)
    147             result = self[key]
    148         except KeyError:
--> 149             raise AttributeError(key)
    150         else:
    151             return result

AttributeError: isspace

Indeed the NotebookNode object does not have an isspace function. (This is 2.0-dev.)
Any thoughts?

--Toby
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140129/1e418ec9/attachment.html>

From theodore.r.drain at jpl.nasa.gov  Wed Jan 29 12:48:48 2014
From: theodore.r.drain at jpl.nasa.gov (Drain, Theodore R (392P))
Date: Wed, 29 Jan 2014 17:48:48 +0000
Subject: [IPython-dev] Parallel computing segfault behavior
In-Reply-To: <C652129B-2C55-4509-A2ED-BD955E34AA6E@gmail.com>
References: <CA+LJwtth-wxcDtW3D7-vMozLfsGDX1ueNCVFnGokBM7RNnrLYg@mail.gmail.com>
	<CAHNn8BWf+BQevtzEE-nBXoFYX2HsxoQB0Yu+yfX8g4r6wx8kpQ@mail.gmail.com>
	<CA+LJwtuu5Gqgy_xsKzjo_+3==yz_-Wrw9FqHsfwc=tKsqD1O1Q@mail.gmail.com>
	<CA+LJwtsRi5j94VDF7o9uyxM1oHkBz2w+VJ-cw78v-y3xQZaR4g@mail.gmail.com>
	<CAHNn8BU2xR5CR1ZUhFXEEdDbqPwQNYv_B0smbuO-UZz4p2C4UA@mail.gmail.com>
	<CA+LJwttDmBtH0eb+vXa5Bs2x5BCCMGOMBQsZEhUGb5CLbW=Gcw@mail.gmail.com>,
	<C652129B-2C55-4509-A2ED-BD955E34AA6E@gmail.com>
Message-ID: <0DC1CAB7F6C7FC4A8B54EE1FD49046990FB7E021@ap-embx-sp20.RES.AD.JPL>

I'd be interested in an automatic restart capability as well.  We have some very long running jobs where a loss of one more more engines might be a problem.  Could you outline what you mean by an "extra watcher"?  Is that just a Client object that polls the engine id's to see if they change (I assume UUID's would be needed, not the simple integer id's)?

Thanks,
Ted

________________________________
From: ipython-dev-bounces at scipy.org [ipython-dev-bounces at scipy.org] on behalf of Min RK [benjaminrk at gmail.com]
Sent: Wednesday, January 29, 2014 9:29 AM
To: IPython developers list
Cc: IPython developers list
Subject: Re: [IPython-dev] Parallel computing segfault behavior



On Jan 29, 2014, at 5:56, Patrick Fuller <patrickfuller at gmail.com<mailto:patrickfuller at gmail.com>> wrote:

Thanks for that code! It's good to know that the remaining cores are still working and that the results are all recoverable.

One last question: each segfault offlines an engine, which means that the cluster slows down and eventually crashes as the number of segfaults approaches the number of ipengines. Should the controller instead start new engines to take the place of killed ones?

No, engine management is done by the user at this point, the controller never starts an engine. If you want to monitor the cluster and bring up replacement engines, this is not hard to do with an extra watcher (or starting engines with supervisord, etc.)


Thanks,
Pat

On Tuesday, January 28, 2014, MinRK <benjaminrk at gmail.com<mailto:benjaminrk at gmail.com>> wrote:


On Tue, Jan 28, 2014 at 5:04 PM, Patrick Fuller <patrickfuller at gmail.com<UrlBlockedError.aspx>> wrote:
...the difference being that this would require starting a new engine on each segfault


On Tuesday, January 28, 2014, Patrick Fuller <patrickfuller at gmail.com<UrlBlockedError.aspx>> wrote:
I guess my question is more along the lines of: should the cluster continue on to complete the queued jobs (as it would if the segfaults were instead python exceptions)?

I see what you mean - the generator halts when it sees an exception, so it's inconvenient to get the successes, while ignoring the failures. I guess we could add separate methods that only iterate through just the successful results.

As far as task submission goes, it does indeed do what you seem to expect, so it's just viewing the results where there is an issue.

Here is an example<http://nbviewer.ipython.org/gist/minrk/8680688> of iterating through only the successful results of a map that segfaults.

-MinRK


On Tuesday, January 28, 2014, MinRK <benjaminrk at gmail.com> wrote:
I get an EngineError when an engine dies running a task:

http://nbviewer.ipython.org/gist/minrk/8679553

I think this is the desired behavior.


On Tue, Jan 28, 2014 at 2:18 PM, Patrick Fuller <patrickfuller at gmail.com> wrote:

Hi,

Has there been any discussion around how ipython parallel handles segfaulting?

To make this question more specific, the following code will cause some workers to crash. All results will become unreadable (or at least un-iterable), and future runs require a restart of the cluster. Is this behavior intended, or is it just something that hasn?t been discussed?

from IPython.parallel import Client
from random import random

def segfaulty_function(random_number, chance=0.25):
    if random_number < chance:
        import ctypes
        i = ctypes.c_char('a')
        j = ctypes.pointer(i)
        c = 0
        while True:
            j[c] = 'a'
            c += 1
        return j
    else:
        return random_number

view = Client(profile="something-parallel-here").load_balanced_view()
results = view.map(segfaulty_function, [random() for _ in range(100)])

for i, result in enumerate(results):
    print i, result

Backstory: Recently I?ve been working with a large monte carlo library that segfaults for, like, no reason at all. It?s due to some weird underlying random number issue and happens once every 5-10 thousand runs. I currently have each worker spin out a child process to isolate the occasional segfault, but this seems excessive. (I'm also trying to fix the source of the segfaults, but debugging is a slow process.)

Thanks,
Pat

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

_______________________________________________
IPython-dev mailing list
IPython-dev at scipy.org<mailto: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/20140129/64c5b972/attachment.html>

From nathan12343 at gmail.com  Wed Jan 29 12:51:35 2014
From: nathan12343 at gmail.com (Nathan Goldbaum)
Date: Wed, 29 Jan 2014 09:51:35 -0800
Subject: [IPython-dev] executing notebooks locally
In-Reply-To: <7951bce353fd4cb68fd5b138dbcb5862@BLUPR01MB306.prod.exchangelabs.com>
References: <7951bce353fd4cb68fd5b138dbcb5862@BLUPR01MB306.prod.exchangelabs.com>
Message-ID: <CAJXewOkhfJcQk1Yw9SVbkmr+QYLLo64=LfWHMTuEBa6XjRAtpA@mail.gmail.com>

Have you seen runipy?

https://github.com/paulgb/runipy/

On Wed, Jan 29, 2014 at 9:42 AM, Toby Burnett <tburnett at myuw.net> wrote:
> I'm using IPython notebooks to document code, in which cell output reflects
> the machine it was run on. I want to export the notebooks to a different
> machine, and rerun them to reflect that machine's environment. That is, the
> equivalent of starting a server, loading each notebook in a browser, then
> clicking  Cell |Run All.  Obviously it would be more convenient to just run
> a local script to do this.
>
>
>
> There seems to be no such option in the ipython notebook command. But I
> found this on stackoverflow:
>
> http://stackoverflow.com/questions/19640280/execute-another-ipython-notebook-in-a-separate-namespace
>
>
>
> My attempt  to do this is:
>
>
>
> from IPython.nbformat import current
>
> ip = get_ipython()
>
> with open('Untitled1.ipynb') as f:
>
>     nb = current.read(f, 'json')
>
> code_cells = filter( lambda x: x.cell_type=='code', nb.worksheets[0].cells)
>
> map(ip.run_cell, code_cells)
>
>
>
> But with a result
>
> ---------------------------------------------------------------------------
>
> AttributeError                            Traceback (most recent call last)
>
> <ipython-input-16-530ade14060f> in <module>()
>
>       4     nb = current.read(f, 'json')
>
>       5 code_cells = filter( lambda x: x.cell_type=='code',
> nb.worksheets[0].cells)
>
> ----> 6 map(ip.run_cell, code_cells)
>
>
>
> /phys/users/tburnett/anaconda/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc
> in run_cell(self, raw_cell, store_history, silent, shell_futures)
>
>    2642           __future__ imports are not shared in either direction.
>
>    2643         """
>
> -> 2644         if (not raw_cell) or raw_cell.isspace():
>
>    2645             return
>
>    2646
>
>
>
> /phys/users/tburnett/anaconda/lib/python2.7/site-packages/IPython/utils/ipstruct.pyc
> in __getattr__(self, key)
>
>     147             result = self[key]
>
>     148         except KeyError:
>
> --> 149             raise AttributeError(key)
>
>     150         else:
>
>     151             return result
>
>
>
> AttributeError: isspace
>
>
>
> Indeed the NotebookNode object does not have an isspace function. (This is
> 2.0-dev.)
>
> Any thoughts?
>
>
>
> --Toby
>
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>


From ellisonbg at gmail.com  Wed Jan 29 12:53:43 2014
From: ellisonbg at gmail.com (Brian Granger)
Date: Wed, 29 Jan 2014 09:53:43 -0800
Subject: [IPython-dev] displaying JavaScript-based maps in Notebook:
	tips?
In-Reply-To: <52E93867.6050400@gmail.com>
References: <52E698D7.4090102@gmail.com>
	<CAH4pYpQy69EwPv=3x1U9=ipLE=sWsxadMXrBSa4Bvoj_j_+T7g@mail.gmail.com>
	<52E93867.6050400@gmail.com>
Message-ID: <CAH4pYpQW9qY97QH+pc1AzxVz0DfeZYFtchoZbX+3rTi+5gctHg@mail.gmail.com>

Raymond,

That is a good way of looking at it. The only caveat is that in the
long run there might be other differences in the two approaches
(widget, output) related to security. That might mean that eventually
vincent and mpld3 get widget modes as well.

Cheers,

Brian

On Wed, Jan 29, 2014 at 9:20 AM, Raymond Yee <raymond.yee at gmail.com> wrote:
> Excited to try out the widgets soon.  (I ran through the examples and
> think I get the gist of what's going on.)
>
> My understanding is that widgets don't displace a library like vincent
> for displaying a map when the user interactions don't send any data back
> to the kernel. But if I want to support interactions in we want to send
> data back to the kernel, which may then result in updating a UI, then
> widgets is the way to go.  Is that correct?
>
> To be more specific, now that AJ Renold (who's the TA for my course) has
> made vincent work for us (see
> https://github.com/wrobstory/vincent/pull/94), we could forge ahead with
> getting as much as we can with vincent before investing any effort in
> widgets.  Is that a reasonable way to think about widgets and its
> relationship to vincent (and say, mpld3).
>
> -Raymond
>
> On 1/28/14 3:22 PM, Brian Granger wrote:
>> Another option would be the new JavaScript widgets that just got
>> merged into master...
>>
>> Cheers,
>>
>> Brian
>>
>> On Mon, Jan 27, 2014 at 9:35 AM, Raymond Yee <raymond.yee at gmail.com> wrote:
>>> Hi everyone,
>>>
>>> For the Working with Open Data course I'm currently teaching
>>> (http://is.gd/wwod14), I would like to work out with my students a way
>>> to generate light-weight maps to be displayed inside of the IPython
>>> notebook. Specifically, I would like to generate data to feed to various
>>> JavaScript libraries including:
>>>
>>> * Google geo charts:
>>> https://developers.google.com/chart/interactive/docs/gallery/geochart
>>> * d3.js (for many uses, for most immediately for a US county choropleth:
>>> http://bl.ocks.org/mbostock/4060606
>>> * vega via vincent -- e.g.,
>>> https://vincent.readthedocs.org/en/latest/quickstart.html#map-data-binding
>>> * richer JavaScript maps with underlying layers, such as provided by
>>> leaflet.js (e.g., http://leafletjs.com/examples/choropleth.html)
>>>
>>> I've been superficially aware of the rich data display capabilities of
>>> the Notebook. And it's great to have some good working details on how to
>>> exploit such capabilities in the IPython in Depth tutorial
>>> (http://conference.scipy.org/scipy2013/tutorial_detail.php?id=104):
>>>
>>> * IPython's Rich Display System:
>>> http://nbviewer.ipython.org/github/ipython/ipython-in-depth/blob/master/notebooks/03%20-%20Rich%20Display%20System.ipynb
>>>
>>> * Defining Custom Display Logic for Your Own Objects:
>>> http://nbviewer.ipython.org/github/ipython/ipython-in-depth/blob/master/notebooks/04%20-%20Custom%20Display%20Logic.ipynb
>>>
>>> The path I've started down the last few days is to:
>>>
>>> * Get examples of the various JavaScript libraries working in a
>>> stand-alone HTML page
>>> * Get the example to work in an IPython notebook
>>> * Generalize the examples into Python classes to use the display system
>>>
>>> I've encountered a mix of success and confusion. But I know enough to
>>> ask a few questions:
>>>
>>> * Any pitfalls you've seen around IPython's use of require.js that I
>>> should be mindful of?
>>>
>>> I *think* that I've been running into bad interactions with require.js
>>> that I don't yet understand. In one simple case of trying to use d3.js,
>>> I found that I couldn't instantiate the d3 JavaScript object. The
>>> symptoms I saw are reminiscent of ones reported in stackoverflow -- and
>>> to which Matthias had responded to:
>>> http://stackoverflow.com/questions/19487121/how-can-i-load-raphael-within-ipython-notebook-avoiding-some-issues-that-arise
>>>
>>>
>>> This morning I have a notebook (running IPython 1.1 + vincent 0.4.2)
>>> that runs a vincent example well the first time -- but when I reset the
>>> kernel and run it the second time (without closing the tab), I encounter
>>> the following error:
>>>
>>> Javascript error adding output! Error {requireType: "mismatch",
>>> requireModules: undefined, stack: (...), message: "Mismatched anonymous
>>> define() module: [object
>>> Object]?http://requirejs.org/docs/errors.html#mismatch"}
>>>
>>> [I can write this observation up more rigorously if necessary.]
>>>
>>> * Given that there's a lot of changes happening on the JavaScript
>>> integration front, is it still worthwhile following the approaches laid
>>> out in the IPython in Depth tutorials around working with the display
>>> system and JavaScript? Or should I be patient? (I know I could, for
>>> example, focus on generating HTML output to be written out and loaded
>>> outside of the notebook to avoid direct integration while things shake
>>> out....
>>>
>>> BTW, in looking up Fernando & Brian's SciPy2013 IPython tutorial, I
>>> found Using geospatial data with python
>>> (http://conference.scipy.org/scipy2013/tutorial_detail.php?id=110),
>>> which I should look at soon!
>>>
>>> Thanks!
>>>
>>> -Raymond
>>>
>>> _______________________________________________
>>> 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


From konrad.hinsen at fastmail.net  Wed Jan 29 12:56:43 2014
From: konrad.hinsen at fastmail.net (Konrad Hinsen)
Date: Wed, 29 Jan 2014 18:56:43 +0100
Subject: [IPython-dev] NotebookManager API
In-Reply-To: <21224.55486.190896.120720@Ordinateur-de-Catherine-Konrad.local>
References: <21223.51550.920715.143837@wifi-172-30-24-78.wifi.univ-paris5.fr>
	<BE6EFD37-9001-4EED-804E-E56265DE4F50@gmail.com>
	<21223.57186.41921.714779@wifi-172-30-24-78.wifi.univ-paris5.fr>
	<21224.55486.190896.120720@Ordinateur-de-Catherine-Konrad.local>
Message-ID: <21225.16603.195446.800989@Konrad-Hinsens-MacBook-Pro-2.local>

Konrad Hinsen writes:

 > Here is a first cut:
 > 
 >   http://github.com/khinsen/simple_notebook_manager

The implementation is now complete, it allows all notebook operations.
There may still be bugs, and I will do more cleanup to make the
code clearer.

Konrad.


From takowl at gmail.com  Wed Jan 29 13:10:28 2014
From: takowl at gmail.com (Thomas Kluyver)
Date: Wed, 29 Jan 2014 10:10:28 -0800
Subject: [IPython-dev] executing notebooks locally
In-Reply-To: <7951bce353fd4cb68fd5b138dbcb5862@BLUPR01MB306.prod.exchangelabs.com>
References: <7951bce353fd4cb68fd5b138dbcb5862@BLUPR01MB306.prod.exchangelabs.com>
Message-ID: <CAOvn4qhgTfLQdfcKD5dm_wqXcVFwLiVncM90Kqg+R7rJbM5HRA@mail.gmail.com>

On 29 January 2014 09:42, Toby Burnett <tburnett at myuw.net> wrote:

> -> 2644         if (not raw_cell) or raw_cell.isspace():


raw_cell needs to be a string of code, not a NotebookNode object. But as
Nathan points out, runipy probably does what you want.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140129/aac32f1e/attachment.html>

From cyrille.rossant at gmail.com  Wed Jan 29 13:16:17 2014
From: cyrille.rossant at gmail.com (Cyrille Rossant)
Date: Wed, 29 Jan 2014 19:16:17 +0100
Subject: [IPython-dev] Static widgets
Message-ID: <CA+-1RQR4o30bt5NjdgpgXMBBL6HPHaQnaOGMx7p_O5woJ-pDaA@mail.gmail.com>

Hi,

I just tried the notebook widgets, and they look really great. I'm
wondering how widgets integrate with the nbformat, nbviewer,
nbconvert, etc. It seems to me that, currently, widgets are not saved
in .ipynb at all? It might be interesting to have the option to output
them statically in some sort (even if they do not interact with
anything).

For instance, when viewing a notebook containing widgets on nbviewer,
those widgets do not appear at all. One needs to download and execute
the notebook in an IPython session to see how the widgets look like.

More generally, I'm thinking about how one could create offline
interactive documents with IPython. A notebook containing widgets
could be converted in HTML with nbconvert. The HTML document would
contain Javascript placeholders for function callbacks, and one would
be free to write custom Javascript code responding to widget
interactivity (thereby replacing Python by Javascript in the
interaction loop). That would be really cool. Is that something that's
going to be possible at some point?

Best,
Cyrille


From raymond.yee at gmail.com  Wed Jan 29 13:22:31 2014
From: raymond.yee at gmail.com (Raymond Yee)
Date: Wed, 29 Jan 2014 10:22:31 -0800
Subject: [IPython-dev] Static widgets
In-Reply-To: <CA+-1RQR4o30bt5NjdgpgXMBBL6HPHaQnaOGMx7p_O5woJ-pDaA@mail.gmail.com>
References: <CA+-1RQR4o30bt5NjdgpgXMBBL6HPHaQnaOGMx7p_O5woJ-pDaA@mail.gmail.com>
Message-ID: <52E946E7.4040606@gmail.com>

I second the questions from Cyrille.  My naive mind thinks immediately
of what Jake Vanderplas demonstrated in
http://jakevdp.github.io/blog/2013/12/05/static-interactive-widgets/ --
the ability to have the functionality of "static interactive widgets" is
something I'd love to see in the realm of IPython widgets.

Enthusiastically,
-Raymond

On 1/29/14 10:16 AM, Cyrille Rossant wrote:
> Hi,
>
> I just tried the notebook widgets, and they look really great. I'm
> wondering how widgets integrate with the nbformat, nbviewer,
> nbconvert, etc. It seems to me that, currently, widgets are not saved
> in .ipynb at all? It might be interesting to have the option to output
> them statically in some sort (even if they do not interact with
> anything).
>
> For instance, when viewing a notebook containing widgets on nbviewer,
> those widgets do not appear at all. One needs to download and execute
> the notebook in an IPython session to see how the widgets look like.
>
> More generally, I'm thinking about how one could create offline
> interactive documents with IPython. A notebook containing widgets
> could be converted in HTML with nbconvert. The HTML document would
> contain Javascript placeholders for function callbacks, and one would
> be free to write custom Javascript code responding to widget
> interactivity (thereby replacing Python by Javascript in the
> interaction loop). That would be really cool. Is that something that's
> going to be possible at some point?
>
> Best,
> Cyrille
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev



From ellisonbg at gmail.com  Wed Jan 29 13:24:17 2014
From: ellisonbg at gmail.com (Brian Granger)
Date: Wed, 29 Jan 2014 10:24:17 -0800
Subject: [IPython-dev] Implementing inline images in a kernel
In-Reply-To: <CAAusYCiPeBMLtRPh6nivtWii1nFUV_DuBs_NyY0RKkJQ0MM3FQ@mail.gmail.com>
References: <CAAusYCh057N9udHycA6ovMRUhhxTQi9=oyeEenPxFsN7822HJg@mail.gmail.com>
	<CAH4pYpT+BgP93BFud2FTySe4KT+VWOZN1jx_u43RVJ7zwXco4w@mail.gmail.com>
	<CAAusYCiC=yVXib5iqY3Wr6WC1ZXKZotMM0B=YCFwRgPANvNCng@mail.gmail.com>
	<CAHAreOpZi0eS0c788umYAkfyGK_dLoBQk-C=AHLsKxt-cPo7vw@mail.gmail.com>
	<CAAusYCigtC6YiuNWj3Pc1gv-VgTKVJhArOdoXsSwXD1=b7od6A@mail.gmail.com>
	<CAH4pYpR_ZFcSJXeQFKwSts=EMwNUuZkg1HJvtOQq69C=k2dh8Q@mail.gmail.com>
	<CAAusYCiUm75U4KZH=0gfoR5AdCRgCUG+fu2nTHzsZwkGg9XSUg@mail.gmail.com>
	<CAH4pYpSc_MrGZ=ZDqLohKubJE2NPekLVojOegg5_W94Q6UM8YQ@mail.gmail.com>
	<CAAusYCiPeBMLtRPh6nivtWii1nFUV_DuBs_NyY0RKkJQ0MM3FQ@mail.gmail.com>
Message-ID: <CAH4pYpS3w1-cVONdTUuqGHuXUUpcaLy1KyFiTF47ByK6MFSUtA@mail.gmail.com>

> Calico interpreting whatever language shows the output intermittently
> over the course of the 10 seconds, just like IPython running the
> Python kernel. Calico doesn't "talk" to a Python backend... Calico
> *is* Python, in a sense. And it is also Basic, Logo, etc. There isn't
> one primary language talking to the others---there is just the thin
> socket kernel talking to a specific language's eval function. But the
> eval occurs in the "same space". Lower level calls to functions like
> print() in the interpreted language's eval() inject messages to the
> iopub stream. Even our Java works this way.

Great, this is also how the %julia magic works. By having shared
objects that can all access the same messaging layer, you co go a lot
further. Asynchronous output (including rich) shouldn't be too bad.
The important thing is that there be a common messaging API that all
of the sub-kernels can access to send messages asynchronously. Tab
completion might be a bit of a pain, but can probably be done with
this approach as well.

I think the widgets are going to be a bit more difficult. I think you
will be able to get them working, but with some serious reinvention.
What do I mean by that. We already have a relatively full set of
Python widgets shipping with IPython 2.0. Other people will start to
write 3rd party widgets for Python as well. But these use the IPython
kernel implementation of the widget/comm infrastructure:

https://github.com/ipython/ipython/wiki/IPEP-21%3A-Widget-Messages

you will need to implement this layer in your main/sub kernels. The
problem is that widgets in your kernels will need to use your layer
for this. This means you will also have to re-implement the actual
Python widgets to use your layer instead of the normal IPython one.
You might be able to monkey patch things to get this stuff working,
but it could be a serious amount of work. Over time, as the number and
complexity of widgets grows, this will require a substantial effort to
do.

> This is why I find some of the assumptions stated
> confusing---insisting that "one language/one kernel" is the future
> apparently misses some possibilities in design :) It may be that we
> made unique design decisions. In any event, it appears that Calico
> running scripts is very different in a fundamental way that IPython's
> Python running the integrated Julia.

There are two issues:

* Can the meta kernel thing be done: depending on how it is designed,
to some degree yes.
* Does it make sense to create meta kernels: my own feeling is that it
does not in general. Obviously, IPython, through cell magics does
offer some of this in limited form. But we definitely don't have plans
on trying to add things like tab completion+widgets to these cell
magics. My main problem with meta kernels though is not technical, but
conceptual. Most users, even very advanced ones, have plenty enough
cognitive load when working with 1 programming language. To ask them
to manage multiple languages in the same namespace is a huge ask that
is probably DOA for all but the most advanced users.

Cheers,

Brian

> I wonder what the best technical way to describe this difference is? I
> guess that you had assumed some type of blocking behavior. Perhaps I
> need a better way of describing how Calico operates. My question to
> you is why does %julia block?
>
> -Doug
>
>> 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
>> _______________________________________________
>> 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


From ellisonbg at gmail.com  Wed Jan 29 13:28:33 2014
From: ellisonbg at gmail.com (Brian Granger)
Date: Wed, 29 Jan 2014 10:28:33 -0800
Subject: [IPython-dev] Static widgets
In-Reply-To: <52E946E7.4040606@gmail.com>
References: <CA+-1RQR4o30bt5NjdgpgXMBBL6HPHaQnaOGMx7p_O5woJ-pDaA@mail.gmail.com>
	<52E946E7.4040606@gmail.com>
Message-ID: <CAH4pYpTH0-A=S8Ms5_Kdg53tC1wPZpPQ1YoVJzOCypRT+vy3gw@mail.gmail.com>

We have a prototype working, but it won't make it into 2.0. It is one
of the top tasks for 3.0 though. The basic idea is that it will be
possible to store widget messages in different storage backends:

* in the .ipynb
* in a co-located directory alongside the notebook.
* ...

nbconvert will be able to produce static html that knows how to
instantiate widgets from these store messages and nbviewer will be
made to work with all of these backends...

we will get there...

Cheers,

Brian

On Wed, Jan 29, 2014 at 10:22 AM, Raymond Yee <raymond.yee at gmail.com> wrote:
> I second the questions from Cyrille.  My naive mind thinks immediately
> of what Jake Vanderplas demonstrated in
> http://jakevdp.github.io/blog/2013/12/05/static-interactive-widgets/ --
> the ability to have the functionality of "static interactive widgets" is
> something I'd love to see in the realm of IPython widgets.
>
> Enthusiastically,
> -Raymond
>
> On 1/29/14 10:16 AM, Cyrille Rossant wrote:
>> Hi,
>>
>> I just tried the notebook widgets, and they look really great. I'm
>> wondering how widgets integrate with the nbformat, nbviewer,
>> nbconvert, etc. It seems to me that, currently, widgets are not saved
>> in .ipynb at all? It might be interesting to have the option to output
>> them statically in some sort (even if they do not interact with
>> anything).
>>
>> For instance, when viewing a notebook containing widgets on nbviewer,
>> those widgets do not appear at all. One needs to download and execute
>> the notebook in an IPython session to see how the widgets look like.
>>
>> More generally, I'm thinking about how one could create offline
>> interactive documents with IPython. A notebook containing widgets
>> could be converted in HTML with nbconvert. The HTML document would
>> contain Javascript placeholders for function callbacks, and one would
>> be free to write custom Javascript code responding to widget
>> interactivity (thereby replacing Python by Javascript in the
>> interaction loop). That would be really cool. Is that something that's
>> going to be possible at some point?
>>
>> Best,
>> Cyrille
>> _______________________________________________
>> 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


From takowl at gmail.com  Wed Jan 29 13:47:52 2014
From: takowl at gmail.com (Thomas Kluyver)
Date: Wed, 29 Jan 2014 10:47:52 -0800
Subject: [IPython-dev] Implementing inline images in a kernel
In-Reply-To: <CAAusYCi3brHtx223E8G1d953tH2GMeqUmAAd7pVnTsu35d3FgA@mail.gmail.com>
References: <CAAusYCh057N9udHycA6ovMRUhhxTQi9=oyeEenPxFsN7822HJg@mail.gmail.com>
	<CAH4pYpT+BgP93BFud2FTySe4KT+VWOZN1jx_u43RVJ7zwXco4w@mail.gmail.com>
	<CAAusYCiC=yVXib5iqY3Wr6WC1ZXKZotMM0B=YCFwRgPANvNCng@mail.gmail.com>
	<CAHAreOpZi0eS0c788umYAkfyGK_dLoBQk-C=AHLsKxt-cPo7vw@mail.gmail.com>
	<CAAusYCigtC6YiuNWj3Pc1gv-VgTKVJhArOdoXsSwXD1=b7od6A@mail.gmail.com>
	<CAAusYCi3brHtx223E8G1d953tH2GMeqUmAAd7pVnTsu35d3FgA@mail.gmail.com>
Message-ID: <CAOvn4qgupqBhNkO5n2nxbxyG7P=SUY7gsqV8Tvis5kY4dux28w@mail.gmail.com>

On 29 January 2014 00:09, Doug Blank <doug.blank at gmail.com> wrote:

> BTW, how does IPython get the last expression in a set of statements to be
> the return value? It can't be an eval(), because it can't handle
> statements, and it can't be exec() because it doesn't get the return
> value... the only thing it could be would be to parse the statements, and
> eval/exec each one?
>

That's pretty much what we do. Python makes it quite easy to parse the code
and inspect or manipulate the AST before compiling it.

Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140129/c8d1eafa/attachment.html>

From cyrille.rossant at gmail.com  Wed Jan 29 14:25:49 2014
From: cyrille.rossant at gmail.com (Cyrille Rossant)
Date: Wed, 29 Jan 2014 20:25:49 +0100
Subject: [IPython-dev] Static widgets
In-Reply-To: <CAH4pYpTH0-A=S8Ms5_Kdg53tC1wPZpPQ1YoVJzOCypRT+vy3gw@mail.gmail.com>
References: <CA+-1RQR4o30bt5NjdgpgXMBBL6HPHaQnaOGMx7p_O5woJ-pDaA@mail.gmail.com>
	<52E946E7.4040606@gmail.com>
	<CAH4pYpTH0-A=S8Ms5_Kdg53tC1wPZpPQ1YoVJzOCypRT+vy3gw@mail.gmail.com>
Message-ID: <CA+-1RQT3hq_tAr3ErBkLzpBZrcz4hHuF7rSrX3Zsbp_wtffFyQ@mail.gmail.com>

Hi Brian,

That's great news! Is this prototype available somewhere? I'd love to
see how it works (even if the implementation is going to change, I
suppose the general idea is already there).

Cheers,
Cyrille

2014-01-29 Brian Granger <ellisonbg at gmail.com>:
> We have a prototype working, but it won't make it into 2.0. It is one
> of the top tasks for 3.0 though. The basic idea is that it will be
> possible to store widget messages in different storage backends:
>
> * in the .ipynb
> * in a co-located directory alongside the notebook.
> * ...
>
> nbconvert will be able to produce static html that knows how to
> instantiate widgets from these store messages and nbviewer will be
> made to work with all of these backends...
>
> we will get there...
>
> Cheers,
>
> Brian
>
> On Wed, Jan 29, 2014 at 10:22 AM, Raymond Yee <raymond.yee at gmail.com> wrote:
>> I second the questions from Cyrille.  My naive mind thinks immediately
>> of what Jake Vanderplas demonstrated in
>> http://jakevdp.github.io/blog/2013/12/05/static-interactive-widgets/ --
>> the ability to have the functionality of "static interactive widgets" is
>> something I'd love to see in the realm of IPython widgets.
>>
>> Enthusiastically,
>> -Raymond
>>
>> On 1/29/14 10:16 AM, Cyrille Rossant wrote:
>>> Hi,
>>>
>>> I just tried the notebook widgets, and they look really great. I'm
>>> wondering how widgets integrate with the nbformat, nbviewer,
>>> nbconvert, etc. It seems to me that, currently, widgets are not saved
>>> in .ipynb at all? It might be interesting to have the option to output
>>> them statically in some sort (even if they do not interact with
>>> anything).
>>>
>>> For instance, when viewing a notebook containing widgets on nbviewer,
>>> those widgets do not appear at all. One needs to download and execute
>>> the notebook in an IPython session to see how the widgets look like.
>>>
>>> More generally, I'm thinking about how one could create offline
>>> interactive documents with IPython. A notebook containing widgets
>>> could be converted in HTML with nbconvert. The HTML document would
>>> contain Javascript placeholders for function callbacks, and one would
>>> be free to write custom Javascript code responding to widget
>>> interactivity (thereby replacing Python by Javascript in the
>>> interaction loop). That would be really cool. Is that something that's
>>> going to be possible at some point?
>>>
>>> Best,
>>> Cyrille
>>> _______________________________________________
>>> 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


From takowl at gmail.com  Wed Jan 29 14:53:19 2014
From: takowl at gmail.com (Thomas Kluyver)
Date: Wed, 29 Jan 2014 11:53:19 -0800
Subject: [IPython-dev] BackgroundJobManager: Killing a background job
In-Reply-To: <CAHAono0skYYDM9tL9k+N6M0J4HUSw8mfLhzaT0t3RD+3xiUSqg@mail.gmail.com>
References: <CAHAono0skYYDM9tL9k+N6M0J4HUSw8mfLhzaT0t3RD+3xiUSqg@mail.gmail.com>
Message-ID: <CAOvn4qiheSBF0XRoMWiB2HKqf=YCiyP8v2dHv2Mi06a7gGwcDQ@mail.gmail.com>

On 28 January 2014 21:27, TARUN GABA <tarun.gaba7 at gmail.com> wrote:

> I want to kill a particular job, manually, when it exceeds running for
> more than a particular interval of time.. Is there any method in
> BackgroundJobManager to do that?


No, it uses threads, and there's no good way to kill a thread in Python.
However, if you can write your functions to check a variable at each step
in a loop and return if it's set, then you can stop them from the outside
that way.

Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140129/7257613d/attachment.html>

From zvoros at gmail.com  Wed Jan 29 15:17:41 2014
From: zvoros at gmail.com (=?ISO-8859-1?Q?Zolt=E1n_V=F6r=F6s?=)
Date: Wed, 29 Jan 2014 21:17:41 +0100
Subject: [IPython-dev] manipulating inline plots with widgets
Message-ID: <52E961E5.8010407@gmail.com>

Hi all,

First off, the new widget machinery is really exciting, I believe, it 
opens an entirely new dimension of user experience. Many thanks to all 
who have put in hard work to make this happen.

I have been playing around with a couple of gadgets, and in particular, 
I wanted to manipulate plots using the slider. The following works with 
the qt4 matplotlib backend (I guess, it would work with other backends, 
but that's off the point):

In[48]:     def on_value_change(name, value):
                     x = linspace(0, value, 100)
                     plot(x, sin(x))

In[49]:     fig, ax = subplots(1)
                 m1 = widgets.FloatSliderWidget()
                 m1.on_trait_change(on_value_change, 'value')
                 ax.plot(x, sin(x))
                 m1

However, I was wondering, whether there is a way of doing the same in 
the notebook. I have tried to pass ax as the keyword argument in the 
constructor of m1, but that doesn't seem to produce the desired results. 
Could someone comment on this?

Another issue I have noticed is that if the widgets are inserted in the 
notebook, it results in an erratic behaviour of the code cell. So, e.g., 
if I press Cntr-Enter on input line 49, and then pull the slider, and 
then click on ax.plot(x, sin(x)) with the mouse, the border of the cell 
becomes green, so I would assume that one can edit the cell at that 
point. But what happens instead is that the shortkeys bound to the 
inactive cell are invoked. So, if I press a, then a new code cell will 
be inserted above. The issue goes away, if I click on the cell once 
more. This behaviour I noticed on chrome v31. I can try other browsers, 
if that helps.

Thanks,

Zolt?n


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

From doug.blank at gmail.com  Wed Jan 29 15:44:06 2014
From: doug.blank at gmail.com (Doug Blank)
Date: Wed, 29 Jan 2014 15:44:06 -0500
Subject: [IPython-dev] Implementing inline images in a kernel
In-Reply-To: <CAH4pYpS3w1-cVONdTUuqGHuXUUpcaLy1KyFiTF47ByK6MFSUtA@mail.gmail.com>
References: <CAAusYCh057N9udHycA6ovMRUhhxTQi9=oyeEenPxFsN7822HJg@mail.gmail.com>
	<CAH4pYpT+BgP93BFud2FTySe4KT+VWOZN1jx_u43RVJ7zwXco4w@mail.gmail.com>
	<CAAusYCiC=yVXib5iqY3Wr6WC1ZXKZotMM0B=YCFwRgPANvNCng@mail.gmail.com>
	<CAHAreOpZi0eS0c788umYAkfyGK_dLoBQk-C=AHLsKxt-cPo7vw@mail.gmail.com>
	<CAAusYCigtC6YiuNWj3Pc1gv-VgTKVJhArOdoXsSwXD1=b7od6A@mail.gmail.com>
	<CAH4pYpR_ZFcSJXeQFKwSts=EMwNUuZkg1HJvtOQq69C=k2dh8Q@mail.gmail.com>
	<CAAusYCiUm75U4KZH=0gfoR5AdCRgCUG+fu2nTHzsZwkGg9XSUg@mail.gmail.com>
	<CAH4pYpSc_MrGZ=ZDqLohKubJE2NPekLVojOegg5_W94Q6UM8YQ@mail.gmail.com>
	<CAAusYCiPeBMLtRPh6nivtWii1nFUV_DuBs_NyY0RKkJQ0MM3FQ@mail.gmail.com>
	<CAH4pYpS3w1-cVONdTUuqGHuXUUpcaLy1KyFiTF47ByK6MFSUtA@mail.gmail.com>
Message-ID: <CAAusYCj-EQDRQ=Et6hm-DXPPNP4peSxOzDUK2XsMfvMF5SMuNw@mail.gmail.com>

On Wed, Jan 29, 2014 at 1:24 PM, Brian Granger <ellisonbg at gmail.com> wrote:

> > Calico interpreting whatever language shows the output intermittently
> > over the course of the 10 seconds, just like IPython running the
> > Python kernel. Calico doesn't "talk" to a Python backend... Calico
> > *is* Python, in a sense. And it is also Basic, Logo, etc. There isn't
> > one primary language talking to the others---there is just the thin
> > socket kernel talking to a specific language's eval function. But the
> > eval occurs in the "same space". Lower level calls to functions like
> > print() in the interpreted language's eval() inject messages to the
> > iopub stream. Even our Java works this way.
>
> Great, this is also how the %julia magic works. By having shared
> objects that can all access the same messaging layer, you co go a lot
> further. Asynchronous output (including rich) shouldn't be too bad.
> The important thing is that there be a common messaging API that all
> of the sub-kernels can access to send messages asynchronously. Tab
> completion might be a bit of a pain, but can probably be done with
> this approach as well.
>
> I think the widgets are going to be a bit more difficult. I think you
> will be able to get them working, but with some serious reinvention.
> What do I mean by that. We already have a relatively full set of
> Python widgets shipping with IPython 2.0. Other people will start to
> write 3rd party widgets for Python as well. But these use the IPython
> kernel implementation of the widget/comm infrastructure:
>
> https://github.com/ipython/ipython/wiki/IPEP-21%3A-Widget-Messages
>
> you will need to implement this layer in your main/sub kernels. The
> problem is that widgets in your kernels will need to use your layer
> for this. This means you will also have to re-implement the actual
> Python widgets to use your layer instead of the normal IPython one.
> You might be able to monkey patch things to get this stuff working,
> but it could be a serious amount of work. Over time, as the number and
> complexity of widgets grows, this will require a substantial effort to
> do.
>

Thanks for the link to that. This may not be an issue for us, because
Python is one of the languages we support. We should be able to re-use this
code. (There may still be issues, for example, we aren't using pyzmq (nor
any library based on C) but if it is just talking to a duck, we may be able
to be that duck). Other kernels may have a lot of work.


> > This is why I find some of the assumptions stated
> > confusing---insisting that "one language/one kernel" is the future
> > apparently misses some possibilities in design :) It may be that we
> > made unique design decisions. In any event, it appears that Calico
> > running scripts is very different in a fundamental way that IPython's
> > Python running the integrated Julia.
>
> There are two issues:
>
> * Can the meta kernel thing be done: depending on how it is designed,
> to some degree yes.
> * Does it make sense to create meta kernels: my own feeling is that it
> does not in general. Obviously, IPython, through cell magics does
> offer some of this in limited form. But we definitely don't have plans
> on trying to add things like tab completion+widgets to these cell
> magics. My main problem with meta kernels though is not technical, but
> conceptual. Most users, even very advanced ones, have plenty enough
> cognitive load when working with 1 programming language. To ask them
> to manage multiple languages in the same namespace is a huge ask that
> is probably DOA for all but the most advanced users.
>

We don't expect that most users will be using more than one programming
language. We just want to provide a choice to which one they do use. This
can be set at start time, so a user never even knows that their shell could
be changed to a different language, or that they could call a different
language during their processing.

I'm not sure what a "meta kernel" is. In Calico, there is no meta... it is
a flatspace. Perhaps it is better to just think of it as dynamically
changing the parser. In any event,  I have inline rich media working. I
fully expect that tab-completion and the widget interfaces will be two
things that we absolutely want to add. Tab-completion shouldn't be too bad
as all languages share a common object system. The widget interface may be
able to reuse the Python.... we'll see :)

On the topic of meta, it would be nice if the same magics could be used for
all kernels. What I mean is that it appears that shelling out to R, Bash,
and other kernels is done by the IPython kernel. We don't need to
reimplement shelling out to bash, but could rely on this layer to handle
those requests. But that is a topic for a different thread.

-Doug


>
> Cheers,
>
> Brian
>
> > I wonder what the best technical way to describe this difference is? I
> > guess that you had assumed some type of blocking behavior. Perhaps I
> > need a better way of describing how Calico operates. My question to
> > you is why does %julia block?
> >
> > -Doug
> >
> >> 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
> >> _______________________________________________
> >> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140129/b63f30e2/attachment.html>

From ellisonbg at gmail.com  Wed Jan 29 15:57:00 2014
From: ellisonbg at gmail.com (Brian Granger)
Date: Wed, 29 Jan 2014 12:57:00 -0800
Subject: [IPython-dev] Static widgets
In-Reply-To: <CA+-1RQT3hq_tAr3ErBkLzpBZrcz4hHuF7rSrX3Zsbp_wtffFyQ@mail.gmail.com>
References: <CA+-1RQR4o30bt5NjdgpgXMBBL6HPHaQnaOGMx7p_O5woJ-pDaA@mail.gmail.com>
	<52E946E7.4040606@gmail.com>
	<CAH4pYpTH0-A=S8Ms5_Kdg53tC1wPZpPQ1YoVJzOCypRT+vy3gw@mail.gmail.com>
	<CA+-1RQT3hq_tAr3ErBkLzpBZrcz4hHuF7rSrX3Zsbp_wtffFyQ@mail.gmail.com>
Message-ID: <CAH4pYpRn-o4L5YZ7y2hd40WugaAjbpyaPe7YLbNtUDRJRtWL+Q@mail.gmail.com>

I am pretty sure it is broken right now as we have made lots of
changes to the widget stuff since that prototype was done. But we will
probably have a pull request with work in progress open shortly after
2.0 is released.

Cheers,

Brian

On Wed, Jan 29, 2014 at 11:25 AM, Cyrille Rossant
<cyrille.rossant at gmail.com> wrote:
> Hi Brian,
>
> That's great news! Is this prototype available somewhere? I'd love to
> see how it works (even if the implementation is going to change, I
> suppose the general idea is already there).
>
> Cheers,
> Cyrille
>
> 2014-01-29 Brian Granger <ellisonbg at gmail.com>:
>> We have a prototype working, but it won't make it into 2.0. It is one
>> of the top tasks for 3.0 though. The basic idea is that it will be
>> possible to store widget messages in different storage backends:
>>
>> * in the .ipynb
>> * in a co-located directory alongside the notebook.
>> * ...
>>
>> nbconvert will be able to produce static html that knows how to
>> instantiate widgets from these store messages and nbviewer will be
>> made to work with all of these backends...
>>
>> we will get there...
>>
>> Cheers,
>>
>> Brian
>>
>> On Wed, Jan 29, 2014 at 10:22 AM, Raymond Yee <raymond.yee at gmail.com> wrote:
>>> I second the questions from Cyrille.  My naive mind thinks immediately
>>> of what Jake Vanderplas demonstrated in
>>> http://jakevdp.github.io/blog/2013/12/05/static-interactive-widgets/ --
>>> the ability to have the functionality of "static interactive widgets" is
>>> something I'd love to see in the realm of IPython widgets.
>>>
>>> Enthusiastically,
>>> -Raymond
>>>
>>> On 1/29/14 10:16 AM, Cyrille Rossant wrote:
>>>> Hi,
>>>>
>>>> I just tried the notebook widgets, and they look really great. I'm
>>>> wondering how widgets integrate with the nbformat, nbviewer,
>>>> nbconvert, etc. It seems to me that, currently, widgets are not saved
>>>> in .ipynb at all? It might be interesting to have the option to output
>>>> them statically in some sort (even if they do not interact with
>>>> anything).
>>>>
>>>> For instance, when viewing a notebook containing widgets on nbviewer,
>>>> those widgets do not appear at all. One needs to download and execute
>>>> the notebook in an IPython session to see how the widgets look like.
>>>>
>>>> More generally, I'm thinking about how one could create offline
>>>> interactive documents with IPython. A notebook containing widgets
>>>> could be converted in HTML with nbconvert. The HTML document would
>>>> contain Javascript placeholders for function callbacks, and one would
>>>> be free to write custom Javascript code responding to widget
>>>> interactivity (thereby replacing Python by Javascript in the
>>>> interaction loop). That would be really cool. Is that something that's
>>>> going to be possible at some point?
>>>>
>>>> Best,
>>>> Cyrille
>>>> _______________________________________________
>>>> 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


From gmbecker at ucdavis.edu  Wed Jan 29 16:02:05 2014
From: gmbecker at ucdavis.edu (Gabriel Becker)
Date: Wed, 29 Jan 2014 13:02:05 -0800
Subject: [IPython-dev] Implementing inline images in a kernel
In-Reply-To: <CAAusYCj-EQDRQ=Et6hm-DXPPNP4peSxOzDUK2XsMfvMF5SMuNw@mail.gmail.com>
References: <CAAusYCh057N9udHycA6ovMRUhhxTQi9=oyeEenPxFsN7822HJg@mail.gmail.com>
	<CAH4pYpT+BgP93BFud2FTySe4KT+VWOZN1jx_u43RVJ7zwXco4w@mail.gmail.com>
	<CAAusYCiC=yVXib5iqY3Wr6WC1ZXKZotMM0B=YCFwRgPANvNCng@mail.gmail.com>
	<CAHAreOpZi0eS0c788umYAkfyGK_dLoBQk-C=AHLsKxt-cPo7vw@mail.gmail.com>
	<CAAusYCigtC6YiuNWj3Pc1gv-VgTKVJhArOdoXsSwXD1=b7od6A@mail.gmail.com>
	<CAH4pYpR_ZFcSJXeQFKwSts=EMwNUuZkg1HJvtOQq69C=k2dh8Q@mail.gmail.com>
	<CAAusYCiUm75U4KZH=0gfoR5AdCRgCUG+fu2nTHzsZwkGg9XSUg@mail.gmail.com>
	<CAH4pYpSc_MrGZ=ZDqLohKubJE2NPekLVojOegg5_W94Q6UM8YQ@mail.gmail.com>
	<CAAusYCiPeBMLtRPh6nivtWii1nFUV_DuBs_NyY0RKkJQ0MM3FQ@mail.gmail.com>
	<CAH4pYpS3w1-cVONdTUuqGHuXUUpcaLy1KyFiTF47ByK6MFSUtA@mail.gmail.com>
	<CAAusYCj-EQDRQ=Et6hm-DXPPNP4peSxOzDUK2XsMfvMF5SMuNw@mail.gmail.com>
Message-ID: <CADwqtCN14edjQ+L7r4iVAW35fAwuYdJTt6GNC6OJfDcs8yw_pA@mail.gmail.com>

Doug,

A couple of notes.

The %%R magic does not shell out to R. Rather, it uses an embedded R
process via Laurent Gautier's rpy2 python library, which in turn uses R's
official embedding API.

Also, by "metakernel" Brian is referring to my previous email. As I
intended the term, it simply refers to a kernel handles dispatch to more
than one evaluator. The intent being so that you can have cells of multiple
different languages in the same notebook and process them all with the same
kernel.

~G


On Wed, Jan 29, 2014 at 12:44 PM, Doug Blank <doug.blank at gmail.com> wrote:

> On Wed, Jan 29, 2014 at 1:24 PM, Brian Granger <ellisonbg at gmail.com>wrote:
>
>> > Calico interpreting whatever language shows the output intermittently
>> > over the course of the 10 seconds, just like IPython running the
>> > Python kernel. Calico doesn't "talk" to a Python backend... Calico
>> > *is* Python, in a sense. And it is also Basic, Logo, etc. There isn't
>> > one primary language talking to the others---there is just the thin
>> > socket kernel talking to a specific language's eval function. But the
>> > eval occurs in the "same space". Lower level calls to functions like
>> > print() in the interpreted language's eval() inject messages to the
>> > iopub stream. Even our Java works this way.
>>
>> Great, this is also how the %julia magic works. By having shared
>> objects that can all access the same messaging layer, you co go a lot
>> further. Asynchronous output (including rich) shouldn't be too bad.
>> The important thing is that there be a common messaging API that all
>> of the sub-kernels can access to send messages asynchronously. Tab
>> completion might be a bit of a pain, but can probably be done with
>> this approach as well.
>>
>> I think the widgets are going to be a bit more difficult. I think you
>> will be able to get them working, but with some serious reinvention.
>> What do I mean by that. We already have a relatively full set of
>> Python widgets shipping with IPython 2.0. Other people will start to
>> write 3rd party widgets for Python as well. But these use the IPython
>> kernel implementation of the widget/comm infrastructure:
>>
>> https://github.com/ipython/ipython/wiki/IPEP-21%3A-Widget-Messages
>>
>> you will need to implement this layer in your main/sub kernels. The
>> problem is that widgets in your kernels will need to use your layer
>> for this. This means you will also have to re-implement the actual
>> Python widgets to use your layer instead of the normal IPython one.
>> You might be able to monkey patch things to get this stuff working,
>> but it could be a serious amount of work. Over time, as the number and
>> complexity of widgets grows, this will require a substantial effort to
>> do.
>>
>
> Thanks for the link to that. This may not be an issue for us, because
> Python is one of the languages we support. We should be able to re-use this
> code. (There may still be issues, for example, we aren't using pyzmq (nor
> any library based on C) but if it is just talking to a duck, we may be able
> to be that duck). Other kernels may have a lot of work.
>
>
>> > This is why I find some of the assumptions stated
>> > confusing---insisting that "one language/one kernel" is the future
>> > apparently misses some possibilities in design :) It may be that we
>> > made unique design decisions. In any event, it appears that Calico
>> > running scripts is very different in a fundamental way that IPython's
>> > Python running the integrated Julia.
>>
>> There are two issues:
>>
>> * Can the meta kernel thing be done: depending on how it is designed,
>> to some degree yes.
>> * Does it make sense to create meta kernels: my own feeling is that it
>> does not in general. Obviously, IPython, through cell magics does
>> offer some of this in limited form. But we definitely don't have plans
>> on trying to add things like tab completion+widgets to these cell
>> magics. My main problem with meta kernels though is not technical, but
>> conceptual. Most users, even very advanced ones, have plenty enough
>> cognitive load when working with 1 programming language. To ask them
>> to manage multiple languages in the same namespace is a huge ask that
>> is probably DOA for all but the most advanced users.
>>
>
> We don't expect that most users will be using more than one programming
> language. We just want to provide a choice to which one they do use. This
> can be set at start time, so a user never even knows that their shell could
> be changed to a different language, or that they could call a different
> language during their processing.
>
> I'm not sure what a "meta kernel" is. In Calico, there is no meta... it is
> a flatspace. Perhaps it is better to just think of it as dynamically
> changing the parser. In any event,  I have inline rich media working. I
> fully expect that tab-completion and the widget interfaces will be two
> things that we absolutely want to add. Tab-completion shouldn't be too bad
> as all languages share a common object system. The widget interface may be
> able to reuse the Python.... we'll see :)
>
> On the topic of meta, it would be nice if the same magics could be used
> for all kernels. What I mean is that it appears that shelling out to R,
> Bash, and other kernels is done by the IPython kernel. We don't need to
> reimplement shelling out to bash, but could rely on this layer to handle
> those requests. But that is a topic for a different thread.
>
> -Doug
>
>
>>
>> Cheers,
>>
>> Brian
>>
>> > I wonder what the best technical way to describe this difference is? I
>> > guess that you had assumed some type of blocking behavior. Perhaps I
>> > need a better way of describing how Calico operates. My question to
>> > you is why does %julia block?
>> >
>> > -Doug
>> >
>> >> 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
>> >> _______________________________________________
>> >> 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
>
>


-- 
Gabriel Becker
Graduate Student
Statistics Department
University of California, Davis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140129/fc7b09d8/attachment.html>

From doug.blank at gmail.com  Wed Jan 29 16:51:38 2014
From: doug.blank at gmail.com (Doug Blank)
Date: Wed, 29 Jan 2014 16:51:38 -0500
Subject: [IPython-dev] Implementing inline images in a kernel
In-Reply-To: <CADwqtCN14edjQ+L7r4iVAW35fAwuYdJTt6GNC6OJfDcs8yw_pA@mail.gmail.com>
References: <CAAusYCh057N9udHycA6ovMRUhhxTQi9=oyeEenPxFsN7822HJg@mail.gmail.com>
	<CAH4pYpT+BgP93BFud2FTySe4KT+VWOZN1jx_u43RVJ7zwXco4w@mail.gmail.com>
	<CAAusYCiC=yVXib5iqY3Wr6WC1ZXKZotMM0B=YCFwRgPANvNCng@mail.gmail.com>
	<CAHAreOpZi0eS0c788umYAkfyGK_dLoBQk-C=AHLsKxt-cPo7vw@mail.gmail.com>
	<CAAusYCigtC6YiuNWj3Pc1gv-VgTKVJhArOdoXsSwXD1=b7od6A@mail.gmail.com>
	<CAH4pYpR_ZFcSJXeQFKwSts=EMwNUuZkg1HJvtOQq69C=k2dh8Q@mail.gmail.com>
	<CAAusYCiUm75U4KZH=0gfoR5AdCRgCUG+fu2nTHzsZwkGg9XSUg@mail.gmail.com>
	<CAH4pYpSc_MrGZ=ZDqLohKubJE2NPekLVojOegg5_W94Q6UM8YQ@mail.gmail.com>
	<CAAusYCiPeBMLtRPh6nivtWii1nFUV_DuBs_NyY0RKkJQ0MM3FQ@mail.gmail.com>
	<CAH4pYpS3w1-cVONdTUuqGHuXUUpcaLy1KyFiTF47ByK6MFSUtA@mail.gmail.com>
	<CAAusYCj-EQDRQ=Et6hm-DXPPNP4peSxOzDUK2XsMfvMF5SMuNw@mail.gmail.com>
	<CADwqtCN14edjQ+L7r4iVAW35fAwuYdJTt6GNC6OJfDcs8yw_pA@mail.gmail.com>
Message-ID: <CAAusYCiMS-7UNPfj-js8modcZGy5jd5rMrak4tcDbBDzFrxfqw@mail.gmail.com>

On Wed, Jan 29, 2014 at 4:02 PM, Gabriel Becker <gmbecker at ucdavis.edu>wrote:

> Doug,
>
> A couple of notes.
>
> The %%R magic does not shell out to R. Rather, it uses an embedded R
> process via Laurent Gautier's rpy2 python library, which in turn uses R's
> official embedding API.
>
> Also, by "metakernel" Brian is referring to my previous email. As I
> intended the term, it simply refers to a kernel handles dispatch to more
> than one evaluator. The intent being so that you can have cells of multiple
> different languages in the same notebook and process them all with the same
> kernel.
>
>
Thanks for these. It is hard to talk about some of the details of the
interfaces in general. So, a "wrapped embedding" might be a better
description for R in IPython's Python. The "metakernel" term is a little
confusing, because it seems really to be a meta-evaluator, which is what
Calico is, I think. IPython's current behavior (say, routing R calls
*through* Python) is something different.

I was also thinking of a layer that dispatched calls to different kernels,
which wouldn't necessarily imply any wrapping, embedding, or shelling out.
The effect might look like the current behavior, but could be done by
routing code to different kernels. That sounds more like a metakernel... or
maybe just a dispatcher.

I see that the method that these different languages talk to each other,
exchange data, or have direct access to data and functions can vary widely.
 This discussion was useful to see that one can't make too many assumptions
of how things are implemented by looking at a notebook's output!

-Doug


> ~G
>
>
> On Wed, Jan 29, 2014 at 12:44 PM, Doug Blank <doug.blank at gmail.com> wrote:
>
>> On Wed, Jan 29, 2014 at 1:24 PM, Brian Granger <ellisonbg at gmail.com>wrote:
>>
>>> > Calico interpreting whatever language shows the output intermittently
>>> > over the course of the 10 seconds, just like IPython running the
>>> > Python kernel. Calico doesn't "talk" to a Python backend... Calico
>>> > *is* Python, in a sense. And it is also Basic, Logo, etc. There isn't
>>> > one primary language talking to the others---there is just the thin
>>> > socket kernel talking to a specific language's eval function. But the
>>> > eval occurs in the "same space". Lower level calls to functions like
>>> > print() in the interpreted language's eval() inject messages to the
>>> > iopub stream. Even our Java works this way.
>>>
>>> Great, this is also how the %julia magic works. By having shared
>>> objects that can all access the same messaging layer, you co go a lot
>>> further. Asynchronous output (including rich) shouldn't be too bad.
>>> The important thing is that there be a common messaging API that all
>>> of the sub-kernels can access to send messages asynchronously. Tab
>>> completion might be a bit of a pain, but can probably be done with
>>> this approach as well.
>>>
>>> I think the widgets are going to be a bit more difficult. I think you
>>> will be able to get them working, but with some serious reinvention.
>>> What do I mean by that. We already have a relatively full set of
>>> Python widgets shipping with IPython 2.0. Other people will start to
>>> write 3rd party widgets for Python as well. But these use the IPython
>>> kernel implementation of the widget/comm infrastructure:
>>>
>>> https://github.com/ipython/ipython/wiki/IPEP-21%3A-Widget-Messages
>>>
>>> you will need to implement this layer in your main/sub kernels. The
>>> problem is that widgets in your kernels will need to use your layer
>>> for this. This means you will also have to re-implement the actual
>>> Python widgets to use your layer instead of the normal IPython one.
>>> You might be able to monkey patch things to get this stuff working,
>>> but it could be a serious amount of work. Over time, as the number and
>>> complexity of widgets grows, this will require a substantial effort to
>>> do.
>>>
>>
>> Thanks for the link to that. This may not be an issue for us, because
>> Python is one of the languages we support. We should be able to re-use this
>> code. (There may still be issues, for example, we aren't using pyzmq (nor
>> any library based on C) but if it is just talking to a duck, we may be able
>> to be that duck). Other kernels may have a lot of work.
>>
>>
>>> > This is why I find some of the assumptions stated
>>> > confusing---insisting that "one language/one kernel" is the future
>>> > apparently misses some possibilities in design :) It may be that we
>>> > made unique design decisions. In any event, it appears that Calico
>>> > running scripts is very different in a fundamental way that IPython's
>>> > Python running the integrated Julia.
>>>
>>> There are two issues:
>>>
>>> * Can the meta kernel thing be done: depending on how it is designed,
>>> to some degree yes.
>>> * Does it make sense to create meta kernels: my own feeling is that it
>>> does not in general. Obviously, IPython, through cell magics does
>>> offer some of this in limited form. But we definitely don't have plans
>>> on trying to add things like tab completion+widgets to these cell
>>> magics. My main problem with meta kernels though is not technical, but
>>> conceptual. Most users, even very advanced ones, have plenty enough
>>> cognitive load when working with 1 programming language. To ask them
>>> to manage multiple languages in the same namespace is a huge ask that
>>> is probably DOA for all but the most advanced users.
>>>
>>
>> We don't expect that most users will be using more than one programming
>> language. We just want to provide a choice to which one they do use. This
>> can be set at start time, so a user never even knows that their shell could
>> be changed to a different language, or that they could call a different
>> language during their processing.
>>
>> I'm not sure what a "meta kernel" is. In Calico, there is no meta... it
>> is a flatspace. Perhaps it is better to just think of it as dynamically
>> changing the parser. In any event,  I have inline rich media working. I
>> fully expect that tab-completion and the widget interfaces will be two
>> things that we absolutely want to add. Tab-completion shouldn't be too bad
>> as all languages share a common object system. The widget interface may be
>> able to reuse the Python.... we'll see :)
>>
>> On the topic of meta, it would be nice if the same magics could be used
>> for all kernels. What I mean is that it appears that shelling out to R,
>> Bash, and other kernels is done by the IPython kernel. We don't need to
>> reimplement shelling out to bash, but could rely on this layer to handle
>> those requests. But that is a topic for a different thread.
>>
>> -Doug
>>
>>
>>>
>>> Cheers,
>>>
>>> Brian
>>>
>>> > I wonder what the best technical way to describe this difference is? I
>>> > guess that you had assumed some type of blocking behavior. Perhaps I
>>> > need a better way of describing how Calico operates. My question to
>>> > you is why does %julia block?
>>> >
>>> > -Doug
>>> >
>>> >> 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
>>> >> _______________________________________________
>>> >> 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
>>
>>
>
>
> --
> Gabriel Becker
> Graduate Student
> Statistics Department
> University of California, Davis
>
> _______________________________________________
> 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/20140129/8a114453/attachment.html>

From fperez.net at gmail.com  Wed Jan 29 18:03:25 2014
From: fperez.net at gmail.com (Fernando Perez)
Date: Wed, 29 Jan 2014 15:03:25 -0800
Subject: [IPython-dev] Implementing inline images in a kernel
In-Reply-To: <CAAusYCiMS-7UNPfj-js8modcZGy5jd5rMrak4tcDbBDzFrxfqw@mail.gmail.com>
References: <CAAusYCh057N9udHycA6ovMRUhhxTQi9=oyeEenPxFsN7822HJg@mail.gmail.com>
	<CAH4pYpT+BgP93BFud2FTySe4KT+VWOZN1jx_u43RVJ7zwXco4w@mail.gmail.com>
	<CAAusYCiC=yVXib5iqY3Wr6WC1ZXKZotMM0B=YCFwRgPANvNCng@mail.gmail.com>
	<CAHAreOpZi0eS0c788umYAkfyGK_dLoBQk-C=AHLsKxt-cPo7vw@mail.gmail.com>
	<CAAusYCigtC6YiuNWj3Pc1gv-VgTKVJhArOdoXsSwXD1=b7od6A@mail.gmail.com>
	<CAH4pYpR_ZFcSJXeQFKwSts=EMwNUuZkg1HJvtOQq69C=k2dh8Q@mail.gmail.com>
	<CAAusYCiUm75U4KZH=0gfoR5AdCRgCUG+fu2nTHzsZwkGg9XSUg@mail.gmail.com>
	<CAH4pYpSc_MrGZ=ZDqLohKubJE2NPekLVojOegg5_W94Q6UM8YQ@mail.gmail.com>
	<CAAusYCiPeBMLtRPh6nivtWii1nFUV_DuBs_NyY0RKkJQ0MM3FQ@mail.gmail.com>
	<CAH4pYpS3w1-cVONdTUuqGHuXUUpcaLy1KyFiTF47ByK6MFSUtA@mail.gmail.com>
	<CAAusYCj-EQDRQ=Et6hm-DXPPNP4peSxOzDUK2XsMfvMF5SMuNw@mail.gmail.com>
	<CADwqtCN14edjQ+L7r4iVAW35fAwuYdJTt6GNC6OJfDcs8yw_pA@mail.gmail.com>
	<CAAusYCiMS-7UNPfj-js8modcZGy5jd5rMrak4tcDbBDzFrxfqw@mail.gmail.com>
Message-ID: <CAHAreOqA4CO_mov8jW-ns7FW7Lg6t6Oj9EB=t8NwAaGVDqNSdg@mail.gmail.com>

Hi all,

A bit of additional context, not in response to any particular message but
just providing some extra info on where we come from...

I think it's worth looking at where the one notebook-one kernel assumption
we're trying to maintain comes from, why that's our stance, and why it does
*not* really limit much what others can do in terms of exploring new
approaches to interactive computing with IPython.

By keeping the notion of a *single*, 'official' kernel attached to a
notebook, we have a very clear and manageable model for our entire backend
infrastructure in terms of how the KernelManager has to be written, what
metadata has to go into the notebook files, how a new kernel can be
registered (see here -
https://hackpad.com/IPython-Winter-2014-Development-Meeting-fKrExqKCWmC#:h=Full,-integrated-support-for-n),
etc.

If we were to allow a notebook to directly expose potentially multiple
kernels, then *we* have to carry the burden of managing a cohort of
processes, tracking/killing all of them, handling signals to all of them,
having our server mange groups of sockets (a complete set per kernel), etc.
 We have to record that in the notebook files, define specs for kernel
groups, etc.  That complexity actually propagates pretty deeply across all
the pieces of IPython, and if there's one thing that unfortunately can't be
said about IPython, it's that it is in any way, shape or form, a 'simple'
project :)

Remember: we have a small team that is trying to build something very
ambitious, that walks a delicate line. This is a research project exploring
new modes of computational interaction and communication (from individuals
playing with their code to teaching, publication and book writing). But
*simultaneously*, it is a *production* tool being used at high schools,
universities, research facilities and companies.  That tension is always
there for us: we want to be able to try and explore novel ideas, yet we
can't simply hack something crazy that turns out to be a maintenance
nightmare in the future, because this isn't just 'research code', it's a
real-world production tool.

But in this context, we've seen how even the *current* design doesn't
preclude offering multiple languages to the end user, and even doing so in
various forms. IPython provides a number of magics (either built-in or
through extensions) that allow you to mix and match languages in several
ways:

- %%bash, %%perl and the like all fire a new subprocess call each time,
with zero persistent state between calls, and simply capture stdout/err and
print it back.

- %%julia, %%R and similar initialize a persistent sub-interpreter
in-process, with various degrees of in-memory data sharing.

- %%matlab and others initialize their interpreters out-of-process,
communicating with them via pipes, http or whatever other IPC mechanism
each uses.

- %%cython, %%fortran and similar just offer *compilation* of static code
fragments that then get loaded into the current interactive namespace for
reuse.

Because we chose the approach of using explicit %%cell magics, each
language is explicitly tagged at the top of the cell, and it's easy to know
what you're doing just from looking at the cell.  We're happy with that
model as it does provide easy access to lots of languages in a single
session when appropriate. For example, I often do sprinkle shell calls, and
I know people whose toolchain involves many command-line tools they can't
abandon use this extensively.

Now, Calico offers a different model, where the 'main' kernel is a much
thinner layer that basically just multiplexes, but where all its 'real
kernels' are all coexisting in-process. Given it's JVM-based, I actually
imagine with some careful coding all subkernels could work asynchronously
just fine, as long as they all manage correctly access to the necessary
messaging queues. The JVM has great threading support, and if each
subkernel runs in its own thread and doesn't block the 'main' kernel, the
whole thing could work even with full asynchronous feature support.

I think this shows that our current approach balances what we want
reasonably well:

1. the model we expose to end users is simple (one kernel) and contains
complexity for us as a project

2. the IPython kernel, via %%magics, provides a pragmatic (if limited, no
async operations in sublanguages, etc) solution for many common cases of
language mix-and-match that have real-world value.

3. other projects can still explore more ambitious and complex models of
execution, as Calico is rapidly demonstrating.


Honestly, I would say the above is *in general* our philosophy with IPython
(not just talking about kernels). I would rephrase the above three points
as part of our project guiding principles:

1. Build a coherent, as-simple-as-possible set of common abstractions we
can manage robustly and sustainably for the long haul.

2. Provide default, out-of-the-box tools on top of these abstractions that
solve many real-world problems, shipped officially as part of IPython.

3. Have these foundational abstractions be rich enough that we enable
third-party projects to explore novel, more ambitious directions on top of
them.  Some of those explorations may even come from our own team, but they
will happen outside the core codebase.


I hope this helps everyone understand better where we're coming from...

I should end by saying that at least I am *thrilled* to see this kind of
exploration, and we're always happy to see these kinds of ideas. We're also
receptive to such novel ideas potentially influencing the future of the
core, but only once it becomes clear that an exploratory direction really
proves to be generic, widely applicable and easy to manage and maintain.

Best,

f
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140129/8689ca52/attachment.html>

From asmeurer at gmail.com  Wed Jan 29 19:35:54 2014
From: asmeurer at gmail.com (Aaron Meurer)
Date: Wed, 29 Jan 2014 18:35:54 -0600
Subject: [IPython-dev] Spell check with the new modal input?
In-Reply-To: <CA+0EHHqE8pZZGrPjHy0M6hG76Bo8Gh8teiuBapQ4NSG56Mptdw@mail.gmail.com>
References: <53526623b13a4351be72dfd44d5fdb4a@BLUPR01MB306.prod.exchangelabs.com>
	<CAH+mRR1mN0urSV8XBxd872d9brC4PqOvES7BVz3Cr2Nhv6vOXg@mail.gmail.com>
	<CAKgW=6+FR729BSVQn5ob6xv=1pW6QG-n4w=3P9QcQqhPxwq8bw@mail.gmail.com>
	<CAH4pYpT8uCsGBvQ+fGEC405d52K0jprZbCyChxNxUmikXZ2iyQ@mail.gmail.com>
	<CAH+mRR0SHuiCwFbfAQzE5T4X-sP7N6Kvq_88w0T5D8rMT745HQ@mail.gmail.com>
	<CAH2VmmD4dgRDGs81S6sZyG2OS8PWjkrmGv2XAxzrazRHSZrHCQ@mail.gmail.com>
	<CA+0EHHqE8pZZGrPjHy0M6hG76Bo8Gh8teiuBapQ4NSG56Mptdw@mail.gmail.com>
Message-ID: <CAKgW=6JzVA6+O7dt052br5acaCxk0wAspYyHe1SGpx0sG88U+w@mail.gmail.com>

So is the impetus on the web browsers to allow spell checking on a
broader class of text fields? I know very little about Javascript and
how web browsers work, but it sounds like if there were a way to fix
this from the IPython or codemirror side, it would be done already. I
just checked, and it seems that ACE has the same problem.

A Chrome extension would be awesome. It probably could be done more
generally than just IPython, allowing spell checking in any
codemirror, ace, ... box. Ideally it would use the system spell
checker rather than some cooked up one (the Chrome checker that uses
Google for suggestions is the best one I've ever used).

Aaron Meurer

On Wed, Jan 29, 2014 at 8:16 AM, mcburton <mcburton at umich.edu> wrote:
> Spellchecking with Codemirror is a big issue for other projects as well. The
> Ghost blogging platform is wrestling with the same issue. I believe their
> proposed solution is to implement their own editor. I think someone has also
> brewed up a Chrome extension for Ghost that works similar to the one Dami?n
> made (thanks Dami?n!).
>
> Creating a new editor doesn't seem to make sense here and I'm pretty sure
> the IPython team has their hands full without implementing a new code/text
> editor (although it would be interesting to consider different editors for
> different kinds of cells).
>
> I have heard of some people building spellcheck into Codemirror using
> typo.js. There is a Stackoverflow thread about it here. There are issues
> with typo.js (limited dictionaries, no unicode), which have been discussed
> on Github. So sadly it seems like there is no easy solution. :/ Classic case
> of technical debt everyone must carry.
>
> --
> mcb
>
>
> On Wed, Jan 29, 2014 at 5:27 AM, Filipe Pires Alvarenga Fernandes
> <ocefpaf at gmail.com> wrote:
>>
>> Hi Dami?n,
>>
>> Nice extension!  Did not know about it.  I was using firefox+"It's all
>> text" before to open the text cells into a text editor.
>>
>> Thanks,
>>
>> -Filipe
>>
>>
>> On Tue, Jan 28, 2014 at 11:25 PM, Dami?n Avila <damianavila at gmail.com>
>> wrote:
>>>
>>> The problems comes from the codemirror instance itself... in fact there
>>> is no a "common" text area, so... your browser do not know how to spellcheck
>>> something that did not exist as a text area (although it looks like one).
>>> It is no so difficult to do find an "optimal" solution with codemirror
>>> layouts, but you need to know how to apply it, and you will also need a js
>>> library which perform the spellcheck... so, because I wanted something
>>> useful very quickly, I developed the extension I linked before... It is not
>>> the best solution, I know, but I can spell check now  (in a "poor man" way
>>> ;-))
>>>
>>>
>>> 2014-01-28 Brian Granger <ellisonbg at gmail.com>
>>>
>>>> The new modal UI was a very targeted effort to fix/improve one part of
>>>> the experience. Definitely not related to spellchecking in any way.
>>>> Sorry.
>>>>
>>>> Brian
>>>>
>>>> On Tue, Jan 28, 2014 at 4:59 PM, Aaron Meurer <asmeurer at gmail.com>
>>>> wrote:
>>>> > Hmm, I was hoping the new UI would have fixed this. I tend to avoid
>>>> > the notebook because of this.
>>>> >
>>>> > Aaron Meurer
>>>> >
>>>> > On Tue, Jan 28, 2014 at 2:05 PM, Dami?n Avila <damianavila at gmail.com>
>>>> > wrote:
>>>> >> There is no easy way to spellcheck codemirror instances, well...
>>>> >> there is a
>>>> >> way using a codemirror layout... but you have to deal with it...
>>>> >>
>>>> >> As a workaround, I develop an nbextension to spellcheck your cell
>>>> >> content.
>>>> >> You have the details here:
>>>> >>
>>>> >> http://www.damian.oquanta.info/posts/a-poor-man-spell-checker-for-the-ipython-notebook.html
>>>> >>
>>>> >> Hope it helps!
>>>> >>
>>>> >>
>>>> >> 2014-01-28 Toby Burnett <tburnett at myuw.net>
>>>> >>>
>>>> >>> I'm happily using the new modal input in 2.0-dev, very nice,
>>>> >>> especially as
>>>> >>> my fingers get trained. J
>>>> >>>
>>>> >>> But I'm used to writing text with spell check, and wondered if there
>>>> >>> was a
>>>> >>> way to get that. Chrome will do it, but only in a "text field" and a
>>>> >>> markdown cell does not count, I guess.
>>>> >>>
>>>> >>>
>>>> >>>
>>>> >>> --Toby Burnett
>>>> >>>
>>>> >>>
>>>> >>> _______________________________________________
>>>> >>> IPython-dev mailing list
>>>> >>> IPython-dev at scipy.org
>>>> >>> http://mail.scipy.org/mailman/listinfo/ipython-dev
>>>> >>>
>>>> >>
>>>> >>
>>>> >>
>>>> >> --
>>>> >> Dami?n Avila
>>>> >> Scientific Python Developer
>>>> >> Quantitative Finance Analyst
>>>> >> Statistics, Biostatistics and Econometrics Consultant
>>>> >> Biochemist
>>>> >>
>>>> >> _______________________________________________
>>>> >> 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
>>>
>>>
>>>
>>>
>>> --
>>> Dami?n Avila
>>> Scientific Python Developer
>>> Quantitative Finance Analyst
>>> Statistics, Biostatistics and Econometrics Consultant
>>> Biochemist
>>>
>>> _______________________________________________
>>> 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
>


From ellisonbg at gmail.com  Wed Jan 29 21:16:24 2014
From: ellisonbg at gmail.com (Brian Granger)
Date: Wed, 29 Jan 2014 18:16:24 -0800
Subject: [IPython-dev] manipulating inline plots with widgets
In-Reply-To: <52E961E5.8010407@gmail.com>
References: <52E961E5.8010407@gmail.com>
Message-ID: <CAH4pYpQ_OYanKi1+5NCWU-AZ=eCQNvsn6pJ7zgW2dY=F56BzKQ@mail.gmail.com>

Can you file an issue on GitHub for this? Thanks!

On Wed, Jan 29, 2014 at 12:17 PM, Zolt?n V?r?s <zvoros at gmail.com> wrote:
> Hi all,
>
> First off, the new widget machinery is really exciting, I believe, it opens
> an entirely new dimension of user experience. Many thanks to all who have
> put in hard work to make this happen.
>
> I have been playing around with a couple of gadgets, and in particular, I
> wanted to manipulate plots using the slider. The following works with the
> qt4 matplotlib backend (I guess, it would work with other backends, but
> that's off the point):
>
> In[48]:     def on_value_change(name, value):
>                     x = linspace(0, value, 100)
>                     plot(x, sin(x))
>
> In[49]:     fig, ax = subplots(1)
>                 m1 = widgets.FloatSliderWidget()
>                 m1.on_trait_change(on_value_change, 'value')
>                 ax.plot(x, sin(x))
>                 m1
>
> However, I was wondering, whether there is a way of doing the same in the
> notebook. I have tried to pass ax as the keyword argument in the constructor
> of m1, but that doesn't seem to produce the desired results. Could someone
> comment on this?
>
> Another issue I have noticed is that if the widgets are inserted in the
> notebook, it results in an erratic behaviour of the code cell. So, e.g., if
> I press Cntr-Enter on input line 49, and then pull the slider, and then
> click on ax.plot(x, sin(x)) with the mouse, the border of the cell becomes
> green, so I would assume that one can edit the cell at that point. But what
> happens instead is that the shortkeys bound to the inactive cell are
> invoked. So, if I press a, then a new code cell will be inserted above. The
> issue goes away, if I click on the cell once more. This behaviour I noticed
> on chrome v31. I can try other browsers, if that helps.
>
> Thanks,
>
> Zolt?n
>
>
>
> _______________________________________________
> 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


From zvoros at gmail.com  Thu Jan 30 02:27:57 2014
From: zvoros at gmail.com (=?ISO-8859-1?Q?Zolt=E1n_V=F6r=F6s?=)
Date: Thu, 30 Jan 2014 08:27:57 +0100
Subject: [IPython-dev] manipulating inline plots with widgets
In-Reply-To: <CAH4pYpQ_OYanKi1+5NCWU-AZ=eCQNvsn6pJ7zgW2dY=F56BzKQ@mail.gmail.com>
References: <52E961E5.8010407@gmail.com>
	<CAH4pYpQ_OYanKi1+5NCWU-AZ=eCQNvsn6pJ7zgW2dY=F56BzKQ@mail.gmail.com>
Message-ID: <52E9FEFD.1050409@gmail.com>

Hi Brian,


On 30/01/14 03:16, Brian Granger wrote:
> Can you file an issue on GitHub for this? Thanks!
You mean the issue with the shortkeys, and not the issue with plotting, 
don't you?

Zolt?n

>
> On Wed, Jan 29, 2014 at 12:17 PM, Zolt?n V?r?s <zvoros at gmail.com> wrote:
>> Hi all,
>>
>> First off, the new widget machinery is really exciting, I believe, it opens
>> an entirely new dimension of user experience. Many thanks to all who have
>> put in hard work to make this happen.
>>
>> I have been playing around with a couple of gadgets, and in particular, I
>> wanted to manipulate plots using the slider. The following works with the
>> qt4 matplotlib backend (I guess, it would work with other backends, but
>> that's off the point):
>>
>> In[48]:     def on_value_change(name, value):
>>                      x = linspace(0, value, 100)
>>                      plot(x, sin(x))
>>
>> In[49]:     fig, ax = subplots(1)
>>                  m1 = widgets.FloatSliderWidget()
>>                  m1.on_trait_change(on_value_change, 'value')
>>                  ax.plot(x, sin(x))
>>                  m1
>>
>> However, I was wondering, whether there is a way of doing the same in the
>> notebook. I have tried to pass ax as the keyword argument in the constructor
>> of m1, but that doesn't seem to produce the desired results. Could someone
>> comment on this?
>>
>> Another issue I have noticed is that if the widgets are inserted in the
>> notebook, it results in an erratic behaviour of the code cell. So, e.g., if
>> I press Cntr-Enter on input line 49, and then pull the slider, and then
>> click on ax.plot(x, sin(x)) with the mouse, the border of the cell becomes
>> green, so I would assume that one can edit the cell at that point. But what
>> happens instead is that the shortkeys bound to the inactive cell are
>> invoked. So, if I press a, then a new code cell will be inserted above. The
>> issue goes away, if I click on the cell once more. This behaviour I noticed
>> on chrome v31. I can try other browsers, if that helps.
>>
>> Thanks,
>>
>> Zolt?n
>>
>>
>>
>> _______________________________________________
>> 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/20140130/c610479c/attachment.html>

From matthias at matthias-k.org  Thu Jan 30 11:02:07 2014
From: matthias at matthias-k.org (Matthias =?ISO-8859-1?Q?K=FCmmerer?=)
Date: Thu, 30 Jan 2014 17:02:07 +0100
Subject: [IPython-dev] fancyboxes in IPython Notebooks
In-Reply-To: <C1B4F469-AA82-44BB-B503-9E7AAE765BBD@gmail.com>
References: <1730399.HYKpIib2F9@klio> <3967931.qfdihfrsKB@klio>
	<C1B4F469-AA82-44BB-B503-9E7AAE765BBD@gmail.com>
Message-ID: <2559570.S8g32agkV4@klio>

On Monday, January 27, 2014 17:12:47 Matthias BUSSONNIER wrote:
> Le 27 janv. 2014 ? 16:56, Matthias K?mmerer a ?crit :
> > Hi,
> > 
> > sorry for the long delay.
> > 
> >> We should probably have an event that fires after the markdown cell is
> >> rendered that third party extensions can handle for things like this.
> > 
> > okay. If I have seen correctly, this event is not yet there? Can I help to
> > implement it in some way?
> 
> Yes, I suppose you would write JS around here[1] I guess.
> 
> [1]
> https://github.com/ipython/ipython/blob/master/IPython/html/static/notebook
> /js/textcell.js#L366

Great, thanks a lot. I added an event and my extension is already working. If 
that's okay for you, I will be happy to open a pull request for this. The 
feature might be interesting for other people as well.

I did not find any information on your naming convention for events. I called 
the event "markdown_rendered.Cell". Is that okay? Maybe 
"markdown_rendered.MarkdownCell" is better...

Best,
  Matthias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140130/df32cde6/attachment.sig>

From ellisonbg at gmail.com  Thu Jan 30 12:09:55 2014
From: ellisonbg at gmail.com (Brian Granger)
Date: Thu, 30 Jan 2014 09:09:55 -0800
Subject: [IPython-dev] manipulating inline plots with widgets
In-Reply-To: <52E9FEFD.1050409@gmail.com>
References: <52E961E5.8010407@gmail.com>
	<CAH4pYpQ_OYanKi1+5NCWU-AZ=eCQNvsn6pJ7zgW2dY=F56BzKQ@mail.gmail.com>
	<52E9FEFD.1050409@gmail.com>
Message-ID: <CAH4pYpTw1ESj0ap-B74-TTHnt+durcdGoWPeOH8PSG-TXyHoog@mail.gmail.com>

Can you file two separate issues: 1) the plotting stuff - I think we
have a bug in that 2) the shortcuts, etc.

Thanks!

Brian

On Wed, Jan 29, 2014 at 11:27 PM, Zolt?n V?r?s <zvoros at gmail.com> wrote:
> Hi Brian,
>
>
> On 30/01/14 03:16, Brian Granger wrote:
>
> Can you file an issue on GitHub for this? Thanks!
>
> You mean the issue with the shortkeys, and not the issue with plotting,
> don't you?
>
> Zolt?n
>
>
> On Wed, Jan 29, 2014 at 12:17 PM, Zolt?n V?r?s <zvoros at gmail.com> wrote:
>
> Hi all,
>
> First off, the new widget machinery is really exciting, I believe, it opens
> an entirely new dimension of user experience. Many thanks to all who have
> put in hard work to make this happen.
>
> I have been playing around with a couple of gadgets, and in particular, I
> wanted to manipulate plots using the slider. The following works with the
> qt4 matplotlib backend (I guess, it would work with other backends, but
> that's off the point):
>
> In[48]:     def on_value_change(name, value):
>                     x = linspace(0, value, 100)
>                     plot(x, sin(x))
>
> In[49]:     fig, ax = subplots(1)
>                 m1 = widgets.FloatSliderWidget()
>                 m1.on_trait_change(on_value_change, 'value')
>                 ax.plot(x, sin(x))
>                 m1
>
> However, I was wondering, whether there is a way of doing the same in the
> notebook. I have tried to pass ax as the keyword argument in the constructor
> of m1, but that doesn't seem to produce the desired results. Could someone
> comment on this?
>
> Another issue I have noticed is that if the widgets are inserted in the
> notebook, it results in an erratic behaviour of the code cell. So, e.g., if
> I press Cntr-Enter on input line 49, and then pull the slider, and then
> click on ax.plot(x, sin(x)) with the mouse, the border of the cell becomes
> green, so I would assume that one can edit the cell at that point. But what
> happens instead is that the shortkeys bound to the inactive cell are
> invoked. So, if I press a, then a new code cell will be inserted above. The
> issue goes away, if I click on the cell once more. This behaviour I noticed
> on chrome v31. I can try other browsers, if that helps.
>
> Thanks,
>
> Zolt?n
>
>
>
> _______________________________________________
> 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


From zvoros at gmail.com  Thu Jan 30 12:30:37 2014
From: zvoros at gmail.com (=?ISO-8859-1?Q?Zolt=E1n_V=F6r=F6s?=)
Date: Thu, 30 Jan 2014 18:30:37 +0100
Subject: [IPython-dev] manipulating inline plots with widgets
In-Reply-To: <CAH4pYpTw1ESj0ap-B74-TTHnt+durcdGoWPeOH8PSG-TXyHoog@mail.gmail.com>
References: <52E961E5.8010407@gmail.com>	<CAH4pYpQ_OYanKi1+5NCWU-AZ=eCQNvsn6pJ7zgW2dY=F56BzKQ@mail.gmail.com>	<52E9FEFD.1050409@gmail.com>
	<CAH4pYpTw1ESj0ap-B74-TTHnt+durcdGoWPeOH8PSG-TXyHoog@mail.gmail.com>
Message-ID: <52EA8C3D.5010407@gmail.com>

Hi Brian,

Thanks for the feedback! I have just created two issues, which I include 
here for reference. Otherwise, the widgets are really cool stuff:)

https://github.com/ipython/ipython/issues/4958
https://github.com/ipython/ipython/issues/4959

Cheers,
Zolt?n


On 30/01/14 18:09, Brian Granger wrote:
> Can you file two separate issues: 1) the plotting stuff - I think we
> have a bug in that 2) the shortcuts, etc.
>
> Thanks!
>
> Brian
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140130/4ccd775f/attachment.html>

From ellisonbg at gmail.com  Thu Jan 30 12:50:36 2014
From: ellisonbg at gmail.com (Brian Granger)
Date: Thu, 30 Jan 2014 09:50:36 -0800
Subject: [IPython-dev] manipulating inline plots with widgets
In-Reply-To: <52EA8C3D.5010407@gmail.com>
References: <52E961E5.8010407@gmail.com>
	<CAH4pYpQ_OYanKi1+5NCWU-AZ=eCQNvsn6pJ7zgW2dY=F56BzKQ@mail.gmail.com>
	<52E9FEFD.1050409@gmail.com>
	<CAH4pYpTw1ESj0ap-B74-TTHnt+durcdGoWPeOH8PSG-TXyHoog@mail.gmail.com>
	<52EA8C3D.5010407@gmail.com>
Message-ID: <CAH4pYpR7SBKr64zaAquwQrP9-=Wrtmc=zMBBBCNy7-cpn-pttg@mail.gmail.com>

Great, thanks!

Brian

On Thu, Jan 30, 2014 at 9:30 AM, Zolt?n V?r?s <zvoros at gmail.com> wrote:
> Hi Brian,
>
> Thanks for the feedback! I have just created two issues, which I include
> here for reference. Otherwise, the widgets are really cool stuff:)
>
> https://github.com/ipython/ipython/issues/4958
> https://github.com/ipython/ipython/issues/4959
>
> Cheers,
> Zolt?n
>
>
> On 30/01/14 18:09, Brian Granger wrote:
>
> Can you file two separate issues: 1) the plotting stuff - I think we
> have a bug in that 2) the shortcuts, etc.
>
> Thanks!
>
> Brian
>
>
>
> _______________________________________________
> 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


From maplabs at light42.com  Thu Jan 30 23:34:14 2014
From: maplabs at light42.com (maplabs at light42.com)
Date: Thu, 30 Jan 2014 20:34:14 -0800
Subject: [IPython-dev] Cartopy - was maps inline
Message-ID: <20140130203414.495our33k04c804w@webmail.light42.com>

?people may be aware of this project:

?? https://github.com/SciTools/cartopy

they seem to use iPython-notebook a *lot* .. 

--
Brian M Hamlin
OSGeo California Chapter
blog.light42.com



From stephenbailey at lbl.gov  Fri Jan 31 14:41:06 2014
From: stephenbailey at lbl.gov (Stephen Bailey)
Date: Fri, 31 Jan 2014 11:41:06 -0800
Subject: [IPython-dev] automatically invoking ipython parallel workers
Message-ID: <CAMCHcTpf0-uMVHtKasZgUvTaEgcoRkztGmpq3D-tgva56tVYzQ@mail.gmail.com>

Hi IPythoners,

I'd like to write an IPython-parallelized program that hides all the
details from the user, i.e. doesn't require them to run ipcluster first.
 If they have a set of workers running already, great, use that, but
otherwise the program should spin up the workers automatically, use them,
and then shut them down at the end.  Something like:
from IPython.parallel import Clienttry:    c = Client()
need_to_stop_workers = Falseexcept IOError:    # [Start workers as if
"ipcluster start -n X" was run]    # ...    need_to_stop_workers = True
c = Client()
# ...
if need_to_stop_workers:    # [Stop workers]
Exploring what ipcluster is doing, it looks like it boils down to parsing
sys.argv pretty deep in the call tree rather than at the top level and then
passing arguments in to
IPython.parallel.apps.ipclusterapp.launch_new_instance().   I found that I
could modify sys.argv and then run launch_new_instance(), but then I didn't
know how to kill the workers without resorting to unix "kill".  And I'd
much rather just call some function with arguments rather than mucking with
sys.argv as a global variable to achieve argument passing.
Is there a way to cleanly start and stop workers from within a python
script, without having to muck with sys.argv, grepping PIDs, etc.?  i.e.
something like launch_new_instance, but accepts arguments for how many
workers, etc.?  This would be taking the "I" out of "IPython", but the
basic parallelism constructs it provides are quite nice and could be useful
in completely non-interactive contexts.

Full disclosure: I first pinged Fernando about this who suggested that I
use subprocess.popen to spawn ipcluster and get the pid so that I could
cleanly kill it at and the end, but he also suggested pinging the list for
other cleaner ideas.

Thanks,

Stephen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140131/33d8d29c/attachment.html>

From benjaminrk at gmail.com  Fri Jan 31 14:47:16 2014
From: benjaminrk at gmail.com (MinRK)
Date: Fri, 31 Jan 2014 11:47:16 -0800
Subject: [IPython-dev] automatically invoking ipython parallel workers
In-Reply-To: <CAMCHcTpf0-uMVHtKasZgUvTaEgcoRkztGmpq3D-tgva56tVYzQ@mail.gmail.com>
References: <CAMCHcTpf0-uMVHtKasZgUvTaEgcoRkztGmpq3D-tgva56tVYzQ@mail.gmail.com>
Message-ID: <CAHNn8BXBUYR_C9ggpXavAjtEEGh=yOYiYbjHiN9tPm4kxuko2w@mail.gmail.com>

I would recommend looking at
ipython-cluster-helper<https://github.com/roryk/ipython-cluster-helper>,
which aims to do this kind of thing.

-MinRK


On Fri, Jan 31, 2014 at 11:41 AM, Stephen Bailey <stephenbailey at lbl.gov>wrote:

> Hi IPythoners,
>
> I'd like to write an IPython-parallelized program that hides all the
> details from the user, i.e. doesn't require them to run ipcluster first.
>  If they have a set of workers running already, great, use that, but
> otherwise the program should spin up the workers automatically, use them,
> and then shut them down at the end.  Something like:
> from IPython.parallel import Clienttry:    c = Client()
> need_to_stop_workers = Falseexcept IOError:    # [Start workers as if
> "ipcluster start -n X" was run]    # ...    need_to_stop_workers = True
> c = Client()
> # ...
> if need_to_stop_workers:    # [Stop workers]
> Exploring what ipcluster is doing, it looks like it boils down to parsing
> sys.argv pretty deep in the call tree rather than at the top level and then
> passing arguments in to
> IPython.parallel.apps.ipclusterapp.launch_new_instance().   I found that I
> could modify sys.argv and then run launch_new_instance(), but then I didn't
> know how to kill the workers without resorting to unix "kill".  And I'd
> much rather just call some function with arguments rather than mucking with
> sys.argv as a global variable to achieve argument passing.
> Is there a way to cleanly start and stop workers from within a python
> script, without having to muck with sys.argv, grepping PIDs, etc.?  i.e.
> something like launch_new_instance, but accepts arguments for how many
> workers, etc.?  This would be taking the "I" out of "IPython", but the
> basic parallelism constructs it provides are quite nice and could be useful
> in completely non-interactive contexts.
>
> Full disclosure: I first pinged Fernando about this who suggested that I
> use subprocess.popen to spawn ipcluster and get the pid so that I could
> cleanly kill it at and the end, but he also suggested pinging the list for
> other cleaner ideas.
>
> Thanks,
>
> Stephen
>
>
> _______________________________________________
> 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/20140131/04cbb615/attachment.html>

From theodore.r.drain at jpl.nasa.gov  Fri Jan 31 15:47:07 2014
From: theodore.r.drain at jpl.nasa.gov (Drain, Theodore R (392P))
Date: Fri, 31 Jan 2014 20:47:07 +0000
Subject: [IPython-dev] automatically invoking ipython parallel workers
In-Reply-To: <CAMCHcTpf0-uMVHtKasZgUvTaEgcoRkztGmpq3D-tgva56tVYzQ@mail.gmail.com>
References: <CAMCHcTpf0-uMVHtKasZgUvTaEgcoRkztGmpq3D-tgva56tVYzQ@mail.gmail.com>
Message-ID: <0DC1CAB7F6C7FC4A8B54EE1FD49046990FB855C7@ap-embx-sp20.RES.AD.JPL>

I'm in the process of finishing something very similar to this.  Here's an overview of what I did:

- helper functions start(profile), stop(profile), wait(numEngine,profile)
   - start() uses popen to run an executable script I wrote
      - exec script builds IPClusterStart object directly and sets some options (nice level, daemonize, etc) and then prints a JSON dict to stdout w/ the number of engines to expect.
      - start() reads the number of engines from popen and calls wait(profile,n) to wait until the controller and engines are read
      - wait builds a client and polls until all the engines are ready (see ipython-dev email 1/14/2014)

- custom Client class calls start(profile) in __init__ and stop(profile) in __del__

So the user does something like this to start the cluster and when c is deleted, the cluster stops.

c = Client( profile='cluster' )
#... parallel functions here


I've been using the IPython Client to do all communication rather than using process id.  You can build a client and then call client.shutdown( hub=True ) to kill the whole cluster.  I have run into some timing problems in that if I kill the main process (ctrl-c) before all the engines connect, then the controller is shut down but some of the engines are not.  Not sure what to do about that yet...

Ted



________________________________
From: ipython-dev-bounces at scipy.org [ipython-dev-bounces at scipy.org] on behalf of Stephen Bailey [stephenbailey at lbl.gov]
Sent: Friday, January 31, 2014 11:41 AM
To: ipython-dev at scipy.org
Subject: [IPython-dev] automatically invoking ipython parallel workers

Hi IPythoners,

I'd like to write an IPython-parallelized program that hides all the details from the user, i.e. doesn't require them to run ipcluster first.  If they have a set of workers running already, great, use that, but otherwise the program should spin up the workers automatically, use them, and then shut them down at the end.  Something like:
from IPython.parallel import Clienttry:    c = Client()    need_to_stop_workers = Falseexcept IOError:    # [Start workers as if "ipcluster start -n X" was run]    # ...    need_to_stop_workers = True    c = Client()
# ...
if need_to_stop_workers:    # [Stop workers]
Exploring what ipcluster is doing, it looks like it boils down to parsing sys.argv pretty deep in the call tree rather than at the top level and then passing arguments in to IPython.parallel.apps.ipclusterapp.launch_new_instance().   I found that I could modify sys.argv and then run launch_new_instance(), but then I didn't know how to kill the workers without resorting to unix "kill".  And I'd much rather just call some function with arguments rather than mucking with sys.argv as a global variable to achieve argument passing.
Is there a way to cleanly start and stop workers from within a python script, without having to muck with sys.argv, grepping PIDs, etc.?  i.e. something like launch_new_instance, but accepts arguments for how many workers, etc.?  This would be taking the "I" out of "IPython", but the basic parallelism constructs it provides are quite nice and could be useful in completely non-interactive contexts.

Full disclosure: I first pinged Fernando about this who suggested that I use subprocess.popen to spawn ipcluster and get the pid so that I could cleanly kill it at and the end, but he also suggested pinging the list for other cleaner ideas.

Thanks,

Stephen

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140131/1acb6bd9/attachment.html>