From ccordoba12 at gmail.com Sat Feb 1 00:21:31 2014 From: ccordoba12 at gmail.com (=?UTF-8?B?Q2FybG9zIEPDs3Jkb2Jh?=) Date: Sat, 01 Feb 2014 00:21:31 -0500 Subject: [IPython-dev] Embedding IPython in IEP In-Reply-To: <CAB_T6==+-xL8TSM-WdZ2ncteDAf+FzRZp=M6UU-n0+Lnvf-UEg@mail.gmail.com> References: <CAB_T6==0BdYohuu4y9J=HtDkY10DQRqFs2-XdEO9qG2jDd86FA@mail.gmail.com> <52E1DBFD.8010509@gmail.com> <CAB_T6==+-xL8TSM-WdZ2ncteDAf+FzRZp=M6UU-n0+Lnvf-UEg@mail.gmail.com> Message-ID: <52EC845B.9060003@gmail.com> Hi Almar, El 24/01/14 17:13, Almar Klein escribi?: > > 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? Well, I mean matplotlib inline plots, pretty printing of sympy objects (using latex or matplotlib), pandas dataframes (using html) and any other object that uses the rich display IPython system. Cheers, Carlos > > - 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 list >> IPython-dev at scipy.org <mailto:IPython-dev at scipy.org> >> 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 > > > > > -- > Almar Klein, PhD > Science Applied > phone: +31 6 19268652 > e-mail: a.klein at science-applied.nl <mailto:a.klein at science-applied.nl> > > > _______________________________________________ > 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/20140201/43ee6d4c/attachment.html> From jabooth at gmail.com Sun Feb 2 10:44:49 2014 From: jabooth at gmail.com (James Booth) Date: Sun, 2 Feb 2014 15:44:49 +0000 Subject: [IPython-dev] Strange %matplotlib qt behavior OS X 10.9 Message-ID: <CAE3fZXV2DjKPgWrHhThYDGw=+ZCkkQ87pO39Z2STppXyc2px6g@mail.gmail.com> Hi guys, I'm seeing strange behaviour with the %matplotlib qt magic on OS X 10.9 when using Mayavi. Basically, on creation of a notebook (with only `ipython notebook` being run, no pylab/gui mode set), running a cell like this: %matplotlib qt ... import + do work with mayavi Causes the kernel to hang, whereas %matplotlib qt # returns fine -- NEW CELL -- ... import + do work with mayavi # returns fine works as expected. I've exemplified it in a notebook, with additional details: http://nbviewer.ipython.org/gist/jabooth/8770104 Any ideas what might be causing this? I thought App Nap might be an issue, but I see a fix has already been issued for this: https://github.com/ipython/ipython/pull/4453 Note I am running off a recent master. Best wishes James -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140202/69e1b1fd/attachment.html> From fperez.net at gmail.com Sun Feb 2 14:35:22 2014 From: fperez.net at gmail.com (Fernando Perez) Date: Sun, 2 Feb 2014 11:35:22 -0800 Subject: [IPython-dev] Strange %matplotlib qt behavior OS X 10.9 In-Reply-To: <CAE3fZXV2DjKPgWrHhThYDGw=+ZCkkQ87pO39Z2STppXyc2px6g@mail.gmail.com> References: <CAE3fZXV2DjKPgWrHhThYDGw=+ZCkkQ87pO39Z2STppXyc2px6g@mail.gmail.com> Message-ID: <CAHAreOr50F+D+Vbbf38zYoWnBArZkuGuSRTd6=hX59mbkqUdBQ@mail.gmail.com> Hi James, I don't have a solution handy, but FWIW, it's not a mac/osx problem: I can replicate the issue here on linux as well... Would you mind filing a bug on this on the tracker? Thanks! f On Sun, Feb 2, 2014 at 7:44 AM, James Booth <jabooth at gmail.com> wrote: > Hi guys, > > I'm seeing strange behaviour with the %matplotlib qt magic on OS X 10.9 > when using Mayavi. > > Basically, on creation of a notebook (with only `ipython notebook` being > run, no pylab/gui mode set), running a cell like this: > > %matplotlib qt > ... import + do work with mayavi > > Causes the kernel to hang, whereas > > %matplotlib qt # returns fine > -- NEW CELL -- > ... import + do work with mayavi # returns fine > > works as expected. > > I've exemplified it in a notebook, with additional details: > http://nbviewer.ipython.org/gist/jabooth/8770104 > > Any ideas what might be causing this? I thought App Nap might be an issue, > but I see a fix has already been issued for this: > https://github.com/ipython/ipython/pull/4453 > > Note I am running off a recent master. > > Best wishes > James > > > _______________________________________________ > 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/20140202/5d1978c7/attachment.html> From jabooth at gmail.com Sun Feb 2 16:02:48 2014 From: jabooth at gmail.com (James Booth) Date: Sun, 2 Feb 2014 21:02:48 +0000 Subject: [IPython-dev] Strange %matplotlib qt behavior OS X 10.9 In-Reply-To: <CAHAreOr50F+D+Vbbf38zYoWnBArZkuGuSRTd6=hX59mbkqUdBQ@mail.gmail.com> References: <CAE3fZXV2DjKPgWrHhThYDGw=+ZCkkQ87pO39Z2STppXyc2px6g@mail.gmail.com> <CAHAreOr50F+D+Vbbf38zYoWnBArZkuGuSRTd6=hX59mbkqUdBQ@mail.gmail.com> Message-ID: <CAE3fZXUwO1VXSgqcVhNYiqoDpzz1fzHKRV-03GEZrjOkDGPTxg@mail.gmail.com> Hi Fernando, Thanks for confirming that. Not a problem, here's the bug report: https://github.com/ipython/ipython/issues/4997 Let me know if I can do any more to help. Best wishes James On 2 February 2014 19:35, Fernando Perez <fperez.net at gmail.com> wrote: > Hi James, > > I don't have a solution handy, but FWIW, it's not a mac/osx problem: I can > replicate the issue here on linux as well... > > Would you mind filing a bug on this on the tracker? > > Thanks! > > f > > > On Sun, Feb 2, 2014 at 7:44 AM, James Booth <jabooth at gmail.com> wrote: > >> Hi guys, >> >> I'm seeing strange behaviour with the %matplotlib qt magic on OS X 10.9 >> when using Mayavi. >> >> Basically, on creation of a notebook (with only `ipython notebook` being >> run, no pylab/gui mode set), running a cell like this: >> >> %matplotlib qt >> ... import + do work with mayavi >> >> Causes the kernel to hang, whereas >> >> %matplotlib qt # returns fine >> -- NEW CELL -- >> ... import + do work with mayavi # returns fine >> >> works as expected. >> >> I've exemplified it in a notebook, with additional details: >> http://nbviewer.ipython.org/gist/jabooth/8770104 >> >> Any ideas what might be causing this? I thought App Nap might be an >> issue, but I see a fix has already been issued for this: >> https://github.com/ipython/ipython/pull/4453 >> >> Note I am running off a recent master. >> >> Best wishes >> James >> >> >> _______________________________________________ >> 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140202/d1ed33ea/attachment.html> From fperez.net at gmail.com Sun Feb 2 16:32:02 2014 From: fperez.net at gmail.com (Fernando Perez) Date: Sun, 2 Feb 2014 13:32:02 -0800 Subject: [IPython-dev] Strange %matplotlib qt behavior OS X 10.9 In-Reply-To: <CAE3fZXUwO1VXSgqcVhNYiqoDpzz1fzHKRV-03GEZrjOkDGPTxg@mail.gmail.com> References: <CAE3fZXV2DjKPgWrHhThYDGw=+ZCkkQ87pO39Z2STppXyc2px6g@mail.gmail.com> <CAHAreOr50F+D+Vbbf38zYoWnBArZkuGuSRTd6=hX59mbkqUdBQ@mail.gmail.com> <CAE3fZXUwO1VXSgqcVhNYiqoDpzz1fzHKRV-03GEZrjOkDGPTxg@mail.gmail.com> Message-ID: <CAHAreOpLU7qdeVos_w5i5kU8eD8K-fVOkXWPsNqJgTojTqv8_w@mail.gmail.com> Great, thanks! I guess for now, use the split-cell workaround, which at least exists. We can track further discussion on the GH page. On Sun, Feb 2, 2014 at 1:02 PM, James Booth <jabooth at gmail.com> wrote: > Hi Fernando, > > Thanks for confirming that. Not a problem, here's the bug report: > https://github.com/ipython/ipython/issues/4997 > > Let me know if I can do any more to help. > > Best wishes > James > > > > On 2 February 2014 19:35, Fernando Perez <fperez.net at gmail.com> wrote: > >> Hi James, >> >> I don't have a solution handy, but FWIW, it's not a mac/osx problem: I >> can replicate the issue here on linux as well... >> >> Would you mind filing a bug on this on the tracker? >> >> Thanks! >> >> f >> >> >> On Sun, Feb 2, 2014 at 7:44 AM, James Booth <jabooth at gmail.com> wrote: >> >>> Hi guys, >>> >>> I'm seeing strange behaviour with the %matplotlib qt magic on OS X 10.9 >>> when using Mayavi. >>> >>> Basically, on creation of a notebook (with only `ipython notebook` being >>> run, no pylab/gui mode set), running a cell like this: >>> >>> %matplotlib qt >>> ... import + do work with mayavi >>> >>> Causes the kernel to hang, whereas >>> >>> %matplotlib qt # returns fine >>> -- NEW CELL -- >>> ... import + do work with mayavi # returns fine >>> >>> works as expected. >>> >>> I've exemplified it in a notebook, with additional details: >>> http://nbviewer.ipython.org/gist/jabooth/8770104 >>> >>> Any ideas what might be causing this? I thought App Nap might be an >>> issue, but I see a fix has already been issued for this: >>> https://github.com/ipython/ipython/pull/4453 >>> >>> Note I am running off a recent master. >>> >>> Best wishes >>> James >>> >>> >>> _______________________________________________ >>> 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 > > -- 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/20140202/dd44972a/attachment.html> From zvoros at gmail.com Mon Feb 3 06:15:45 2014 From: zvoros at gmail.com (=?ISO-8859-1?Q?Zolt=E1n_V=F6r=F6s?=) Date: Mon, 03 Feb 2014 12:15:45 +0100 Subject: [IPython-dev] what is this "Untrusted text/latex output ignored." stuff? Message-ID: <52EF7A61.1010003@gmail.com> Hi all, When a notebook contains sympy-generated latex code, the latex content is not rendered on load, instead an "Untrusted text/latex output ignored." messageis displayed. On the other hand, latex in a markdown cell is trusted, and rendered properly. Is there a way to instruct the notebook to "trust" the latex code even in the output field of a code cell? Are there any security issues involved here? Cheers, Zolt?n -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140203/af961f73/attachment.html> From damianavila at gmail.com Mon Feb 3 07:10:49 2014 From: damianavila at gmail.com (=?ISO-8859-1?Q?Dami=E1n_Avila?=) Date: Mon, 3 Feb 2014 10:10:49 -0200 Subject: [IPython-dev] what is this "Untrusted text/latex output ignored." stuff? In-Reply-To: <52EF7A61.1010003@gmail.com> References: <52EF7A61.1010003@gmail.com> Message-ID: <CAH+mRR1BqhRUbBZWjSNunTuqFnWKDiVpZRojtRWWvxj2UOOs_A@mail.gmail.com> You have to trust your notebook: https://github.com/ipython/ipython/pull/4824/files#diff-bc52f1067c30eefcdb7ec4212e7d843aR467 This is the relevant PR, just merged a couple of day ago: https://github.com/ipython/ipython/pull/4824 But Brian is working in sanitizing the markdown cells too... so we are waiting a little bit to announce this "trust" feature to the list. 2014-02-03 Zolt?n V?r?s <zvoros at gmail.com>: > Hi all, > > When a notebook contains sympy-generated latex code, the latex content is > not rendered on load, instead an "Untrusted text/latex output ignored." > message is displayed. On the other hand, latex in a markdown cell is > trusted, and rendered properly. Is there a way to instruct the notebook to > "trust" the latex code even in the output field of a code cell? Are there > any security issues involved here? > > Cheers, > Zolt?n > > _______________________________________________ > 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/20140203/b9beab18/attachment.html> From bussonniermatthias at gmail.com Mon Feb 3 07:15:11 2014 From: bussonniermatthias at gmail.com (Matthias Bussonnier) Date: Mon, 3 Feb 2014 13:15:11 +0100 Subject: [IPython-dev] what is this "Untrusted text/latex output ignored." stuff? In-Reply-To: <52EF7A61.1010003@gmail.com> References: <52EF7A61.1010003@gmail.com> Message-ID: <CANJQusUc99=y_XmZH8uK+nZtg2EJoMmHp+-bRnbXrVZ2KGdgAg@mail.gmail.com> Hi zoltan, we havent yet posted info on the ML about that and will do soon. In short, we sign the notebook when you save it, and if the signaure don't mach we don't render potentially dangerous ouput. We will do the same in markdown soon if it contains script tag. WhiteListing latex might be an oversight. If you rerun the all notebook and save, the ouput should be tusted, a least for you, more info soon. -- Matthias On Mon, Feb 3, 2014 at 12:15 PM, Zolt?n V?r?s <zvoros at gmail.com> wrote: > Hi all, > > When a notebook contains sympy-generated latex code, the latex content is > not rendered on load, instead an "Untrusted text/latex output ignored." > message is displayed. On the other hand, latex in a markdown cell is > trusted, and rendered properly. Is there a way to instruct the notebook to > "trust" the latex code even in the output field of a code cell? Are there > any security issues involved here? > > 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/20140203/8125b32e/attachment.html> From zvoros at gmail.com Mon Feb 3 07:23:20 2014 From: zvoros at gmail.com (=?ISO-8859-1?Q?Zolt=E1n_V=F6r=F6s?=) Date: Mon, 03 Feb 2014 13:23:20 +0100 Subject: [IPython-dev] what is this "Untrusted text/latex output ignored." stuff? In-Reply-To: <CAH+mRR1BqhRUbBZWjSNunTuqFnWKDiVpZRojtRWWvxj2UOOs_A@mail.gmail.com> References: <52EF7A61.1010003@gmail.com> <CAH+mRR1BqhRUbBZWjSNunTuqFnWKDiVpZRojtRWWvxj2UOOs_A@mail.gmail.com> Message-ID: <52EF8A38.8010304@gmail.com> Hi Dami?n, Thanks for the feedback! On 03/02/14 13:10, Dami?n Avila wrote: > You have to trust your notebook: > https://github.com/ipython/ipython/pull/4824/files#diff-bc52f1067c30eefcdb7ec4212e7d843aR467 > > > This is the relevant PR, just merged a couple of day ago: > https://github.com/ipython/ipython/pull/4824 I am using the latest from master, so this should not be an issue. > > But Brian is working in sanitizing the markdown cells too... so we are > waiting a little bit to announce this "trust" feature to the list. > I also figured that I have the same problem with SVG figures. Those are also untrusted, and don't render. PNG figures seem to be OK. @Mathias > In short, we sign the notebook when you save it, and if the signaure > don't mach we don't render potentially dangerous ouput. > We will do the same in markdown soon if it contains script tag. > > WhiteListing latex might be an oversight. > > If you rerun the all notebook and save, the ouput should be tusted, a > least for you, more info soon. Does that mean that the whole notebook has to be rerun? Because if I re-run only the affected cells, that is not enough, I still have to the issue, when I open the notebook again, those cells still fail to render. Cheers, Zolt?n -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140203/2661a1ce/attachment.html> From ronena at gmail.com Mon Feb 3 10:48:06 2014 From: ronena at gmail.com (Ronen Abravanel) Date: Mon, 3 Feb 2014 17:48:06 +0200 Subject: [IPython-dev] what is this "Untrusted text/latex output ignored." stuff? In-Reply-To: <52EF8A38.8010304@gmail.com> References: <52EF7A61.1010003@gmail.com> <CAH+mRR1BqhRUbBZWjSNunTuqFnWKDiVpZRojtRWWvxj2UOOs_A@mail.gmail.com> <52EF8A38.8010304@gmail.com> Message-ID: <CACTp8RgtcMAyApN01AauPofKptEqa+iA0pb+Jta=EvwihmfLbw@mail.gmail.com> Hi, Is there any way to trust a notebook without running it? It seems common to me to send someone a notebook to show him a result, when he can not \ should not run (some of ) the code cell. For example, if some code cells contains very long computation or try to read from a data file that dose not present on a colleague's computer. The extreme case is "send him an HTML output" of the notebook", but if he can run most of the code cells but not all, I should either send an HTML-exported notebook or a runable notebook. ? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140203/efe7acc0/attachment.html> From zvoros at gmail.com Mon Feb 3 10:50:51 2014 From: zvoros at gmail.com (=?ISO-8859-1?Q?Zolt=E1n_V=F6r=F6s?=) Date: Mon, 03 Feb 2014 16:50:51 +0100 Subject: [IPython-dev] what is this "Untrusted text/latex output ignored." stuff? In-Reply-To: <CANJQusUc99=y_XmZH8uK+nZtg2EJoMmHp+-bRnbXrVZ2KGdgAg@mail.gmail.com> References: <52EF7A61.1010003@gmail.com> <CANJQusUc99=y_XmZH8uK+nZtg2EJoMmHp+-bRnbXrVZ2KGdgAg@mail.gmail.com> Message-ID: <52EFBADB.8020100@gmail.com> Hi all, I don't want to be seen as impatient, or anything like that, but I feel that this signature thing is somehow broken, so I would like to follow up on Dami?n's and Matthias' comments. No matter what I do, if I try to use an old notebook (old meaning created last Friday:) its content is not trusted. I have run ipython trust mynotebook.ipynb and I can see the signature at the top of the file. However, latex/svg are still not displayed. According to the PR that Dami?n referred to, only javascript and HTML items should be affected by this change, although, I understand that SVG might also be exploited for some injection attack. All this is not a major issue for me at the moment, I would just like to make sure that the developers know about it. Chees, Zolt?n On 03/02/14 13:15, Matthias Bussonnier wrote: > Hi zoltan, > > we havent yet posted info on the ML about that and will do soon. > > > In short, we sign the notebook when you save it, and if the signaure > don't mach we don't render potentially dangerous ouput. > We will do the same in markdown soon if it contains script tag. > > WhiteListing latex might be an oversight. > > If you rerun the all notebook and save, the ouput should be tusted, a > least for you, more info soon. > > -- > Matthias > > > > > On Mon, Feb 3, 2014 at 12:15 PM, Zolt?n V?r?s <zvoros at gmail.com > <mailto:zvoros at gmail.com>> wrote: > > Hi all, > > When a notebook contains sympy-generated latex code, the latex > content is not rendered on load, instead an "Untrusted text/latex > output ignored." messageis displayed. On the other hand, latex in > a markdown cell is trusted, and rendered properly. Is there a way > to instruct the notebook to "trust" the latex code even in the > output field of a code cell? Are there any security issues > involved here? > > Cheers, > Zolt?n > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org <mailto: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/20140203/a5d433c6/attachment.html> From bussonniermatthias at gmail.com Mon Feb 3 15:56:08 2014 From: bussonniermatthias at gmail.com (Matthias BUSSONNIER) Date: Mon, 3 Feb 2014 21:56:08 +0100 Subject: [IPython-dev] what is this "Untrusted text/latex output ignored." stuff? In-Reply-To: <52EFBADB.8020100@gmail.com> References: <52EF7A61.1010003@gmail.com> <CANJQusUc99=y_XmZH8uK+nZtg2EJoMmHp+-bRnbXrVZ2KGdgAg@mail.gmail.com> <52EFBADB.8020100@gmail.com> Message-ID: <125266F7-8762-478D-8E21-340E28B9D797@gmail.com> Le 3 f?vr. 2014 ? 16:50, Zolt?n V?r?s a ?crit : > Hi all, > > I don't want to be seen as impatient, or anything like that, but I feel that this signature thing is somehow broken, so I would like to follow up on Dami?n's and Matthias' comments. > > No matter what I do, if I try to use an old notebook (old meaning created last Friday:) its content is not trusted. I have run > > ipython trust mynotebook.ipynb > > and I can see the signature at the top of the file. However, latex/svg are still not displayed. According to the PR that Dami?n referred to, only javascript and HTML items should be affected by this change, although, I understand that SVG might also be exploited for some injection attack. > > All this is not a major issue for me at the moment, I would just like to make sure that the developers know about it. Please open a issue on github. we'll figure it out. -- M > > Chees, > Zolt?n > > On 03/02/14 13:15, Matthias Bussonnier wrote: >> Hi zoltan, >> >> we havent yet posted info on the ML about that and will do soon. >> >> >> In short, we sign the notebook when you save it, and if the signaure don't mach we don't render potentially dangerous ouput. >> We will do the same in markdown soon if it contains script tag. >> >> WhiteListing latex might be an oversight. >> >> If you rerun the all notebook and save, the ouput should be tusted, a least for you, more info soon. >> >> -- >> Matthias >> >> >> >> >> On Mon, Feb 3, 2014 at 12:15 PM, Zolt?n V?r?s <zvoros at gmail.com> wrote: >> Hi all, >> >> When a notebook contains sympy-generated latex code, the latex content is not rendered on load, instead an "Untrusted text/latex output ignored." message is displayed. On the other hand, latex in a markdown cell is trusted, and rendered properly. Is there a way to instruct the notebook to "trust" the latex code even in the output field of a code cell? Are there any security issues involved here? >> >> Cheers, >> 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 > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev From bussonniermatthias at gmail.com Mon Feb 3 15:57:30 2014 From: bussonniermatthias at gmail.com (Matthias BUSSONNIER) Date: Mon, 3 Feb 2014 21:57:30 +0100 Subject: [IPython-dev] what is this "Untrusted text/latex output ignored." stuff? In-Reply-To: <CACTp8RgtcMAyApN01AauPofKptEqa+iA0pb+Jta=EvwihmfLbw@mail.gmail.com> References: <52EF7A61.1010003@gmail.com> <CAH+mRR1BqhRUbBZWjSNunTuqFnWKDiVpZRojtRWWvxj2UOOs_A@mail.gmail.com> <52EF8A38.8010304@gmail.com> <CACTp8RgtcMAyApN01AauPofKptEqa+iA0pb+Jta=EvwihmfLbw@mail.gmail.com> Message-ID: <92EF4DAA-DD9E-495A-B6D4-CECED7AEB542@gmail.com> Le 3 f?vr. 2014 ? 16:48, Ronen Abravanel a ?crit : > Hi, > > Is there any way to trust a notebook without running it? It seems common to me to send someone a notebook to show him a result, when he can not \ should not run (some of ) the code cell. > > For example, if some code cells contains very long computation or try to read from a data file that dose not present on a colleague's computer. > > The extreme case is "send him an HTML output" of the notebook", but if he can run most of the code cells but not all, I should either send an HTML-exported notebook or a runable notebook. Yes there is a way(ipython trust <notebook>), and we will bundle nbviewer in ipython at she point so that you can view a notebook with full output without the risks. Nbconvert to export as HTML also should works. -- M > > > ? > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev From zvoros at gmail.com Mon Feb 3 16:05:16 2014 From: zvoros at gmail.com (=?ISO-8859-1?Q?Zolt=E1n_V=F6r=F6s?=) Date: Mon, 03 Feb 2014 22:05:16 +0100 Subject: [IPython-dev] what is this "Untrusted text/latex output ignored." stuff? In-Reply-To: <125266F7-8762-478D-8E21-340E28B9D797@gmail.com> References: <52EF7A61.1010003@gmail.com> <CANJQusUc99=y_XmZH8uK+nZtg2EJoMmHp+-bRnbXrVZ2KGdgAg@mail.gmail.com> <52EFBADB.8020100@gmail.com> <125266F7-8762-478D-8E21-340E28B9D797@gmail.com> Message-ID: <52F0048C.3000201@gmail.com> Done. https://github.com/ipython/ipython/issues/5009 Z. On 03/02/14 21:56, Matthias BUSSONNIER wrote: > Le 3 f?vr. 2014 ? 16:50, Zolt?n V?r?s a ?crit : > >> Hi all, >> >> I don't want to be seen as impatient, or anything like that, but I feel that this signature thing is somehow broken, so I would like to follow up on Dami?n's and Matthias' comments. >> >> No matter what I do, if I try to use an old notebook (old meaning created last Friday:) its content is not trusted. I have run >> >> ipython trust mynotebook.ipynb >> >> and I can see the signature at the top of the file. However, latex/svg are still not displayed. According to the PR that Dami?n referred to, only javascript and HTML items should be affected by this change, although, I understand that SVG might also be exploited for some injection attack. >> >> All this is not a major issue for me at the moment, I would just like to make sure that the developers know about it. > > Please open a issue on github. we'll figure it out. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140203/46260479/attachment.html> From nezar at mit.edu Mon Feb 3 18:53:08 2014 From: nezar at mit.edu (Nezar Alexander Abdennur) Date: Mon, 3 Feb 2014 18:53:08 -0500 Subject: [IPython-dev] plugin for Sublime Text editor Message-ID: <CADkFp5QFHJU9m+evSoLsdeYpfv9HVNoxGU80xv+HENkfyDrSeQ@mail.gmail.com> Hello devs, First time caller, occasional listener (...just another procrastinating grad student :p) . I would first of all, just like to thank you for all your great work! IPython is a wonderful tool! So, I'm not much of a vim or emacs person (yet!), but I do enjoy using SublimeText as a general purpose editor. It's sexy and cross-platform. Though, one thing I missed from my old work flows in Matlab was to be able to evaluate small code snippets between double-comment tags -- similar to notebook cells but without the output being embedded in the document. So I wrote a small plugin to do just that with Sublime. I thought I would share. Any feedback or ideas are more than welcome! https://github.com/nvictus/SublimeIPython It's really just a little hack: the plugin opens a default python or a virtualenv python subprocess to connect to an existing kernel instance and execute the cell code. Right now, the script runs on the editor's main thread, but I've got a nonblocking version in development on a separate branch. One issue I ran into is that I can't figure out how to obtain the stdout when I send code over the execute wire so that, e.g. I can display the output of print statements either in the text editor's console or, better yet, in the terminal console. Is this possible? I actually got a chance to meet and talk to Fernando briefly at a data science symposium at Harvard just over a week ago, and he encouraged me to ping the mailing list. He also pointed me to the very similar vim-ipython project, which I'll definitely be taking a look at for inspiration! :) Cheers, Nezar -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140203/291b1648/attachment.html> From jiffyclub at gmail.com Mon Feb 3 19:01:56 2014 From: jiffyclub at gmail.com (Matt Davis) Date: Mon, 3 Feb 2014 16:01:56 -0800 Subject: [IPython-dev] plugin for Sublime Text editor In-Reply-To: <CADkFp5QFHJU9m+evSoLsdeYpfv9HVNoxGU80xv+HENkfyDrSeQ@mail.gmail.com> References: <CADkFp5QFHJU9m+evSoLsdeYpfv9HVNoxGU80xv+HENkfyDrSeQ@mail.gmail.com> Message-ID: <CAMqnrZpGTn38qLs7F03G-rY7cRBJi7zQV7G8bX=eKgYoqXtF_w@mail.gmail.com> You might be interested in a couple of similar plugins: https://github.com/maximsch2/SublimeIPythonNotebook https://github.com/wuub/SublimeREPL Best, Matt On Mon, Feb 3, 2014 at 3:53 PM, Nezar Alexander Abdennur <nezar at mit.edu>wrote: > Hello devs, > > First time caller, occasional listener (...just another procrastinating > grad student :p) . I would first of all, just like to thank you for all > your great work! IPython is a wonderful tool! > > So, I'm not much of a vim or emacs person (yet!), but I do enjoy using > SublimeText as a general purpose editor. It's sexy and cross-platform. > Though, one thing I missed from my old work flows in Matlab was to be able > to evaluate small code snippets between double-comment tags -- similar to > notebook cells but without the output being embedded in the document. So I > wrote a small plugin to do just that with Sublime. I thought I would share. > Any feedback or ideas are more than welcome! > > https://github.com/nvictus/SublimeIPython > > It's really just a little hack: the plugin opens a default python or a > virtualenv python subprocess to connect to an existing kernel instance and > execute the cell code. Right now, the script runs on the editor's main > thread, but I've got a nonblocking version in development on a separate > branch. > > One issue I ran into is that I can't figure out how to obtain the stdout > when I send code over the execute wire so that, e.g. I can display the > output of print statements either in the text editor's console or, better > yet, in the terminal console. Is this possible? > > I actually got a chance to meet and talk to Fernando briefly at a data > science symposium at Harvard just over a week ago, and he encouraged me to > ping the mailing list. He also pointed me to the very similar vim-ipython > project, which I'll definitely be taking a look at for inspiration! :) > > Cheers, > > Nezar > > _______________________________________________ > 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/20140203/a8f823f8/attachment.html> From takowl at gmail.com Mon Feb 3 19:18:59 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Mon, 3 Feb 2014 16:18:59 -0800 Subject: [IPython-dev] plugin for Sublime Text editor In-Reply-To: <CADkFp5QFHJU9m+evSoLsdeYpfv9HVNoxGU80xv+HENkfyDrSeQ@mail.gmail.com> References: <CADkFp5QFHJU9m+evSoLsdeYpfv9HVNoxGU80xv+HENkfyDrSeQ@mail.gmail.com> Message-ID: <CAOvn4qgd+mq6RbshNF9GFw7_p-Px9422+APTMgtg1fGqOM=MTg@mail.gmail.com> On 3 February 2014 15:53, Nezar Alexander Abdennur <nezar at mit.edu> wrote: > One issue I ran into is that I can't figure out how to obtain the stdout > when I send code over the execute wire so that, e.g. I can display the > output of print statements either in the text editor's console or, better > yet, in the terminal console. Is this possible? > There's a second ZMQ socket which will publish output - stdout will come in a 'stream' message: http://ipython.org/ipython-doc/dev/development/messaging.html#messages-on-the-pub-sub-socket Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140203/38dc55d4/attachment.html> From benjaminrk at gmail.com Mon Feb 3 20:40:43 2014 From: benjaminrk at gmail.com (MinRK) Date: Mon, 3 Feb 2014 17:40:43 -0800 Subject: [IPython-dev] Parallel computing segfault behavior In-Reply-To: <0DC1CAB7F6C7FC4A8B54EE1FD49046990FB7E021@ap-embx-sp20.RES.AD.JPL> 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> <0DC1CAB7F6C7FC4A8B54EE1FD49046990FB7E021@ap-embx-sp20.RES.AD.JPL> Message-ID: <CAHNn8BV5+10m=s=FR7rFL1F_ZK2q-uLdgg+ttHbjX0iioy_32A@mail.gmail.com> Supervisord might be the easiest way to relaunch engines, but you can run a Client and watch for engine unregistration notifications, and when they come, just start a new engine in its place. On Wed, Jan 29, 2014 at 9:48 AM, Drain, Theodore R (392P) < theodore.r.drain at jpl.nasa.gov> wrote: > 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> 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<http://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<http://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 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> >> >> >> _______________________________________________ > 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/20140203/fad282e3/attachment.html> From alimanfoo at googlemail.com Tue Feb 4 05:12:19 2014 From: alimanfoo at googlemail.com (Alistair Miles) Date: Tue, 4 Feb 2014 10:12:19 +0000 Subject: [IPython-dev] parallel job arrays Message-ID: <CAMr-Jwafsxkg+x3FaoiOusnSOFSo_TthVVj5GHNyeOL5XCmvmQ@mail.gmail.com> Hi all, I'm just starting to use IPython parallel with our SGE cluster, it's a wonderful piece of work, thank you. I'm using a load balanced view over a cluster to do asynchronous map operations. One map operation may be over a large number of tasks, and may take a while (hours-days). I'd like to be able to setup and launch the job (from an IPython notebook) then check later if everything has finished and retrieve the results (possibly from a different computer). I've configured the controller to use the SQLite DB and have figured out how to retrieve results from the hub given a list of msg ids. All good so far. If I understand right, in order to be able to fetch the results later from a different client session, I need to keep a record of all the msg ids from the map job I launched earlier, right? I guess the simplest thing to do is write the msg ids to a file, then read again later? Is this what other folks do, or am I missing something? I'm used to using job arrays in SGE, and when you launch a job array you get a single job ID (e.g., 1234567) representing the whole job array, as well as job IDs for each of the tasks (e.g., 1234567.1, 1234567.2 etc.). It's just a thought, but if IPython parallel had some sort of similar notion (i.e., when you submit a parallel map, you get a msg id for the whole map operation as well as msg ids for each of the individual tasks), then that might support some small conveniences. For example, you could call client.get_result() with just the msg id for the whole map operation and get back something like an AsyncMapResult. You could also call client.abort() with the same msg id to cancel the whole map. Btw when I passed a list of msg ids to client.get_result() then called wait_interactive() on the returned AsyncHubResult, it showed '8/8 tasks finished' right from the start, even though tasks were still pending/running. I'm on IPython 1.1.0. Thanks again for the great work, Alistair -- Alistair Miles Head of Epidemiological Informatics Centre for Genomics and Global Health <http://cggh.org> The Wellcome Trust Centre for Human Genetics Roosevelt Drive Oxford OX3 7BN United Kingdom Web: http://purl.org/net/aliman Email: alimanfoo at gmail.com Tel: +44 (0)1865 287721 ***new number*** -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140204/6f90fc43/attachment.html> From raymond.yee at gmail.com Tue Feb 4 12:43:46 2014 From: raymond.yee at gmail.com (Raymond Yee) Date: Tue, 04 Feb 2014 09:43:46 -0800 Subject: [IPython-dev] other people seeing missing buttons when using IPython master Message-ID: <52F126D2.40105@gmail.com> I see the following problem when using commit 8017e1d99d1da5b30d405680237a3f9e1d4ecf7a on master -- missing buttons -- see: https://www.evernote.com/shard/s1/sh/43f87a5e-3c6b-491b-aaba-12896c57b97c/85c93223407014f786848a082666c6ad Others seeing this problem? -Raymond From benjaminrk at gmail.com Tue Feb 4 18:52:39 2014 From: benjaminrk at gmail.com (MinRK) Date: Tue, 4 Feb 2014 15:52:39 -0800 Subject: [IPython-dev] [ANN] IPython 1.2.0-rc1 Message-ID: <CAHNn8BWiNXN-n=7za4ofSZZCO09+DrD8dErY9F6JvWAiVPbcmw@mail.gmail.com> First release candidate of IPython 1.2.0 bugfix release is up: http://archive.ipython.org/testing/1.2.0/ What's been backported to 1.2: http://ipython.org/ipython-doc/1.x/whatsnew/github-stats-1.0.html If people could take it for a spin and see if we broke anything, that would be great. Hopefully this will tide people over as we put together the 2.0 release. -MinRK -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140204/6ca5422b/attachment.html> From fperez.net at gmail.com Wed Feb 5 01:54:02 2014 From: fperez.net at gmail.com (Fernando Perez) Date: Tue, 4 Feb 2014 22:54:02 -0800 Subject: [IPython-dev] other people seeing missing buttons when using IPython master In-Reply-To: <52F126D2.40105@gmail.com> References: <52F126D2.40105@gmail.com> Message-ID: <CAHAreOpb3=fCmiQwFoiCyagDgLEST_Xo1znsRqLWdeNc2MJ-Ng@mail.gmail.com> This is most likely just a browser cache issue. Verify by running on an incognito window. If that works better, then you can clear your main cache. On Feb 4, 2014 9:44 AM, "Raymond Yee" <raymond.yee at gmail.com> wrote: > I see the following problem when using commit > 8017e1d99d1da5b30d405680237a3f9e1d4ecf7a on master -- missing buttons -- > see: > > > https://www.evernote.com/shard/s1/sh/43f87a5e-3c6b-491b-aaba-12896c57b97c/85c93223407014f786848a082666c6ad > > Others seeing this problem? > > -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/20140204/6fd12160/attachment.html> From takowl at gmail.com Thu Feb 6 17:46:41 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Thu, 6 Feb 2014 14:46:41 -0800 Subject: [IPython-dev] Berkeley - are you using IPython in your research? Message-ID: <CAOvn4qhFe_Otc-cZygjsmz5Bo1-bnZBV5ZCvCSD=-pR20fKnyA@mail.gmail.com> If you're not at UC Berkeley, you can ignore this. We think there might be some Berkeley people on this list who we won't reach by other means. We're trying to collect a list of people in Berkeley who use IPython in their research, to demonstrate the impact that the project is having. If you are using IPython, or have recently used it, please can you write us a couple of sentences summarising what you study and how you use IPython for that? You can either e-mail this to me, or edit this wiki page to add your name and project summary: https://github.com/ipython/ipython/wiki/Research-at-UC-Berkeley-using-IPython Thanks, Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140206/d44f92e8/attachment.html> From raymond.yee at gmail.com Thu Feb 6 23:26:41 2014 From: raymond.yee at gmail.com (Raymond Yee) Date: Thu, 06 Feb 2014 20:26:41 -0800 Subject: [IPython-dev] other people seeing missing buttons when using IPython master In-Reply-To: <CAHAreOpb3=fCmiQwFoiCyagDgLEST_Xo1znsRqLWdeNc2MJ-Ng@mail.gmail.com> References: <52F126D2.40105@gmail.com> <CAHAreOpb3=fCmiQwFoiCyagDgLEST_Xo1znsRqLWdeNc2MJ-Ng@mail.gmail.com> Message-ID: <52F46081.4080709@gmail.com> I think I figured what I was doing wrong....I did a git pull but forgot to do a git submodule update as documented on https://github.com/ipython/ipython/blob/master/README.rst -Raymond On 2/4/14 10:54 PM, Fernando Perez wrote: > > This is most likely just a browser cache issue. Verify by running on > an incognito window. If that works better, then you can clear your > main cache. > > On Feb 4, 2014 9:44 AM, "Raymond Yee" <raymond.yee at gmail.com > <mailto:raymond.yee at gmail.com>> wrote: > > I see the following problem when using commit > 8017e1d99d1da5b30d405680237a3f9e1d4ecf7a on master -- missing > buttons -- > see: > > https://www.evernote.com/shard/s1/sh/43f87a5e-3c6b-491b-aaba-12896c57b97c/85c93223407014f786848a082666c6ad > > Others seeing this problem? > > -Raymond > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org <mailto: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/20140206/1b38920a/attachment.html> From jason-sage at creativetrax.com Fri Feb 7 05:09:56 2014 From: jason-sage at creativetrax.com (Jason Grout) Date: Fri, 07 Feb 2014 04:09:56 -0600 Subject: [IPython-dev] changing md5 for different archive versions Message-ID: <52F4B0F4.9030809@creativetrax.com> I just noticed that the md5 checksum for these two "official" archived versions is different: https://github.com/ipython/ipython/releases/download/rel-1.0.0/ipython-1.0.0.tar.gz http://archive.ipython.org/release/1.0.0/ipython-1.0.0.tar.gz MD5 (ipython-1.0.0.tar.gz-github) = 2268fa83f257d14943eb04e3333a6fac MD5 (ipython-1.0.0.tar.gz.-ipython.org) = fcba21b5a3827bf4e6c921d04d984c2f What's going on? Thanks, Jason From bussonniermatthias at gmail.com Fri Feb 7 05:44:33 2014 From: bussonniermatthias at gmail.com (Matthias BUSSONNIER) Date: Fri, 7 Feb 2014 11:44:33 +0100 Subject: [IPython-dev] changing md5 for different archive versions In-Reply-To: <52F4B0F4.9030809@creativetrax.com> References: <52F4B0F4.9030809@creativetrax.com> Message-ID: <88611DAF-195E-4667-8C84-9EF2C94EEFAC@gmail.com> Le 7 f?vr. 2014 ? 11:09, Jason Grout a ?crit : > I just noticed that the md5 checksum for these two "official" archived > versions is different: > > https://github.com/ipython/ipython/releases/download/rel-1.0.0/ipython-1.0.0.tar.gz > > http://archive.ipython.org/release/1.0.0/ipython-1.0.0.tar.gz > > MD5 (ipython-1.0.0.tar.gz-github) = 2268fa83f257d14943eb04e3333a6fac > MD5 (ipython-1.0.0.tar.gz.-ipython.org) = fcba21b5a3827bf4e6c921d04d984c2f The unpacked source seem identical. Though the github.com-gunzip tar alway appear from the 9 of august But last modify date of the ipython.org one always is the download time? weird. > What's going on? > > Thanks, > > Jason > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev From mark.voorhies at ucsf.edu Fri Feb 7 12:16:51 2014 From: mark.voorhies at ucsf.edu (Mark Voorhies) Date: Fri, 7 Feb 2014 09:16:51 -0800 Subject: [IPython-dev] changing md5 for different archive versions In-Reply-To: <88611DAF-195E-4667-8C84-9EF2C94EEFAC@gmail.com> References: <52F4B0F4.9030809@creativetrax.com> <88611DAF-195E-4667-8C84-9EF2C94EEFAC@gmail.com> Message-ID: <52F51503.9010500@ucsf.edu> On 02/07/2014 02:44 AM, Matthias BUSSONNIER wrote: > > Le 7 f?vr. 2014 ? 11:09, Jason Grout a ?crit : > >> I just noticed that the md5 checksum for these two "official" archived >> versions is different: >> >> https://github.com/ipython/ipython/releases/download/rel-1.0.0/ipython-1.0.0.tar.gz >> >> http://archive.ipython.org/release/1.0.0/ipython-1.0.0.tar.gz >> >> MD5 (ipython-1.0.0.tar.gz-github) = 2268fa83f257d14943eb04e3333a6fac >> MD5 (ipython-1.0.0.tar.gz.-ipython.org) = fcba21b5a3827bf4e6c921d04d984c2f > > The unpacked source seem identical. > Though the github.com-gunzip tar alway appear from the 9 of august > But last modify date of the ipython.org one always is the download time? > weird. Some sort of timestamp in the gzip header is expected behavior: mvoorhie at virgil:~$ date && echo "Hello, world" | md5sum Fri Feb 7 09:14:25 PST 2014 a7966bf58e23583c9a5a4059383ff850 - mvoorhie at virgil:~$ date && echo "Hello, world" | md5sum Fri Feb 7 09:14:27 PST 2014 a7966bf58e23583c9a5a4059383ff850 - mvoorhie at virgil:~$ date && echo "Hello, world" | md5sum Fri Feb 7 09:14:28 PST 2014 a7966bf58e23583c9a5a4059383ff850 - mvoorhie at virgil:~$ date && echo "Hello, world" | gzip - | md5sum Fri Feb 7 09:14:30 PST 2014 25344640395b8542b76a9610c6a9bac3 - mvoorhie at virgil:~$ date && echo "Hello, world" | gzip - | md5sum Fri Feb 7 09:14:31 PST 2014 a1dafaad89bd1a40e8cb01bc3603d663 - mvoorhie at virgil:~$ date && echo "Hello, world" | gzip - | md5sum Fri Feb 7 09:14:32 PST 2014 be8d99c50c031e4b2573ea2fe82f2a20 - --Mark > >> What's going on? >> >> 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 > From jtaylor.debian at googlemail.com Fri Feb 7 12:32:39 2014 From: jtaylor.debian at googlemail.com (Julian Taylor) Date: Fri, 07 Feb 2014 18:32:39 +0100 Subject: [IPython-dev] changing md5 for different archive versions In-Reply-To: <52F51503.9010500@ucsf.edu> References: <52F4B0F4.9030809@creativetrax.com> <88611DAF-195E-4667-8C84-9EF2C94EEFAC@gmail.com> <52F51503.9010500@ucsf.edu> Message-ID: <52F518B7.3020008@googlemail.com> On 07.02.2014 18:16, Mark Voorhies wrote: > On 02/07/2014 02:44 AM, Matthias BUSSONNIER wrote: >> >> Le 7 f?vr. 2014 ? 11:09, Jason Grout a ?crit : >> >>> I just noticed that the md5 checksum for these two "official" archived >>> versions is different: >>> >>> https://github.com/ipython/ipython/releases/download/rel-1.0.0/ipython-1.0.0.tar.gz >>> >>> http://archive.ipython.org/release/1.0.0/ipython-1.0.0.tar.gz >>> >>> MD5 (ipython-1.0.0.tar.gz-github) = 2268fa83f257d14943eb04e3333a6fac >>> MD5 (ipython-1.0.0.tar.gz.-ipython.org) = fcba21b5a3827bf4e6c921d04d984c2f >> >> The unpacked source seem identical. >> Though the github.com-gunzip tar alway appear from the 9 of august >> But last modify date of the ipython.org one always is the download time? >> weird. > > Some sort of timestamp in the gzip header is expected behavior: you can avoid that with the -n argument From torsten.edeler at haw-hamburg.de Fri Feb 7 15:04:33 2014 From: torsten.edeler at haw-hamburg.de (Edeler, Torsten) Date: Fri, 7 Feb 2014 20:04:33 +0000 Subject: [IPython-dev] Paste images into the notebook Message-ID: <CCD2E91E44CCA449BA927E8424A283931F2E2A@MB02.mailcluster.haw-hamburg.de> Hi everybody. I'm playing around with the notebook. It is fantastic! Thank you for this amazing piece of software! I'm just missing the ability to paste images directly from the clipboard (e.g. screenshots) into the notebook. My OS is Win7. How do I make that work? Thank you very much, Torsten -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140207/8869ed3e/attachment.html> From alessandro.gagliardi at glassdoor.com Fri Feb 7 15:36:24 2014 From: alessandro.gagliardi at glassdoor.com (Alessandro Gagliardi) Date: Fri, 7 Feb 2014 20:36:24 +0000 Subject: [IPython-dev] RandomForestClassifier w/ IPython.parallel Message-ID: <CF1A83C7.4FCF%alessandro.gagliardi@glassdoor.com> Not sure if I?m addressing the best list for this question, so if there?s a more appropriate list, please direct me to it. I want to run a large sklearn.ensemble.RandomForestClassifier (with maybe a dozens or maybe hundreds of trees and 100,000 samples). My desktop won?t handle this so I want to try using StarCluster. RandomForestClassifier seems to parallelize easily, but I don?t know how I would split it across many IPython.parallel engines (if that?s even possible). (Or maybe I should be foregoing IPython.parallel and using MPI?) Any help would be greatly appreciated. Thanks, Alessandro Gagliardi| Glassdoor| alessandro at glassdoor.com<mailto:alessandro at glassdoor.com> We?re hiring! Check out our open jobs<http://www.glassdoor.com/about/careers.htm>. Twitter<https://twitter.com/Glassdoor> | Facebook<https://www.facebook.com/Glassdoor> | Glassdoor Blog<http://www.glassdoor.com/blog/> 2012 Webby Award Winner: Best Employment Site 2013 Webby Award Winner: Best Guides/Ratings/Review Site -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140207/443aca8a/attachment.html> From fperez.net at gmail.com Fri Feb 7 16:03:00 2014 From: fperez.net at gmail.com (Fernando Perez) Date: Fri, 7 Feb 2014 13:03:00 -0800 Subject: [IPython-dev] Paste images into the notebook In-Reply-To: <CCD2E91E44CCA449BA927E8424A283931F2E2A@MB02.mailcluster.haw-hamburg.de> References: <CCD2E91E44CCA449BA927E8424A283931F2E2A@MB02.mailcluster.haw-hamburg.de> Message-ID: <CAHAreOr6KNervS8G8-uM6Nft-+doQbppJ3-YD6Oe2es3PxZ_jw@mail.gmail.com> There is no direct image clipboard support, and given the underlying format and model we use, it' not something that is likely. You should save your images to a file, and then reference them with markdown image syntax  Best f On Fri, Feb 7, 2014 at 12:04 PM, Edeler, Torsten < torsten.edeler at haw-hamburg.de> wrote: > Hi everybody. > > I'm playing around with the notebook. > > It is fantastic! Thank you for this amazing piece of software! > > > > I'm just missing the ability to paste images directly from the clipboard > (e.g. screenshots) into the notebook. My OS is Win7. How do I make that > work? > > > > Thank you very much, > > Torsten > > _______________________________________________ > 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/20140207/6f5667c6/attachment.html> From fperez.net at gmail.com Fri Feb 7 16:06:54 2014 From: fperez.net at gmail.com (Fernando Perez) Date: Fri, 7 Feb 2014 13:06:54 -0800 Subject: [IPython-dev] RandomForestClassifier w/ IPython.parallel In-Reply-To: <CF1A83C7.4FCF%alessandro.gagliardi@glassdoor.com> References: <CF1A83C7.4FCF%alessandro.gagliardi@glassdoor.com> Message-ID: <CAHAreOq+8o-bLEdXTvNHrBL0nWjBtWQgybBAyX=d=PXnLOJhkw@mail.gmail.com> While Olivier Grisel may hang out here, I strongly suggest you repost on the sklearn list. He's a core dev for sklearn and an expert precisely on the intersection of sklearn and IPython.parallel (a topic on which he's teaching a tutorial next week at Strata). The only catch is that he's likely traveling precisely for his Strata tutorial... But he's much more likely to give you an authoritative response on that than any of us from the IPython team. Note also that sklearn supports simple parallelization with joblib for many of its tools (though I don't know if their RF classifier does). That *may* do the trick for you. Cheers, f On Fri, Feb 7, 2014 at 12:36 PM, Alessandro Gagliardi < alessandro.gagliardi at glassdoor.com> wrote: > Not sure if I'm addressing the best list for this question, so if > there's a more appropriate list, please direct me to it. > > I want to run a large sklearn.ensemble.RandomForestClassifier (with > maybe a dozens or maybe hundreds of trees and 100,000 samples). My desktop > won't handle this so I want to try using StarCluster. > RandomForestClassifier seems to parallelize easily, but I don't know how I > would split it across many IPython.parallel engines (if that's even > possible). (Or maybe I should be foregoing IPython.parallel and using MPI?) > > Any help would be greatly appreciated. > > Thanks, > > Alessandro Gagliardi| Glassdoor| alessandro at glassdoor.com > > *We're hiring! Check out our open jobs > <http://www.glassdoor.com/about/careers.htm>.* > > *Twitter <https://twitter.com/Glassdoor>** | Facebook > <https://www.facebook.com/Glassdoor> | Glassdoor Blog > <http://www.glassdoor.com/blog/>* > > *2012 Webby Award Winner: Best Employment Site* > > *2013 Webby Award Winner: Best Guides/Ratings/Review Site* > > _______________________________________________ > 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/20140207/7e1786ed/attachment.html> From fperez.net at gmail.com Fri Feb 7 16:07:36 2014 From: fperez.net at gmail.com (Fernando Perez) Date: Fri, 7 Feb 2014 13:07:36 -0800 Subject: [IPython-dev] other people seeing missing buttons when using IPython master In-Reply-To: <52F46081.4080709@gmail.com> References: <52F126D2.40105@gmail.com> <CAHAreOpb3=fCmiQwFoiCyagDgLEST_Xo1znsRqLWdeNc2MJ-Ng@mail.gmail.com> <52F46081.4080709@gmail.com> Message-ID: <CAHAreOon71Q8PdC_TAJz2t9ZyAn1Kh=q7GrqpwBawP79nNEA8A@mail.gmail.com> Ah, yes. I've become so used to doing this (after getting burned just like you many times in the past), that I forgot to mention it. Git submodules, the only aspect of git that I really, really don't like... Cheers, f On Thu, Feb 6, 2014 at 8:26 PM, Raymond Yee <raymond.yee at gmail.com> wrote: > I think I figured what I was doing wrong....I did a git pull but forgot > to do a > > git submodule update > > as documented on https://github.com/ipython/ipython/blob/master/README.rst > > > -Raymond > > > On 2/4/14 10:54 PM, Fernando Perez wrote: > > This is most likely just a browser cache issue. Verify by running on an > incognito window. If that works better, then you can clear your main cache. > On Feb 4, 2014 9:44 AM, "Raymond Yee" <raymond.yee at gmail.com> wrote: > >> I see the following problem when using commit >> 8017e1d99d1da5b30d405680237a3f9e1d4ecf7a on master -- missing buttons -- >> see: >> >> >> https://www.evernote.com/shard/s1/sh/43f87a5e-3c6b-491b-aaba-12896c57b97c/85c93223407014f786848a082666c6ad >> >> Others seeing this problem? >> >> -Raymond >> _______________________________________________ >> IPython-dev mailing list >> IPython-dev at scipy.org >> http://mail.scipy.org/mailman/listinfo/ipython-dev >> > > > _______________________________________________ > 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 > > -- 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/20140207/02c13487/attachment.html> From bussonniermatthias at gmail.com Fri Feb 7 16:29:34 2014 From: bussonniermatthias at gmail.com (Matthias BUSSONNIER) Date: Fri, 7 Feb 2014 22:29:34 +0100 Subject: [IPython-dev] Paste images into the notebook In-Reply-To: <CCD2E91E44CCA449BA927E8424A283931F2E2A@MB02.mailcluster.haw-hamburg.de> References: <CCD2E91E44CCA449BA927E8424A283931F2E2A@MB02.mailcluster.haw-hamburg.de> Message-ID: <3BC30423-3AFD-4473-86CA-3853B0920915@gmail.com> Hi there, Le 7 f?vr. 2014 ? 21:04, Edeler, Torsten a ?crit : > Hi everybody. > I?m playing around with the notebook. > It is fantastic! Thank you for this amazing piece of software! > > I?m just missing the ability to paste images directly from the clipboard (e.g. screenshots) into the notebook. My OS is Win7. How do I make that work? > Short answer is you can't. Longer is, depends what you want to do. Add it in cwd, use IPython.display.Image or use like to image url which depending on IPython version in markdown is :  on < 2.0  on >= 2.0 More information in example notebooks that introduce all theses concepts. -- Matthias From python at elbonia.de Fri Feb 7 16:47:34 2014 From: python at elbonia.de (Juergen Hasch) Date: Fri, 07 Feb 2014 22:47:34 +0100 Subject: [IPython-dev] Paste images into the notebook In-Reply-To: <3BC30423-3AFD-4473-86CA-3853B0920915@gmail.com> References: <CCD2E91E44CCA449BA927E8424A283931F2E2A@MB02.mailcluster.haw-hamburg.de> <3BC30423-3AFD-4473-86CA-3853B0920915@gmail.com> Message-ID: <52F55476.4030406@elbonia.de> Am 07.02.2014 22:29, schrieb Matthias BUSSONNIER: > Hi there, > > > Le 7 f?vr. 2014 ? 21:04, Edeler, Torsten a ?crit : > >> Hi everybody. >> I?m playing around with the notebook. >> It is fantastic! Thank you for this amazing piece of software! >> >> I?m just missing the ability to paste images directly from the clipboard (e.g. screenshots) into the notebook. My OS is Win7. How do I make that work? >> > > Short answer is you can't. Actually, it works :-) It only takes around 15 lines of Javascript code to implement this as clipboard paste event for Chrome. All you have to do is receive the image from clipboard, create a markdown cell, and paste the image as base64. Not efficient and slow as hell for larger images, so I won't say this is a viable solution. Still, technically it can be done. From raymond.yee at gmail.com Fri Feb 7 16:48:51 2014 From: raymond.yee at gmail.com (Raymond Yee) Date: Fri, 07 Feb 2014 13:48:51 -0800 Subject: [IPython-dev] Paste images into the notebook In-Reply-To: <52F55476.4030406@elbonia.de> References: <CCD2E91E44CCA449BA927E8424A283931F2E2A@MB02.mailcluster.haw-hamburg.de> <3BC30423-3AFD-4473-86CA-3853B0920915@gmail.com> <52F55476.4030406@elbonia.de> Message-ID: <52F554C3.7050207@gmail.com> Juergen, Can you publish your code? I'm definitely interested in this feature even if it's hacky. Thanks, -Raymond On 2/7/14 1:47 PM, Juergen Hasch wrote: > Am 07.02.2014 22:29, schrieb Matthias BUSSONNIER: >> Hi there, >> >> >> Le 7 f?vr. 2014 ? 21:04, Edeler, Torsten a ?crit : >> >>> Hi everybody. >>> I?m playing around with the notebook. >>> It is fantastic! Thank you for this amazing piece of software! >>> >>> I?m just missing the ability to paste images directly from the clipboard (e.g. screenshots) into the notebook. My OS is Win7. How do I make that work? >>> >> Short answer is you can't. > Actually, it works :-) > > It only takes around 15 lines of Javascript code to implement this as clipboard paste event for Chrome. > All you have to do is receive the image from clipboard, create a markdown cell, and paste the image as base64. > > Not efficient and slow as hell for larger images, so I won't say this is a viable solution. Still, technically it can be > done. > > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev From python at elbonia.de Fri Feb 7 16:56:31 2014 From: python at elbonia.de (Juergen Hasch) Date: Fri, 07 Feb 2014 22:56:31 +0100 Subject: [IPython-dev] Paste images into the notebook In-Reply-To: <52F554C3.7050207@gmail.com> References: <CCD2E91E44CCA449BA927E8424A283931F2E2A@MB02.mailcluster.haw-hamburg.de> <3BC30423-3AFD-4473-86CA-3853B0920915@gmail.com> <52F55476.4030406@elbonia.de> <52F554C3.7050207@gmail.com> Message-ID: <52F5568F.8080608@elbonia.de> This is my hack. Slow as hell for anything larger than some 10k. window.addEventListener('paste', function(event){ var cell = IPython.notebook.get_selected_cell(); var items = event.clipboardData.items; for (var i = 0; i < items.length; ++i) { if (items[i].kind == 'file' && items[i].type.indexOf('image/') !== -1) { var blob = items[i].getAsFile(); window.URL = window.URL || window.webkitURL; var blobUrl = window.URL.createObjectURL(blob); var img = document.createElement('img'); img.src = blobUrl; var reader = new FileReader(); reader.onload = ( function(evt) { var new_cell = IPython.notebook.insert_cell_below('markdown'); var str = '<img src="' + evt.target.result + '">'; new_cell.set_text(str); new_cell.edit_mode(); new_cell.execute(); } ); reader.readAsDataURL(blob); } } }); Am 07.02.2014 22:48, schrieb Raymond Yee: > Juergen, > > Can you publish your code? I'm definitely interested in this feature > even if it's hacky. > > Thanks, > > -Raymond > > On 2/7/14 1:47 PM, Juergen Hasch wrote: >> Am 07.02.2014 22:29, schrieb Matthias BUSSONNIER: >>> Hi there, >>> >>> >>> Le 7 f?vr. 2014 ? 21:04, Edeler, Torsten a ?crit : >>> >>>> Hi everybody. >>>> I?m playing around with the notebook. >>>> It is fantastic! Thank you for this amazing piece of software! >>>> >>>> I?m just missing the ability to paste images directly from the clipboard (e.g. screenshots) into the notebook. My OS is Win7. How do I make that work? >>>> >>> Short answer is you can't. >> Actually, it works :-) >> >> It only takes around 15 lines of Javascript code to implement this as clipboard paste event for Chrome. >> All you have to do is receive the image from clipboard, create a markdown cell, and paste the image as base64. >> >> Not efficient and slow as hell for larger images, so I won't say this is a viable solution. Still, technically it can be >> done. >> >> >> >> _______________________________________________ >> 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 benjaminrk at gmail.com Fri Feb 7 17:22:35 2014 From: benjaminrk at gmail.com (MinRK) Date: Fri, 7 Feb 2014 14:22:35 -0800 Subject: [IPython-dev] other people seeing missing buttons when using IPython master In-Reply-To: <CAHAreOon71Q8PdC_TAJz2t9ZyAn1Kh=q7GrqpwBawP79nNEA8A@mail.gmail.com> References: <52F126D2.40105@gmail.com> <CAHAreOpb3=fCmiQwFoiCyagDgLEST_Xo1znsRqLWdeNc2MJ-Ng@mail.gmail.com> <52F46081.4080709@gmail.com> <CAHAreOon71Q8PdC_TAJz2t9ZyAn1Kh=q7GrqpwBawP79nNEA8A@mail.gmail.com> Message-ID: <CAHNn8BV73J64tiab5Tvrxus-X6N1PFS4j52m15qonYgvGkmV4Q@mail.gmail.com> We ship example git hooks (in git-hooks dir) that ensure submodules are correct on every pull / checkout. I use them, and haven't had issues with submodules being in the wrong state in months. It does slow down switching between branches a bit. -MinRK On Fri, Feb 7, 2014 at 1:07 PM, Fernando Perez <fperez.net at gmail.com> wrote: > Ah, yes. I've become so used to doing this (after getting burned just like > you many times in the past), that I forgot to mention it. > > Git submodules, the only aspect of git that I really, really don't like... > > Cheers, > > f > > > On Thu, Feb 6, 2014 at 8:26 PM, Raymond Yee <raymond.yee at gmail.com> wrote: > >> I think I figured what I was doing wrong....I did a git pull but forgot >> to do a >> >> git submodule update >> >> as documented on >> https://github.com/ipython/ipython/blob/master/README.rst >> >> >> -Raymond >> >> >> On 2/4/14 10:54 PM, Fernando Perez wrote: >> >> This is most likely just a browser cache issue. Verify by running on an >> incognito window. If that works better, then you can clear your main cache. >> On Feb 4, 2014 9:44 AM, "Raymond Yee" <raymond.yee at gmail.com> wrote: >> >>> I see the following problem when using commit >>> 8017e1d99d1da5b30d405680237a3f9e1d4ecf7a on master -- missing buttons -- >>> see: >>> >>> >>> https://www.evernote.com/shard/s1/sh/43f87a5e-3c6b-491b-aaba-12896c57b97c/85c93223407014f786848a082666c6ad >>> >>> Others seeing this problem? >>> >>> -Raymond >>> _______________________________________________ >>> IPython-dev mailing list >>> IPython-dev at scipy.org >>> http://mail.scipy.org/mailman/listinfo/ipython-dev >>> >> >> >> _______________________________________________ >> 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 >> >> > > > -- > 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/20140207/15adc4f4/attachment.html> From stefan at sun.ac.za Sat Feb 8 01:27:38 2014 From: stefan at sun.ac.za (=?iso-8859-1?Q?St=E9fan?= van der Walt) Date: Sat, 8 Feb 2014 08:27:38 +0200 Subject: [IPython-dev] Default values for widgets Message-ID: <20140208062738.GB12156@gmail.com> Hi all, I'm giving a demo of the interactive functionality later today, and I was hoping there was a way to specify default parameter values. E.g., the image blurring example in the notebook by default sets the r, g, b values to 0.5, instead of to 1 (as provided by the keyword arguments). The widgets are awesome! Cheers St?fan From ellisonbg at gmail.com Sat Feb 8 01:56:36 2014 From: ellisonbg at gmail.com (Brian Granger) Date: Fri, 7 Feb 2014 22:56:36 -0800 Subject: [IPython-dev] Default values for widgets In-Reply-To: <20140208062738.GB12156@gmail.com> References: <20140208062738.GB12156@gmail.com> Message-ID: <CAH4pYpSOJCoiOEhGZEJYG5uUmd-B6D+pmwONEuprYa-Kud4_Hw@mail.gmail.com> Currently, to get this you have to pass an actual Widget to interact: interact(f, a=FloatSliderWidget(..., value=10), ...) Even custom Widgets can be passed this way and they will work with interact, as long as the Widget has a value attribute. We decided that we wanted to keep the abbreviations as simple as possible and just allow people to pass Widgets for the more complicated usage cases. Part of this is that we are wanting to be as slow/conservative as possible in introducing complexity to new APIs. We want to see how this stuff works in practice and gather data from our users (like this!). Cheers, Brian On Fri, Feb 7, 2014 at 10:27 PM, St?fan van der Walt <stefan at sun.ac.za> wrote: > Hi all, > > I'm giving a demo of the interactive functionality later today, and I was > hoping there was a way to specify default parameter values. E.g., the > image blurring example in the notebook by default sets the r, g, b values to > 0.5, instead of to 1 (as provided by the keyword arguments). > > The widgets are awesome! > > Cheers > 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 stefan at sun.ac.za Sat Feb 8 02:08:31 2014 From: stefan at sun.ac.za (=?iso-8859-1?Q?St=E9fan?= van der Walt) Date: Sat, 8 Feb 2014 09:08:31 +0200 Subject: [IPython-dev] Default values for widgets In-Reply-To: <CAH4pYpSOJCoiOEhGZEJYG5uUmd-B6D+pmwONEuprYa-Kud4_Hw@mail.gmail.com> References: <20140208062738.GB12156@gmail.com> <CAH4pYpSOJCoiOEhGZEJYG5uUmd-B6D+pmwONEuprYa-Kud4_Hw@mail.gmail.com> Message-ID: <20140208070831.GC12156@gmail.com> On Fri, 07 Feb 2014 22:56:36 -0800, Brian Granger wrote: > interact(f, a=FloatSliderWidget(..., value=10), ...) That will do the trick for me, thanks. > We decided that we wanted to keep the abbreviations as simple as > possible and just allow people to pass Widgets for the more > complicated usage cases. Part of this is that we are wanting to be as > slow/conservative as possible in introducing complexity to new APIs. > We want to see how this stuff works in practice and gather data from > our users (like this!). The data point for me then is that it feels unintuitive that the default keyword argument is not respected. Thanks for all your hard work on this! St?fan From zvoros at gmail.com Sat Feb 8 11:29:21 2014 From: zvoros at gmail.com (=?ISO-8859-1?Q?Zolt=E1n_V=F6r=F6s?=) Date: Sat, 08 Feb 2014 17:29:21 +0100 Subject: [IPython-dev] popping out individual notebook cells Message-ID: <52F65B61.7040604@gmail.com> Hi all, I find myself comparing cells quite frequently (either for debugging code, or checking plots, outputs etc.), and I think that it would be great, if the two cells in question could be placed side by side. At the moment, I simply move up one of the cells, so that they are next to each other, but that is a bit clumsy. In any case, I was thinking that, if a cell could be popped out, that would probably be a more decent solution. I don't mean that the popped-out cell should be editable in the child window, I simply mean a verbatim copy of the cell's input and output without the capability of running anything from the child. In this regard, the child would no longer be part of the notebook. All this machinery could be attached to the cell toolbar, which is already in the notebook. Now, as far as I see, there are two options here. One is to use a modeless window, which has the advantage that everything could be done on client side, and could even be implemented as an extension, it wouldn't have to be part of the core. But this has the downside that the window can be moved only within the boundaries of the browser window. The other possibility is to open a new headless browser window, but that has to go through the server, and then the server has to be equipped with facilities to serve the content of a single cell, so this route is certainly more involving. I just wanted to toss up this idea to see what others think about it, whether it makes sense at all, or, perhaps, someone already has done some work along these lines. Cheers, Zolt?n -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140208/558d472a/attachment.html> From abie at uw.edu Sat Feb 8 11:32:50 2014 From: abie at uw.edu (Abraham D. Flaxman) Date: Sat, 8 Feb 2014 16:32:50 +0000 Subject: [IPython-dev] Paste images into the notebook In-Reply-To: <52F5568F.8080608@elbonia.de> References: <CCD2E91E44CCA449BA927E8424A283931F2E2A@MB02.mailcluster.haw-hamburg.de> <3BC30423-3AFD-4473-86CA-3853B0920915@gmail.com> <52F55476.4030406@elbonia.de> <52F554C3.7050207@gmail.com> <52F5568F.8080608@elbonia.de> Message-ID: <F723135E32F9984ABC5B614F28BF2491019F5941@UWIT-MBX06.exchange.washington.edu> This works for me, and it is something I've thought would be useful for a while now. So thanks! I put an example notebook together using it here: http://nbviewer.ipython.org/gist/aflaxman/8886274 I agree that it is slow, but I want it so much I'm willing to wait. But do you have any thoughts on how it can go faster? --Abie -----Original Message----- From: ipython-dev-bounces at scipy.org [mailto:ipython-dev-bounces at scipy.org] On Behalf Of Juergen Hasch Sent: Friday, February 07, 2014 1:57 PM To: IPython developers list Subject: Re: [IPython-dev] Paste images into the notebook This is my hack. Slow as hell for anything larger than some 10k. window.addEventListener('paste', function(event){ var cell = IPython.notebook.get_selected_cell(); var items = event.clipboardData.items; for (var i = 0; i < items.length; ++i) { if (items[i].kind == 'file' && items[i].type.indexOf('image/') !== -1) { var blob = items[i].getAsFile(); window.URL = window.URL || window.webkitURL; var blobUrl = window.URL.createObjectURL(blob); var img = document.createElement('img'); img.src = blobUrl; var reader = new FileReader(); reader.onload = ( function(evt) { var new_cell = IPython.notebook.insert_cell_below('markdown'); var str = '<img src="' + evt.target.result + '">'; new_cell.set_text(str); new_cell.edit_mode(); new_cell.execute(); } ); reader.readAsDataURL(blob); } } }); Am 07.02.2014 22:48, schrieb Raymond Yee: > Juergen, > > Can you publish your code? I'm definitely interested in this feature > even if it's hacky. > > Thanks, > > -Raymond > > On 2/7/14 1:47 PM, Juergen Hasch wrote: >> Am 07.02.2014 22:29, schrieb Matthias BUSSONNIER: >>> Hi there, >>> >>> >>> Le 7 f?vr. 2014 ? 21:04, Edeler, Torsten a ?crit : >>> >>>> Hi everybody. >>>> I'm playing around with the notebook. >>>> It is fantastic! Thank you for this amazing piece of software! >>>> >>>> I'm just missing the ability to paste images directly from the clipboard (e.g. screenshots) into the notebook. My OS is Win7. How do I make that work? >>>> >>> Short answer is you can't. >> Actually, it works :-) >> >> It only takes around 15 lines of Javascript code to implement this as clipboard paste event for Chrome. >> All you have to do is receive the image from clipboard, create a markdown cell, and paste the image as base64. >> >> Not efficient and slow as hell for larger images, so I won't say this >> is a viable solution. Still, technically it can be done. >> >> >> >> _______________________________________________ >> 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 python at elbonia.de Sat Feb 8 11:47:02 2014 From: python at elbonia.de (Juergen Hasch) Date: Sat, 08 Feb 2014 17:47:02 +0100 Subject: [IPython-dev] Paste images into the notebook In-Reply-To: <F723135E32F9984ABC5B614F28BF2491019F5941@UWIT-MBX06.exchange.washington.edu> References: <CCD2E91E44CCA449BA927E8424A283931F2E2A@MB02.mailcluster.haw-hamburg.de> <3BC30423-3AFD-4473-86CA-3853B0920915@gmail.com> <52F55476.4030406@elbonia.de> <52F554C3.7050207@gmail.com> <52F5568F.8080608@elbonia.de> <F723135E32F9984ABC5B614F28BF2491019F5941@UWIT-MBX06.exchange.washington.edu> Message-ID: <52F65F86.8070105@elbonia.de> I have updated this to be more useful and much faster. It was very slow because the code snipped entered edit mode to render the graphics. Once I skipped this, it is actually fast. You can find the very experimental extension as clipboard_dragdrop.js in the folder usability here: https://github.com/ipython-contrib A short demo video is here: http://youtu.be/buAL1bTZ73c Am 08.02.2014 17:32, schrieb Abraham D. Flaxman: > This works for me, and it is something I've thought would be useful for a while now. So thanks! I put an example notebook together using it here: http://nbviewer.ipython.org/gist/aflaxman/8886274 > > I agree that it is slow, but I want it so much I'm willing to wait. But do you have any thoughts on how it can go faster? > > --Abie > > > -----Original Message----- > From: ipython-dev-bounces at scipy.org [mailto:ipython-dev-bounces at scipy.org] On Behalf Of Juergen Hasch > Sent: Friday, February 07, 2014 1:57 PM > To: IPython developers list > Subject: Re: [IPython-dev] Paste images into the notebook > > This is my hack. Slow as hell for anything larger than some 10k. > > window.addEventListener('paste', function(event){ > var cell = IPython.notebook.get_selected_cell(); > var items = event.clipboardData.items; > for (var i = 0; i < items.length; ++i) { > if (items[i].kind == 'file' && items[i].type.indexOf('image/') !== -1) { > var blob = items[i].getAsFile(); > window.URL = window.URL || window.webkitURL; > var blobUrl = window.URL.createObjectURL(blob); > var img = document.createElement('img'); > img.src = blobUrl; > > var reader = new FileReader(); > reader.onload = ( function(evt) { > var new_cell = IPython.notebook.insert_cell_below('markdown'); > var str = '<img src="' + evt.target.result + '">'; > new_cell.set_text(str); > new_cell.edit_mode(); > new_cell.execute(); > } ); > reader.readAsDataURL(blob); > } > } > }); > > > > Am 07.02.2014 22:48, schrieb Raymond Yee: >> Juergen, >> >> Can you publish your code? I'm definitely interested in this feature >> even if it's hacky. >> >> Thanks, >> >> -Raymond >> >> On 2/7/14 1:47 PM, Juergen Hasch wrote: >>> Am 07.02.2014 22:29, schrieb Matthias BUSSONNIER: >>>> Hi there, >>>> >>>> >>>> Le 7 f?vr. 2014 ? 21:04, Edeler, Torsten a ?crit : >>>> >>>>> Hi everybody. >>>>> I'm playing around with the notebook. >>>>> It is fantastic! Thank you for this amazing piece of software! >>>>> >>>>> I'm just missing the ability to paste images directly from the clipboard (e.g. screenshots) into the notebook. My OS is Win7. How do I make that work? >>>>> >>>> Short answer is you can't. >>> Actually, it works :-) >>> >>> It only takes around 15 lines of Javascript code to implement this as clipboard paste event for Chrome. >>> All you have to do is receive the image from clipboard, create a markdown cell, and paste the image as base64. >>> >>> Not efficient and slow as hell for larger images, so I won't say this >>> is a viable solution. Still, technically it can be done. >>> >>> >>> >>> _______________________________________________ >>> 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 tburnett at myuw.net Sat Feb 8 13:35:30 2014 From: tburnett at myuw.net (Toby Burnett) Date: Sat, 8 Feb 2014 18:35:30 +0000 Subject: [IPython-dev] notebook display Message-ID: <bef05d3bb0a541edaa0dd8ea17f03b15@BLUPR01MB306.prod.exchangelabs.com> There are two status indicators in the v2-dev notebook display that I'd like to enhance: * Kernel Busy indication * Edit mode Both are very important to know, but neither is displayed very prominently; a small bit of text in the upper corner for the former, a rather thin green line for the latter. Since Kernel Busy affects the entire notebook, I'd like a more global indicator, to make it clear that there is no point to try to execute a cell. (I don't know how many times I've forgotten to quit the debug, then wonder why nothing is happening. Or do a restart, and forget to wait for that text to go away.) Edit mode should be rather easy, just increase the width. So I'd like to experiment with alternatives, by adjusting the css. There is a way, I seem to remember, for a user to customize the relevant css. Could someone point me to the instructions, or suggest changes? --Toby Burnett -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140208/1b6d4dc9/attachment.html> From ellisonbg at gmail.com Sat Feb 8 15:25:32 2014 From: ellisonbg at gmail.com (Brian Granger) Date: Sat, 8 Feb 2014 12:25:32 -0800 Subject: [IPython-dev] notebook display In-Reply-To: <bef05d3bb0a541edaa0dd8ea17f03b15@BLUPR01MB306.prod.exchangelabs.com> References: <bef05d3bb0a541edaa0dd8ea17f03b15@BLUPR01MB306.prod.exchangelabs.com> Message-ID: <CAH4pYpSj-5srn+17hxhPT2OzY=n7bSO5NJ0g3heNYvc5Oph-og@mail.gmail.com> We have added new global kernel and edit/command mode indicators in a recent pull request - just today. Can you pull the latest and let us know what you think? Cheers, Brian On Sat, Feb 8, 2014 at 10:35 AM, Toby Burnett <tburnett at myuw.net> wrote: > There are two status indicators in the v2-dev notebook display that I'd like > to enhance: > > > > ? Kernel Busy indication > > ? Edit mode > > Both are very important to know, but neither is displayed very prominently; > a small bit of text in the upper corner for the former, a rather thin green > line for the latter. Since Kernel Busy affects the entire notebook, I'd like > a more global indicator, to make it clear that there is no point to try to > execute a cell. (I don't know how many times I've forgotten to quit the > debug, then wonder why nothing is happening. Or do a restart, and forget to > wait for that text to go away.) Edit mode should be rather easy, just > increase the width. > > > > So I'd like to experiment with alternatives, by adjusting the css. There is > a way, I seem to remember, for a user to customize the relevant css. Could > someone point me to the instructions, or suggest changes? > > > > --Toby Burnett > > > _______________________________________________ > 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 Feb 8 17:20:32 2014 From: ellisonbg at gmail.com (Brian Granger) Date: Sat, 8 Feb 2014 14:20:32 -0800 Subject: [IPython-dev] Default values for widgets In-Reply-To: <20140208070831.GC12156@gmail.com> References: <20140208062738.GB12156@gmail.com> <CAH4pYpSOJCoiOEhGZEJYG5uUmd-B6D+pmwONEuprYa-Kud4_Hw@mail.gmail.com> <20140208070831.GC12156@gmail.com> Message-ID: <CAH4pYpSBEZURnCLne6WE3u-MDn_2vBCa1NvByh9H37NK9aMEfQ@mail.gmail.com> Thinking a bit more... Right now, we look at the following places for widget abbreviations: 1. kwargs to interact 2. annotations 3. defaults to individual keyword args in the def of the function. I think it is a bit dangerous to do 3. It would probably be a better solution to use 3 for setting the initial value of the widget. Otherwise, I think we are making defaults for functions do too many things. Stefan, want to open an issue on this? If others like it, you could even to a PR ;-) It shouldn't be too difficult. Cheers, Brian On Fri, Feb 7, 2014 at 11:08 PM, St?fan van der Walt <stefan at sun.ac.za> wrote: > On Fri, 07 Feb 2014 22:56:36 -0800, Brian Granger wrote: >> interact(f, a=FloatSliderWidget(..., value=10), ...) > > That will do the trick for me, thanks. > >> We decided that we wanted to keep the abbreviations as simple as >> possible and just allow people to pass Widgets for the more >> complicated usage cases. Part of this is that we are wanting to be as >> slow/conservative as possible in introducing complexity to new APIs. >> We want to see how this stuff works in practice and gather data from >> our users (like this!). > > The data point for me then is that it feels unintuitive that the default > keyword argument is not respected. > > Thanks for all your hard work on this! > > 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 stefan at sun.ac.za Sat Feb 8 17:47:25 2014 From: stefan at sun.ac.za (=?iso-8859-1?Q?St=E9fan?= van der Walt) Date: Sun, 9 Feb 2014 00:47:25 +0200 Subject: [IPython-dev] Default values for widgets In-Reply-To: <CAH4pYpSBEZURnCLne6WE3u-MDn_2vBCa1NvByh9H37NK9aMEfQ@mail.gmail.com> References: <20140208062738.GB12156@gmail.com> <CAH4pYpSOJCoiOEhGZEJYG5uUmd-B6D+pmwONEuprYa-Kud4_Hw@mail.gmail.com> <20140208070831.GC12156@gmail.com> <CAH4pYpSBEZURnCLne6WE3u-MDn_2vBCa1NvByh9H37NK9aMEfQ@mail.gmail.com> Message-ID: <20140208224725.GE20211@gmail.com> On Sat, 08 Feb 2014 14:20:32 -0800, Brian Granger wrote: > Right now, we look at the following places for widget abbreviations: > > 1. kwargs to interact > 2. annotations > 3. defaults to individual keyword args in the def of the function. I can certainly add a PR to set the default widget value from the keyword. Another question: how do you prevent a keyword argument from being turned into a widget? Currently all arguments are processed, irrespective of whether they are specified in "interactive". St?fan From ellisonbg at gmail.com Sat Feb 8 17:56:40 2014 From: ellisonbg at gmail.com (Brian Granger) Date: Sat, 8 Feb 2014 14:56:40 -0800 Subject: [IPython-dev] Default values for widgets In-Reply-To: <20140208224725.GE20211@gmail.com> References: <20140208062738.GB12156@gmail.com> <CAH4pYpSOJCoiOEhGZEJYG5uUmd-B6D+pmwONEuprYa-Kud4_Hw@mail.gmail.com> <20140208070831.GC12156@gmail.com> <CAH4pYpSBEZURnCLne6WE3u-MDn_2vBCa1NvByh9H37NK9aMEfQ@mail.gmail.com> <20140208224725.GE20211@gmail.com> Message-ID: <CAH4pYpTPhdcZcBE7Od_r-bxxbva7d=0a+i+qsoZTOf4QVtVAkQ@mail.gmail.com> This function: https://github.com/ipython/ipython/blob/master/IPython/html/widgets/interaction.py#L121 has two branches where it tests for: elif default is not empty: Just remove those. Then you would need to add logic *after* the actual widgets that does something like: widget.value = default To set the value to the default. The only difficulty is for something like a slider widget with finite step sizes, we would have to think about what to do if the value wasn't at a valid step: (0, 100, 10) with a default of 33 We could just allow it , or we could raise a ValueError. On Sat, Feb 8, 2014 at 2:47 PM, St?fan van der Walt <stefan at sun.ac.za> wrote: > On Sat, 08 Feb 2014 14:20:32 -0800, Brian Granger wrote: >> Right now, we look at the following places for widget abbreviations: >> >> 1. kwargs to interact >> 2. annotations >> 3. defaults to individual keyword args in the def of the function. > > I can certainly add a PR to set the default widget value from the keyword. > Another question: how do you prevent a keyword argument from being turned into > a widget? Currently all arguments are processed, irrespective of whether they > are specified in "interactive". > > 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 doug.blank at gmail.com Sun Feb 9 07:59:48 2014 From: doug.blank at gmail.com (Doug Blank) Date: Sun, 9 Feb 2014 07:59:48 -0500 Subject: [IPython-dev] Suggestions for easier understanding Message-ID: <CAAusYCji-6AYQiHCxYkf95ty4ivzaJqq-5CpcSKA9JyDt4Nvxw@mail.gmail.com> Devs, In looking over the new example notebooks (which are great to learn the new features), I see a couple of places that could use a little polish to make them easier to understand, especially for those that aren't expert programmers. For example, taking a look at: http://nbviewer.ipython.org/github/ipython/ipython/blob/master/examples/widgets/Part%202%20-%20Events.ipynb it would be easy to change: print(widgets.Widget.on_trait_change.__doc__) to: help(widgets.Widget.on_trait_change) which actually looks better, is more informative (even for experts), and hides unnecessary implementation details. Another suggestion is to consider hiding the implementational "trait" details. One could use the interface by just thinking in terms of standard Python terms, such as "attribute" or "value". For example, the code: """ def on_value_change(name, value): print(value) int_range.on_trait_change(on_value_change, 'value') """ might be easier to understand if it were: """ def callback(name, new_value): print(name, "changed to", new_value) int_range.on_value_change(callback, 'value') """ Another reason to consider using the method name "on_value_change" rather than "on_trait_change" is that I'm replicating this API for a different kernel, and the implementation doesn't use "traitlets". Doesn't seem necessary to have this implementational detail show in the UI. What do you think? -Doug -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140209/d9fa1804/attachment.html> From tburnett at myuw.net Sun Feb 9 13:37:09 2014 From: tburnett at myuw.net (Toby Burnett) Date: Sun, 9 Feb 2014 18:37:09 +0000 Subject: [IPython-dev] notebook display In-Reply-To: <mailman.1.1391968801.4789.ipython-dev@scipy.org> References: <mailman.1.1391968801.4789.ipython-dev@scipy.org> Message-ID: <5b510b1c02fd4f7b9faa5999be2d5d8a@BLUPR01MB306.prod.exchangelabs.com> pip install on the current version gives me this: AssertionError: Missing package data: IPython/html/static/components/backbone/backbone-min.js --Toby From: ipython-dev-request at scipy.org<mailto:ipython-dev-request at scipy.org> Sent: ?Sunday?, ?February? ?9?, ?2014 ?10?:?06 To: 'ipython-dev at scipy.org'<mailto:ipython-dev at scipy.org> Send IPython-dev mailing list submissions to ipython-dev at scipy.org To subscribe or unsubscribe via the World Wide Web, visit http://mail.scipy.org/mailman/listinfo/ipython-dev or, via email, send a message with subject or body 'help' to ipython-dev-request at scipy.org You can reach the person managing the list at ipython-dev-owner at scipy.org When replying, please edit your Subject line so it is more specific than "Re: Contents of IPython-dev digest..." Today's Topics: 1. notebook display (Toby Burnett) 2. Re: notebook display (Brian Granger) 3. Re: Default values for widgets (Brian Granger) 4. Re: Default values for widgets (St?fan van der Walt) 5. Re: Default values for widgets (Brian Granger) 6. Suggestions for easier understanding (Doug Blank) ---------------------------------------------------------------------- Message: 1 Date: Sat, 8 Feb 2014 18:35:30 +0000 From: Toby Burnett <tburnett at myuw.net> Subject: [IPython-dev] notebook display To: "'ipython-dev at scipy.org'" <ipython-dev at scipy.org> Message-ID: <bef05d3bb0a541edaa0dd8ea17f03b15 at BLUPR01MB306.prod.exchangelabs.com> Content-Type: text/plain; charset="us-ascii" There are two status indicators in the v2-dev notebook display that I'd like to enhance: * Kernel Busy indication * Edit mode Both are very important to know, but neither is displayed very prominently; a small bit of text in the upper corner for the former, a rather thin green line for the latter. Since Kernel Busy affects the entire notebook, I'd like a more global indicator, to make it clear that there is no point to try to execute a cell. (I don't know how many times I've forgotten to quit the debug, then wonder why nothing is happening. Or do a restart, and forget to wait for that text to go away.) Edit mode should be rather easy, just increase the width. So I'd like to experiment with alternatives, by adjusting the css. There is a way, I seem to remember, for a user to customize the relevant css. Could someone point me to the instructions, or suggest changes? --Toby Burnett -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.scipy.org/pipermail/ipython-dev/attachments/20140208/1b6d4dc9/attachment-0001.html ------------------------------ Message: 2 Date: Sat, 8 Feb 2014 12:25:32 -0800 From: Brian Granger <ellisonbg at gmail.com> Subject: Re: [IPython-dev] notebook display To: IPython developers list <ipython-dev at scipy.org> Message-ID: <CAH4pYpSj-5srn+17hxhPT2OzY=n7bSO5NJ0g3heNYvc5Oph-og at mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 We have added new global kernel and edit/command mode indicators in a recent pull request - just today. Can you pull the latest and let us know what you think? Cheers, Brian On Sat, Feb 8, 2014 at 10:35 AM, Toby Burnett <tburnett at myuw.net> wrote: > There are two status indicators in the v2-dev notebook display that I'd like > to enhance: > > > > ? Kernel Busy indication > > ? Edit mode > > Both are very important to know, but neither is displayed very prominently; > a small bit of text in the upper corner for the former, a rather thin green > line for the latter. Since Kernel Busy affects the entire notebook, I'd like > a more global indicator, to make it clear that there is no point to try to > execute a cell. (I don't know how many times I've forgotten to quit the > debug, then wonder why nothing is happening. Or do a restart, and forget to > wait for that text to go away.) Edit mode should be rather easy, just > increase the width. > > > > So I'd like to experiment with alternatives, by adjusting the css. There is > a way, I seem to remember, for a user to customize the relevant css. Could > someone point me to the instructions, or suggest changes? > > > > --Toby Burnett > > > _______________________________________________ > 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 ------------------------------ Message: 3 Date: Sat, 8 Feb 2014 14:20:32 -0800 From: Brian Granger <ellisonbg at gmail.com> Subject: Re: [IPython-dev] Default values for widgets To: IPython developers list <ipython-dev at scipy.org> Message-ID: <CAH4pYpSBEZURnCLne6WE3u-MDn_2vBCa1NvByh9H37NK9aMEfQ at mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Thinking a bit more... Right now, we look at the following places for widget abbreviations: 1. kwargs to interact 2. annotations 3. defaults to individual keyword args in the def of the function. I think it is a bit dangerous to do 3. It would probably be a better solution to use 3 for setting the initial value of the widget. Otherwise, I think we are making defaults for functions do too many things. Stefan, want to open an issue on this? If others like it, you could even to a PR ;-) It shouldn't be too difficult. Cheers, Brian On Fri, Feb 7, 2014 at 11:08 PM, St?fan van der Walt <stefan at sun.ac.za> wrote: > On Fri, 07 Feb 2014 22:56:36 -0800, Brian Granger wrote: >> interact(f, a=FloatSliderWidget(..., value=10), ...) > > That will do the trick for me, thanks. > >> We decided that we wanted to keep the abbreviations as simple as >> possible and just allow people to pass Widgets for the more >> complicated usage cases. Part of this is that we are wanting to be as >> slow/conservative as possible in introducing complexity to new APIs. >> We want to see how this stuff works in practice and gather data from >> our users (like this!). > > The data point for me then is that it feels unintuitive that the default > keyword argument is not respected. > > Thanks for all your hard work on this! > > 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 ------------------------------ Message: 4 Date: Sun, 9 Feb 2014 00:47:25 +0200 From: St?fan van der Walt <stefan at sun.ac.za> Subject: Re: [IPython-dev] Default values for widgets To: IPython developers list <ipython-dev at scipy.org> Message-ID: <20140208224725.GE20211 at gmail.com> Content-Type: text/plain; charset=iso-8859-1 On Sat, 08 Feb 2014 14:20:32 -0800, Brian Granger wrote: > Right now, we look at the following places for widget abbreviations: > > 1. kwargs to interact > 2. annotations > 3. defaults to individual keyword args in the def of the function. I can certainly add a PR to set the default widget value from the keyword. Another question: how do you prevent a keyword argument from being turned into a widget? Currently all arguments are processed, irrespective of whether they are specified in "interactive". St?fan ------------------------------ Message: 5 Date: Sat, 8 Feb 2014 14:56:40 -0800 From: Brian Granger <ellisonbg at gmail.com> Subject: Re: [IPython-dev] Default values for widgets To: IPython developers list <ipython-dev at scipy.org> Message-ID: <CAH4pYpTPhdcZcBE7Od_r-bxxbva7d=0a+i+qsoZTOf4QVtVAkQ at mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 This function: https://github.com/ipython/ipython/blob/master/IPython/html/widgets/interaction.py#L121 has two branches where it tests for: elif default is not empty: Just remove those. Then you would need to add logic *after* the actual widgets that does something like: widget.value = default To set the value to the default. The only difficulty is for something like a slider widget with finite step sizes, we would have to think about what to do if the value wasn't at a valid step: (0, 100, 10) with a default of 33 We could just allow it , or we could raise a ValueError. On Sat, Feb 8, 2014 at 2:47 PM, St?fan van der Walt <stefan at sun.ac.za> wrote: > On Sat, 08 Feb 2014 14:20:32 -0800, Brian Granger wrote: >> Right now, we look at the following places for widget abbreviations: >> >> 1. kwargs to interact >> 2. annotations >> 3. defaults to individual keyword args in the def of the function. > > I can certainly add a PR to set the default widget value from the keyword. > Another question: how do you prevent a keyword argument from being turned into > a widget? Currently all arguments are processed, irrespective of whether they > are specified in "interactive". > > 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 ------------------------------ Message: 6 Date: Sun, 9 Feb 2014 07:59:48 -0500 From: Doug Blank <doug.blank at gmail.com> Subject: [IPython-dev] Suggestions for easier understanding To: IPython developers list <ipython-dev at scipy.org> Message-ID: <CAAusYCji-6AYQiHCxYkf95ty4ivzaJqq-5CpcSKA9JyDt4Nvxw at mail.gmail.com> Content-Type: text/plain; charset="iso-8859-1" Devs, In looking over the new example notebooks (which are great to learn the new features), I see a couple of places that could use a little polish to make them easier to understand, especially for those that aren't expert programmers. For example, taking a look at: http://nbviewer.ipython.org/github/ipython/ipython/blob/master/examples/widgets/Part%202%20-%20Events.ipynb it would be easy to change: print(widgets.Widget.on_trait_change.__doc__) to: help(widgets.Widget.on_trait_change) which actually looks better, is more informative (even for experts), and hides unnecessary implementation details. Another suggestion is to consider hiding the implementational "trait" details. One could use the interface by just thinking in terms of standard Python terms, such as "attribute" or "value". For example, the code: """ def on_value_change(name, value): print(value) int_range.on_trait_change(on_value_change, 'value') """ might be easier to understand if it were: """ def callback(name, new_value): print(name, "changed to", new_value) int_range.on_value_change(callback, 'value') """ Another reason to consider using the method name "on_value_change" rather than "on_trait_change" is that I'm replicating this API for a different kernel, and the implementation doesn't use "traitlets". Doesn't seem necessary to have this implementational detail show in the UI. What do you think? -Doug -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.scipy.org/pipermail/ipython-dev/attachments/20140209/d9fa1804/attachment-0001.html ------------------------------ _______________________________________________ IPython-dev mailing list IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev End of IPython-dev Digest, Vol 121, Issue 11 ******************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140209/3b02ee63/attachment.html> From benjaminrk at gmail.com Sun Feb 9 16:17:12 2014 From: benjaminrk at gmail.com (MinRK) Date: Sun, 9 Feb 2014 13:17:12 -0800 Subject: [IPython-dev] Suggestions for easier understanding In-Reply-To: <CAAusYCji-6AYQiHCxYkf95ty4ivzaJqq-5CpcSKA9JyDt4Nvxw@mail.gmail.com> References: <CAAusYCji-6AYQiHCxYkf95ty4ivzaJqq-5CpcSKA9JyDt4Nvxw@mail.gmail.com> Message-ID: <CAHNn8BVZtjRPpoy3eRZOF5aRSUU6nxP1tAjL6nEjGt=hw-XWkA@mail.gmail.com> On Sun, Feb 9, 2014 at 4:59 AM, Doug Blank <doug.blank at gmail.com> wrote: > Devs, > > In looking over the new example notebooks (which are great to learn the > new features), I see a couple of places that could use a little polish to > make them easier to understand, especially for those that aren't expert > programmers. For example, taking a look at: > > > http://nbviewer.ipython.org/github/ipython/ipython/blob/master/examples/widgets/Part%202%20-%20Events.ipynb > > it would be easy to change: > > print(widgets.Widget.on_trait_change.__doc__) > > to: > > help(widgets.Widget.on_trait_change) > Or the IPython way: `widgets.Widget.on_trait_change?` It's been many years since I called `help` on something. > > which actually looks better, is more informative (even for experts), and > hides unnecessary implementation details. Another suggestion is to consider > hiding the implementational "trait" details. One could use the interface by > just thinking in terms of standard Python terms, such as "attribute" or > "value". For example, the code: > > """ > def on_value_change(name, value): > print(value) > int_range.on_trait_change(on_value_change, 'value') > """ > > might be easier to understand if it were: > > """ > def callback(name, new_value): > print(name, "changed to", new_value) > int_range.on_value_change(callback, 'value') > """ > > Another reason to consider using the method name "on_value_change" rather > than "on_trait_change" is that I'm replicating this API for a different > kernel, and the implementation doesn't use "traitlets". Doesn't seem > necessary to have this implementational detail show in the UI. > > What do you think? > The events themselves are an implementation detail, and traitlets are the most logical way to implement them in IPython, so we use the traitlets API. I don't think there is a good reason to hide that. The part that is generic about widgets is some mechanism for synchronizing state (the messages), and we do not intend to enforce any kind of uniformity in APIs on kernels. I think there is a doc missing that's at the right level - what is the part of widgets that's actually generic and language agnostic, and what is just part of the IPython kernel implementation. -MinRK > > -Doug > > _______________________________________________ > 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/20140209/e36a89ff/attachment.html> From doug.blank at gmail.com Sun Feb 9 17:37:49 2014 From: doug.blank at gmail.com (Doug Blank) Date: Sun, 9 Feb 2014 17:37:49 -0500 Subject: [IPython-dev] Suggestions for easier understanding In-Reply-To: <CAHNn8BVZtjRPpoy3eRZOF5aRSUU6nxP1tAjL6nEjGt=hw-XWkA@mail.gmail.com> References: <CAAusYCji-6AYQiHCxYkf95ty4ivzaJqq-5CpcSKA9JyDt4Nvxw@mail.gmail.com> <CAHNn8BVZtjRPpoy3eRZOF5aRSUU6nxP1tAjL6nEjGt=hw-XWkA@mail.gmail.com> Message-ID: <CAAusYCjWefE-kNhdP6uNwuzHSM8Xvp6FXvL5_pZx+irRGsseyw@mail.gmail.com> Thanks for the feedback; comments below: On Sun, Feb 9, 2014 at 4:17 PM, MinRK <benjaminrk at gmail.com> wrote: > > > On Sun, Feb 9, 2014 at 4:59 AM, Doug Blank <doug.blank at gmail.com> wrote: > >> Devs, >> >> In looking over the new example notebooks (which are great to learn the >> new features), I see a couple of places that could use a little polish to >> make them easier to understand, especially for those that aren't expert >> programmers. For example, taking a look at: >> >> >> http://nbviewer.ipython.org/github/ipython/ipython/blob/master/examples/widgets/Part%202%20-%20Events.ipynb >> >> it would be easy to change: >> >> print(widgets.Widget.on_trait_change.__doc__) >> >> to: >> >> help(widgets.Widget.on_trait_change) >> > > Or the IPython way: `widgets.Widget.on_trait_change?` > It's been many years since I called `help` on something. > > Sure, demonstrating the ? is even better. > > >> >> which actually looks better, is more informative (even for experts), and >> hides unnecessary implementation details. Another suggestion is to consider >> hiding the implementational "trait" details. One could use the interface by >> just thinking in terms of standard Python terms, such as "attribute" or >> "value". For example, the code: >> >> """ >> def on_value_change(name, value): >> print(value) >> int_range.on_trait_change(on_value_change, 'value') >> """ >> >> might be easier to understand if it were: >> >> """ >> def callback(name, new_value): >> print(name, "changed to", new_value) >> int_range.on_value_change(callback, 'value') >> """ >> >> Another reason to consider using the method name "on_value_change" rather >> than "on_trait_change" is that I'm replicating this API for a different >> kernel, and the implementation doesn't use "traitlets". Doesn't seem >> necessary to have this implementational detail show in the UI. >> >> What do you think? >> > > The events themselves are an implementation detail, and traitlets are the > most logical way to implement them in IPython, so we use the traitlets API. > I don't think there is a good reason to hide that. The part that is generic > about widgets is some mechanism for synchronizing state (the messages), and > we do not intend to enforce any kind of uniformity in APIs on kernels. > > My point is that it would be nice to have uniformity across kernels by using the same method names to attach the callbacks. But having "trait" in the API is unnecessary, and requires further explanation to the students. (And what happens in the future if you re-implement the mechanism with a different paradigm?) I'm not suggesting to hide the the fact that you use traitlets; just suggesting that it doesn't need to be in the API. > I think there is a doc missing that's at the right level - what is the > part of widgets that's actually generic and language agnostic, and what is > just part of the IPython kernel implementation. > > Yes, of course, these aren't designed for beginners. But just pointing out that there are places where implementation details pop through. -Doug > -MinRK > > > >> >> -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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140209/bca12672/attachment.html> From pelson.pub at gmail.com Mon Feb 10 05:02:15 2014 From: pelson.pub at gmail.com (Phil Elson) Date: Mon, 10 Feb 2014 10:02:15 +0000 Subject: [IPython-dev] Cartopy - was maps inline In-Reply-To: <20140130203414.495our33k04c804w@webmail.light42.com> References: <20140130203414.495our33k04c804w@webmail.light42.com> Message-ID: <CA+L60sDD-Orp6w=duGpuCzvhShV+A=LY+yCS9wsua+BEB7fn3Q@mail.gmail.com> Hi Brian, Thanks for the free publicity :) You're right - the notebook is killer for sharing examples (e.g. http://nbviewer.ipython.org/gist/pelson/7772265) and we're making pretty heavy use of it. I'm also super keen to convert the cartopy gallery ( http://scitools.org.uk/cartopy/docs/latest/gallery.html) to be notebook based - I think all the tools are available with IPython now, it's just a case of joining them all together and applying a bit of Python glue. Finally, a huge success story for me has been the course material that I've been able to write with the notebook. It's still in a state of flux, but I've been teaching introductions to numpy (3.5 hrs), matplotlib (3 hrs), cartopy (0.5 hrs) and iris (6 hrs) to experienced weather/climate research scientists using nothing but IPython notebook, and I've set up each of the students with notebook environments for the class exercises. If anybody is interested, the material is available on github ( https://github.com/SciTools/courses) and as an example, the Iris course can be seen on nbviewer at http://nbviewer.ipython.org/github/SciTools/courses/blob/master/course_content/iris_intro.ipynb. I've said it before, but I'll say it again - IPython notebook absolutely rocks so thank you to everybody who has been involved in its conception and development! Cheers, Phil On 31 January 2014 04:34, <maplabs at light42.com> wrote: > 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 > > _______________________________________________ > 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/20140210/2dd15480/attachment.html> From raymond.yee at gmail.com Mon Feb 10 14:14:17 2014 From: raymond.yee at gmail.com (Raymond Yee) Date: Mon, 10 Feb 2014 11:14:17 -0800 Subject: [IPython-dev] Experiences getting a d3.js example working in the Notebook and request for advice Message-ID: <52F92509.5050701@gmail.com> Hi everyone, Like many of you, I'm excited about the widgets and interact functionality. But as someone whose JavaScript skills and front-end web dev skills are modest (but which are rapidly growing while I'm learning about how to do more in the Notebook!), I have been focusing first on how to use the Notebook as a possible environment for the learning and teaching of HTML, CSS, and JavaScript. I like things like jsfiddle.net as environments to try out and share small units of front end web programming and wonder how to use the Notebook in a similar fashion. As a short term challenge, I'm looking at learning/teaching d3.js using the Notebook -- and using d3.js specifically to plot US-related census data at the county level. I've wanted to rework Mike Bostock's Choropleth (http://bl.ocks.org/mbostock/4060606) example into IPython Notebook code that can take data calculated via Python and then displayed using d3. I *think* I just figured out how to make the Choropleth example show up in a Notebook: http://nbviewer.ipython.org/github/rdhyee/working-open-data-2014/blob/master/notebooks/Day_07_A_D3_Choropleth.ipynb whose workings I illustrate in a silent video: http://www.youtube.com/watch?v=Vfc8nzR15ME I wrote up the mistakes I made to document the stumbling blocks for other novices to avoid. This example is not likely to be a big deal to experts -- but I'm interested in knowing whether I'm taking the right approach and how this example can be improved. Specifically: * Am I using requirejs correctly to load the external libraries in the Notebook? * What will be the best way for me to dynamically construct data in Python to pass to d3? I'll want to replace the unemployment data (in unemployment.csv that d3 loads externally) to something I can pass to d3 from Python. Should I serialize the Python object into JSON, which I can embed as a JavaScript literal in the code? Or is there a way for me to serve up JSON data via a local URL (served up by the Notebook machinery)? If so, should I write the data out to a file that can be served up by the Notebook via http? Or is there a way to serve up data without explicitly writing to the local filesystem? * What gotchas should I be aware of, especially as someone who wants to show this in class tomorrow or later this week? :-) * Any tips on how I might think of turning my code into can be used with interact? Thanks in advance, -Raymond From jakevdp at cs.washington.edu Mon Feb 10 14:19:43 2014 From: jakevdp at cs.washington.edu (Jacob Vanderplas) Date: Mon, 10 Feb 2014 11:19:43 -0800 Subject: [IPython-dev] Experiences getting a d3.js example working in the Notebook and request for advice In-Reply-To: <52F92509.5050701@gmail.com> References: <52F92509.5050701@gmail.com> Message-ID: <CACpqBg12izmAk8CAak-VCK=tYxNXB72eiKi5Lz9Dt3a7meL0GA@mail.gmail.com> One quick note: you're correct that you need to use require.js within the notebook, but nbviewer and other static views do not necessarily include require.js, so you need to provide an alternative d3-loading behavior. Here's the snippet of JS that I used to get around this issue within mpld3: https://github.com/jakevdp/mpld3/blob/master/mpld3/_objects.py#L186 Hope that helps, Jake On Mon, Feb 10, 2014 at 11:14 AM, Raymond Yee <raymond.yee at gmail.com> wrote: > Hi everyone, > > Like many of you, I'm excited about the widgets and interact > functionality. But as someone whose JavaScript skills and front-end web > dev skills are modest (but which are rapidly growing while I'm learning > about how to do more in the Notebook!), I have been focusing first on > how to use the Notebook as a possible environment for the learning and > teaching of HTML, CSS, and JavaScript. I like things like jsfiddle.net > as environments to try out and share small units of front end web > programming and wonder how to use the Notebook in a similar fashion. > > As a short term challenge, I'm looking at learning/teaching d3.js using > the Notebook -- and using d3.js specifically to plot US-related census > data at the county level. I've wanted to rework Mike Bostock's > Choropleth (http://bl.ocks.org/mbostock/4060606) example into IPython > Notebook code that can take data calculated via Python and then > displayed using d3. > > I *think* I just figured out how to make the Choropleth example show up > in a Notebook: > > > > http://nbviewer.ipython.org/github/rdhyee/working-open-data-2014/blob/master/notebooks/Day_07_A_D3_Choropleth.ipynb > > whose workings I illustrate in a silent video: > > http://www.youtube.com/watch?v=Vfc8nzR15ME > > I wrote up the mistakes I made to document the stumbling blocks for > other novices to avoid. This example is not likely to be a big deal to > experts -- but I'm interested in knowing whether I'm taking the right > approach and how this example can be improved. Specifically: > > * Am I using requirejs correctly to load the external libraries in the > Notebook? > > * What will be the best way for me to dynamically construct data in > Python to pass to d3? I'll want to replace the unemployment data (in > unemployment.csv that d3 loads externally) to something I can pass to > d3 from Python. Should I serialize the Python object into JSON, which I > can embed as a JavaScript literal in the code? Or is there a way for me > to serve up JSON data via a local URL (served up by the Notebook > machinery)? If so, should I write the data out to a file that can be > served up by the Notebook via http? Or is there a way to serve up data > without explicitly writing to the local filesystem? > > * What gotchas should I be aware of, especially as someone who wants to > show this in class tomorrow or later this week? :-) > > * Any tips on how I might think of turning my code into can be used with > interact? > > Thanks in advance, > > -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/20140210/2bc34102/attachment.html> From raymond.yee at gmail.com Mon Feb 10 15:46:31 2014 From: raymond.yee at gmail.com (Raymond Yee) Date: Mon, 10 Feb 2014 12:46:31 -0800 Subject: [IPython-dev] Cartopy - was maps inline In-Reply-To: <CA+L60sDD-Orp6w=duGpuCzvhShV+A=LY+yCS9wsua+BEB7fn3Q@mail.gmail.com> References: <20140130203414.495our33k04c804w@webmail.light42.com> <CA+L60sDD-Orp6w=duGpuCzvhShV+A=LY+yCS9wsua+BEB7fn3Q@mail.gmail.com> Message-ID: <52F93AA7.4090208@gmail.com> Hi Phil, I'd definitely like to try cartopy. I'm hesitant to dive in at the moment because according to http://scitools.org.uk/cartopy/docs/latest/index.html#installation, Installation of cartopy can currently only be done from source. Build instructions for specific operating systems can be found in the building from source section. I'm leading a class in which I've had everyone install anaconda on their laptops -- whether it be running OS X, Windows, or Linux. You know how hard it will be in practice to install cartopy under those conditions? Thanks, -Raymond On 2/10/14 2:02 AM, Phil Elson wrote: > Hi Brian, > > Thanks for the free publicity :) > > You're right - the notebook is killer for sharing examples > (e.g. http://nbviewer.ipython.org/gist/pelson/7772265) and we're > making pretty heavy use of it. I'm also super keen to convert the > cartopy gallery > (http://scitools.org.uk/cartopy/docs/latest/gallery.html) to be > notebook based - I think all the tools are available with IPython now, > it's just a case of joining them all together and applying a bit of > Python glue. > > Finally, a huge success story for me has been the course material that > I've been able to write with the notebook. It's still in a state of > flux, but I've been teaching introductions to numpy (3.5 hrs), > matplotlib (3 hrs), cartopy (0.5 hrs) and iris (6 hrs) to experienced > weather/climate research scientists using nothing but IPython > notebook, and I've set up each of the students with notebook > environments for the class exercises. If anybody is interested, the > material is available on github (https://github.com/SciTools/courses) > and as an example, the Iris course can be seen on nbviewer at > http://nbviewer.ipython.org/github/SciTools/courses/blob/master/course_content/iris_intro.ipynb > . > > I've said it before, but I'll say it again - IPython notebook > absolutely rocks so thank you to everybody who has been involved in > its conception and development! > > Cheers, > > Phil > > > > > On 31 January 2014 04:34, <maplabs at light42.com > <mailto:maplabs at light42.com>> wrote: > > 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 <http://blog.light42.com> > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org <mailto: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/20140210/a0e39ade/attachment.html> From lists at hilboll.de Mon Feb 10 16:03:16 2014 From: lists at hilboll.de (Andreas Hilboll) Date: Mon, 10 Feb 2014 22:03:16 +0100 Subject: [IPython-dev] Cartopy - was maps inline In-Reply-To: <52F93AA7.4090208@gmail.com> References: <20140130203414.495our33k04c804w@webmail.light42.com> <CA+L60sDD-Orp6w=duGpuCzvhShV+A=LY+yCS9wsua+BEB7fn3Q@mail.gmail.com> <52F93AA7.4090208@gmail.com> Message-ID: <52F93E94.9000204@hilboll.de> On 10.02.2014 21:46, Raymond Yee wrote: > Hi Phil, > > I'd definitely like to try cartopy. I'm hesitant to dive in at the > moment because according to > http://scitools.org.uk/cartopy/docs/latest/index.html#installation, > > Installation of cartopy can currently only be done from source. > Build instructions for specific operating systems can be found in the > building from source section. > > I'm leading a class in which I've had everyone install anaconda on their > laptops -- whether it be running OS X, Windows, or Linux. You know how > hard it will be in practice to install cartopy under those conditions? Just as a side note: last Friday I contacted the Anaconda team (aka. Continuum) to ask if they would include iris and cartopy in their anaconda distribution. They promised to add them to the package wishlist but told me to be patient since they have limited resources. Cheers, Andreas. > > Thanks, > -Raymond > > > On 2/10/14 2:02 AM, Phil Elson wrote: >> Hi Brian, >> >> Thanks for the free publicity :) >> >> You're right - the notebook is killer for sharing examples >> (e.g. http://nbviewer.ipython.org/gist/pelson/7772265) and we're >> making pretty heavy use of it. I'm also super keen to convert the >> cartopy gallery >> (http://scitools.org.uk/cartopy/docs/latest/gallery.html) to be >> notebook based - I think all the tools are available with IPython now, >> it's just a case of joining them all together and applying a bit of >> Python glue. >> >> Finally, a huge success story for me has been the course material that >> I've been able to write with the notebook. It's still in a state of >> flux, but I've been teaching introductions to numpy (3.5 hrs), >> matplotlib (3 hrs), cartopy (0.5 hrs) and iris (6 hrs) to experienced >> weather/climate research scientists using nothing but IPython >> notebook, and I've set up each of the students with notebook >> environments for the class exercises. If anybody is interested, the >> material is available on github (https://github.com/SciTools/courses) >> and as an example, the Iris course can be seen on nbviewer at >> http://nbviewer.ipython.org/github/SciTools/courses/blob/master/course_content/iris_intro.ipynb >> . >> >> I've said it before, but I'll say it again - IPython notebook >> absolutely rocks so thank you to everybody who has been involved in >> its conception and development! >> >> Cheers, >> >> Phil >> >> >> >> >> On 31 January 2014 04:34, <maplabs at light42.com >> <mailto:maplabs at light42.com>> wrote: >> >> 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 <http://blog.light42.com> >> >> _______________________________________________ >> IPython-dev mailing list >> IPython-dev at scipy.org <mailto: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 > -- -- Andreas. From patrick.surry at gmail.com Mon Feb 10 16:37:54 2014 From: patrick.surry at gmail.com (Patrick Surry) Date: Mon, 10 Feb 2014 16:37:54 -0500 Subject: [IPython-dev] Experiences getting a d3.js example working in the Notebook and request for advice Message-ID: <CAA-tCo4zoX6AC+E4URYFGwcM15xT2sac+caDHuoqNcxp1rZX-A@mail.gmail.com> Great stuff! I've been using pandas (http://pandas.pydata.org/) in the notebook to create data for D3. I've used both df.to_csv() and df.to_json() and methods to dump to CSV or serialize a dataframe to embed directly in a Javascript template for D3. But I hadn't worked out how to embed D3 in the notebook itself. Very handy. Thanks, Patrick > Like many of you, I'm excited about the widgets and interact > functionality. But as someone whose JavaScript skills and front-end web > dev skills are modest (but which are rapidly growing while I'm learning > about how to do more in the Notebook!), I have been focusing first on > how to use the Notebook as a possible environment for the learning and > teaching of HTML, CSS, and JavaScript. I like things like jsfiddle.net > as environments to try out and share small units of front end web > programming and wonder how to use the Notebook in a similar fashion. > > As a short term challenge, I'm looking at learning/teaching d3.js using > the Notebook -- and using d3.js specifically to plot US-related census > data at the county level. I've wanted to rework Mike Bostock's > Choropleth (http://bl.ocks.org/mbostock/4060606) example into IPython > Notebook code that can take data calculated via Python and then > displayed using d3. > > I *think* I just figured out how to make the Choropleth example show up > in a Notebook: > > > > http://nbviewer.ipython.org/github/rdhyee/working-open-data-2014/blob/master/notebooks/Day_07_A_D3_Choropleth.ipynb > > whose workings I illustrate in a silent video: > > http://www.youtube.com/watch?v=Vfc8nzR15ME > > I wrote up the mistakes I made to document the stumbling blocks for > other novices to avoid. This example is not likely to be a big deal to > experts -- but I'm interested in knowing whether I'm taking the right > approach and how this example can be improved. Specifically: > > * Am I using requirejs correctly to load the external libraries in the > Notebook? > > * What will be the best way for me to dynamically construct data in > Python to pass to d3? I'll want to replace the unemployment data (in > unemployment.csv that d3 loads externally) to something I can pass to > d3 from Python. Should I serialize the Python object into JSON, which I > can embed as a JavaScript literal in the code? Or is there a way for me > to serve up JSON data via a local URL (served up by the Notebook > machinery)? If so, should I write the data out to a file that can be > served up by the Notebook via http? Or is there a way to serve up data > without explicitly writing to the local filesystem? > > * What gotchas should I be aware of, especially as someone who wants to > show this in class tomorrow or later this week? :-) > > * Any tips on how I might think of turning my code into can be used with > interact? > > Thanks in advance, > > -Raymond > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140210/c98aa4f8/attachment.html> From alessandro.gagliardi at glassdoor.com Mon Feb 10 19:52:45 2014 From: alessandro.gagliardi at glassdoor.com (Alessandro Gagliardi) Date: Tue, 11 Feb 2014 00:52:45 +0000 Subject: [IPython-dev] 'module' object has no attribute 'SingleBlockManager' Message-ID: <CF1EB45A.510A%alessandro.gagliardi@glassdoor.com> Sorry for the cross-post. I can?t tell if this is an IPython issue, a scikit-learn issue, or a StarCluster issue. When I try to get back results from ExtraTreesRegressor from a load_balanced_view on StarCluster, I get: AttributeError: 'module' object has no attribute 'SingleBlockManager' Not sure if this is a StarCluster specific problem, an IPython.parallel, but, or an issue with the ExtraTreesRegressor. The weird thing is that it worked and then it didn?t and I don?t see what changed. I restarted the cluster, but that didn?t help. I?m using sklearn 0.14.1, StarCluster 0.95, IPython 1.1 remotely and IPython 2.0 locally. Thanks, -Alessandro -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140211/c924daed/attachment.html> From takowl at gmail.com Mon Feb 10 20:07:26 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Mon, 10 Feb 2014 17:07:26 -0800 Subject: [IPython-dev] 'module' object has no attribute 'SingleBlockManager' In-Reply-To: <CF1EB45A.510A%alessandro.gagliardi@glassdoor.com> References: <CF1EB45A.510A%alessandro.gagliardi@glassdoor.com> Message-ID: <CAOvn4qie=ogOAO3TjuKaRScJDATANtG1JhHeY579YmsNa-wpTg@mail.gmail.com> A quick search on Github suggests that SingleBlockManager is a pandas thing, but I don't know why it would be failing. On 10 February 2014 16:52, Alessandro Gagliardi < alessandro.gagliardi at glassdoor.com> wrote: > Sorry for the cross-post. I can't tell if this is an IPython issue, a > scikit-learn issue, or a StarCluster issue. > > When I try to get back results from ExtraTreesRegressor from a > load_balanced_view on StarCluster, I get: > > AttributeError: 'module' object has no attribute 'SingleBlockManager' > > Not sure if this is a StarCluster specific problem, an IPython.parallel, > but, or an issue with the ExtraTreesRegressor. The weird thing is that it > worked and then it didn't and I don't see what changed. I restarted the > cluster, but that didn't help. I'm using sklearn 0.14.1, StarCluster 0.95, > IPython 1.1 remotely and IPython 2.0 locally. > > Thanks, > -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/20140210/8fe4563e/attachment.html> From javi.martinez.lopez at gmail.com Tue Feb 11 03:59:21 2014 From: javi.martinez.lopez at gmail.com (=?ISO-8859-1?Q?Javier_Mart=EDnez=2DL=F3pez?=) Date: Tue, 11 Feb 2014 09:59:21 +0100 Subject: [IPython-dev] RandomForestClassifier w/ IPython.parallel In-Reply-To: <CF1A83C7.4FCF%alessandro.gagliardi@glassdoor.com> References: <CF1A83C7.4FCF%alessandro.gagliardi@glassdoor.com> Message-ID: <CAKgwV9md9dm8Vq=v_TDJyV_Sq943fOucYe3eU=88n6emHA08qA@mail.gmail.com> Hi, maybe you could also use the "bigrf" package in R through "rpy2": http://cran.r-project.org/web/packages/bigrf/index.html Cheers, Javier On Fri, Feb 7, 2014 at 9:36 PM, Alessandro Gagliardi <alessandro.gagliardi at glassdoor.com> wrote: > Not sure if I'm addressing the best list for this question, so if there's a > more appropriate list, please direct me to it. > > I want to run a large sklearn.ensemble.RandomForestClassifier (with maybe a > dozens or maybe hundreds of trees and 100,000 samples). My desktop won't > handle this so I want to try using StarCluster. RandomForestClassifier seems > to parallelize easily, but I don't know how I would split it across many > IPython.parallel engines (if that's even possible). (Or maybe I should be > foregoing IPython.parallel and using MPI?) > > Any help would be greatly appreciated. > > Thanks, > > Alessandro Gagliardi| Glassdoor| alessandro at glassdoor.com > > We're hiring! Check out our open jobs. > > Twitter | Facebook | Glassdoor Blog > > 2012 Webby Award Winner: Best Employment Site > > 2013 Webby Award Winner: Best Guides/Ratings/Review Site > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > From atakan.dogan at gmail.com Tue Feb 11 04:25:13 2014 From: atakan.dogan at gmail.com (Atakan Dogan) Date: Tue, 11 Feb 2014 11:25:13 +0200 Subject: [IPython-dev] Plot does not work in Lesson 1 Message-ID: <CAOqwZ4pXEbrzqytvSSDVdeJJ4GVBwesxaofr48rQmGeD9xfvQg@mail.gmail.com> Hi Guys, I followed the lesson 1 at http://nbviewer.ipython.org/urls/bitbucket.org/hrojas/learn-pandas/raw/master/lessons/01%20-%20Lesson.ipynb There was no problem until plotting (In [19]). There is no error but also there is no plotting, no screen. What can be the problem? I tried it on: Canopy Version 1.3.0 (32 bit) Windows 7 Enterpries (64 bit) Regards, Atakan -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140211/aad04e3b/attachment.html> From konrad.hinsen at fastmail.net Tue Feb 11 05:40:13 2014 From: konrad.hinsen at fastmail.net (Konrad Hinsen) Date: Tue, 11 Feb 2014 11:40:13 +0100 Subject: [IPython-dev] Running the test suite Message-ID: <21241.65037.821171.400885@Konrad-Hinsens-MacBook-Pro-2.local> My latest PR gets lots of test failures, so I am finally looking seriously at running the IPython test suite locally on my machine. Details: IPython master branch, Python 2.7/3.3, "installed" with 'python setup.py develop'. MacOS X 10.9. 1) The obvious approach: iptest All tests fail for the same reason: ImportError: cannot import name globalipapp globalipapp is a module under IPython/testing, so this looks like some issue with sys.path. Until now, I just decided to write my own little test scripts for my own modifications, which seemed like less effort than debugging the test system. But my own test scripts pass, whereas the official test suite fails, so I need to figure out how to run the official test suite. 2) Try running subsets: iptest config ... Same problem as under 1) iptest -v IPython.utils (copy-paste straight from the Wiki!) iptest: error: unrecognized arguments: -v 3) Run IPython/testing/ipython.py as script: python IPython/testing/iptest.py config Works fine, but it's a pain to run all parts individually. Moreover, the parts I know (what iptest lists) all pass, so there must be some other parts that I don't know about. python IPython/testing/iptest.py Fails because iptest.py accesses sys.argv[1] At this point I am willing to give up - would someone please tell me what the solution is? Thanks in advance, Konrad. From bussonniermatthias at gmail.com Tue Feb 11 05:46:15 2014 From: bussonniermatthias at gmail.com (Matthias BUSSONNIER) Date: Tue, 11 Feb 2014 11:46:15 +0100 Subject: [IPython-dev] Running the test suite In-Reply-To: <21241.65037.821171.400885@Konrad-Hinsens-MacBook-Pro-2.local> References: <21241.65037.821171.400885@Konrad-Hinsens-MacBook-Pro-2.local> Message-ID: <B2A863B1-2A8A-4A10-9A14-0440E38C8D9C@gmail.com> Are you running iptest from inside IPython dir ? Try running it from ~/ -- M Le 11 f?vr. 2014 ? 11:40, Konrad Hinsen a ?crit : > My latest PR gets lots of test failures, so I am finally looking > seriously at running the IPython test suite locally on my machine. > > Details: IPython master branch, Python 2.7/3.3, "installed" with > 'python setup.py develop'. MacOS X 10.9. > > 1) The obvious approach: > iptest > All tests fail for the same reason: > ImportError: cannot import name globalipapp > > globalipapp is a module under IPython/testing, so this looks like some > issue with sys.path. Until now, I just decided to write my own little > test scripts for my own modifications, which seemed like less effort > than debugging the test system. But my own test scripts pass, whereas > the official test suite fails, so I need to figure out how to run the > official test suite. > > 2) Try running subsets: > > iptest config ... > Same problem as under 1) > > iptest -v IPython.utils (copy-paste straight from the Wiki!) > iptest: error: unrecognized arguments: -v > > 3) Run IPython/testing/ipython.py as script: > > python IPython/testing/iptest.py config > Works fine, but it's a pain to run all parts individually. Moreover, > the parts I know (what iptest lists) all pass, so there must be > some other parts that I don't know about. > > python IPython/testing/iptest.py > Fails because iptest.py accesses sys.argv[1] > > At this point I am willing to give up - would someone please tell me what the > solution is? > > 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 Feb 11 07:01:56 2014 From: konrad.hinsen at fastmail.net (Konrad Hinsen) Date: Tue, 11 Feb 2014 13:01:56 +0100 Subject: [IPython-dev] Running the test suite In-Reply-To: <B2A863B1-2A8A-4A10-9A14-0440E38C8D9C@gmail.com> References: <21241.65037.821171.400885@Konrad-Hinsens-MacBook-Pro-2.local> <B2A863B1-2A8A-4A10-9A14-0440E38C8D9C@gmail.com> Message-ID: <21242.4404.98457.797467@Konrad-Hinsens-MacBook-Pro-2.local> Matthias BUSSONNIER writes: > Are you running iptest from inside IPython dir ? > > Try running it from ~/ Aaaahhhhh...... A proposal for a bit more user friendliness: http://github.com/ipython/ipython/pull/5090 Thanks, Konrad From nathan12343 at gmail.com Tue Feb 11 19:21:02 2014 From: nathan12343 at gmail.com (Nathan Goldbaum) Date: Tue, 11 Feb 2014 16:21:02 -0800 Subject: [IPython-dev] Removing displayed javascript Message-ID: <CAJXewO=VS_hE01fXa4cH04sod-jVmA+DuU3hQYMTwuAfenX+Hg@mail.gmail.com> Hi all, Recently I've been making use of the very nice notebook-aware fork of the python-progressbar library: https://github.com/fnoble/python-progressbar Inside a command-line session, this acts just like the original python-progressbar library, displaying a nicely formatted ascii progress bar. Inside of a notebook, it makes use of the display protocal to create a nicely formatted animated HTML progressbar using a bit of javascript to update the progressbar and clean up old elements. The library has already been patched so that the progressbar removes all traces of itself from the cell display area after it has finished up. However, I can't seem to find a way to also remove all traces of the progress bar from the .ipynb json file. Is it possible to dynamically remove displayed javascript from the notebook .ipynb file? Since python-progressbar uses a javascript callback invoked via display() to update the progress bar, this means that there is a json entry for each progress bar update and for the progress bar itself. In a notebook with many progress bars, this means that the notebook file can quickly balloon in size as it is filled up with repeats of the same javascript cleanup code. The cleanup could happen on the python side or on the javascript side, whichever is more convenient. Thanks for your advice, Nathan Goldbaum From benjaminrk at gmail.com Tue Feb 11 19:51:51 2014 From: benjaminrk at gmail.com (MinRK) Date: Tue, 11 Feb 2014 16:51:51 -0800 Subject: [IPython-dev] Removing displayed javascript In-Reply-To: <CAJXewO=VS_hE01fXa4cH04sod-jVmA+DuU3hQYMTwuAfenX+Hg@mail.gmail.com> References: <CAJXewO=VS_hE01fXa4cH04sod-jVmA+DuU3hQYMTwuAfenX+Hg@mail.gmail.com> Message-ID: <CAHNn8BXZ=C-gU3ST-XdEJnXG_tBr=jFqc9ghg9EN+5OKpFbLKQ@mail.gmail.com> clear_output() should remove any output from a cell. It doesn't allow selectively removing particular outputs, though. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140211/a7d1403a/attachment.html> From dineshvadhia at outlook.com Wed Feb 12 09:39:58 2014 From: dineshvadhia at outlook.com (Dinesh Vadhia) Date: Wed, 12 Feb 2014 06:39:58 -0800 Subject: [IPython-dev] ipython.parallel - running programs on cores with persistent data Message-ID: <DUB128-DS278516FC2A27AC7D06337FD2920@phx.gbl> Hi! New to the list and have a few questions about ipython.parallel for building a request/response system: a. Does ipython.parallel support computations on persistent data objects at the nodes or does it (always) recreate the data objects for each new request? b. Assuming a), each core runs a python program that operates on persistant data objects in-memory and the programs are running continuously servicing requests from the controller. - How are the programs started up (and stopped) on each core using ipython.parallel without using any of the magic commands because the system is not "interactive" in the ipython sense? - Are 3rd party distributed/cluster systems management tools needed to achieve these functions? Best ... Dinesh -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140212/525375e3/attachment.html> From jchendy at gmail.com Wed Feb 12 13:31:35 2014 From: jchendy at gmail.com (Jeff Hendy) Date: Wed, 12 Feb 2014 13:31:35 -0500 Subject: [IPython-dev] Getting started with widgets Message-ID: <CADCUEnUc5j62=6BxGkcKJuS61FQXsMx8Fdbd=T=vwn3jMfxFTg@mail.gmail.com> I've seen a few people excitedly talking about the new widgets here. Is it correct that widget support is now in the master branch on git? Is there some documentation on how to get started on playing around with the widgets? Thanks! Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140212/c0f3918d/attachment.html> From jason-sage at creativetrax.com Wed Feb 12 13:45:32 2014 From: jason-sage at creativetrax.com (Jason Grout) Date: Wed, 12 Feb 2014 12:45:32 -0600 Subject: [IPython-dev] pyzmq problems in sending shell messages to a kernel Message-ID: <52FBC14C.5090702@creativetrax.com> Hi everyone, I'm trying to track down a problem we're seeing in the Sage cell server with sending computation messages to an IPython kernel. This may end up being a problem with using pyzmq or zmq, so apologies in advance if it turns out to be OT for this list. The tl;dr version is: it appears that in some very sporadic cases, pyzmq is sending a message (an execute_request message) to a kernel's shell channel tcp port on localhost, but wireshark never registers that message being sent, and the kernel that is supposed to receive the message never acts on it. My question is: does anyone have suggestions on debugging this or narrowing down the problem? The (abbreviated, simplified) long version: in the sage cell server, we start up a number of IPython kernels that we keep waiting around for computations. When a computation is requested, we hook up the kernel's shell/iopub/heartbeat channels (i.e., create pyzmq zmqstream objects connecting to the tcp ports corresponding to the kernel's shell/io/heartbeat channels), send an execute_request, and assemble an answer for the user from output coming back on the iopub channel. When the system is under moderate load, every now and then (maybe every 300 computations), we send an execute_request message to one of these kernels that is waiting around, and I see the zmq socket code claiming that it sent the message, but wireshark indicates that the message was never transmitted when looking at raw tcp traffic, and the kernel acts like it never received the message. We didn't change the high water mark for zmq, and I'm running zmq 3.2.2 and pyzmq 14.0.1. I've spent a long time narrowing the issue down to a zmq message not being sent, even though pyzmq seems to have thought it sent it. Does anyone have any suggestions for narrowing this down more, or possible causes? I realize that my setup is a bit complicated, and I've tried to simplify the issues (but hopefully not too much). Any suggestions or help would be appreciated. The next thing I'm going to do is (a) upgrade zmq to 4.x, and (b) insert some debugging statements in the zmq library itself to see if the C zmq library thinks it sent the message. Thanks, Jason From benjaminrk at gmail.com Wed Feb 12 13:54:51 2014 From: benjaminrk at gmail.com (MinRK) Date: Wed, 12 Feb 2014 10:54:51 -0800 Subject: [IPython-dev] pyzmq problems in sending shell messages to a kernel In-Reply-To: <52FBC14C.5090702@creativetrax.com> References: <52FBC14C.5090702@creativetrax.com> Message-ID: <CAHNn8BWqf9058C5i1oZYpUzXtVfjV9gUvQiSLF3x8FwQ2Lmpkw@mail.gmail.com> Nothing springs to mind, but I will think about this one for a while. Are there likely other outstanding requests to the same kernel at the time, and/or from the same requesting socket? If so, can you ballpark how many? What are you using to indicate that pyzmq thinks the message has been sent? -MinRK On Wed, Feb 12, 2014 at 10:45 AM, Jason Grout <jason-sage at creativetrax.com>wrote: > Hi everyone, > > I'm trying to track down a problem we're seeing in the Sage cell server > with sending computation messages to an IPython kernel. This may end up > being a problem with using pyzmq or zmq, so apologies in advance if it > turns out to be OT for this list. > > The tl;dr version is: it appears that in some very sporadic cases, pyzmq > is sending a message (an execute_request message) to a kernel's shell > channel tcp port on localhost, but wireshark never registers that > message being sent, and the kernel that is supposed to receive the > message never acts on it. My question is: does anyone have suggestions > on debugging this or narrowing down the problem? > > The (abbreviated, simplified) long version: in the sage cell server, we > start up a number of IPython kernels that we keep waiting around for > computations. When a computation is requested, we hook up the kernel's > shell/iopub/heartbeat channels (i.e., create pyzmq zmqstream objects > connecting to the tcp ports corresponding to the kernel's > shell/io/heartbeat channels), send an execute_request, and assemble an > answer for the user from output coming back on the iopub channel. When > the system is under moderate load, every now and then (maybe every 300 > computations), we send an execute_request message to one of these > kernels that is waiting around, and I see the zmq socket code claiming > that it sent the message, but wireshark indicates that the message was > never transmitted when looking at raw tcp traffic, and the kernel acts > like it never received the message. We didn't change the high water > mark for zmq, and I'm running zmq 3.2.2 and pyzmq 14.0.1. I've spent a > long time narrowing the issue down to a zmq message not being sent, even > though pyzmq seems to have thought it sent it. Does anyone have any > suggestions for narrowing this down more, or possible causes? > > I realize that my setup is a bit complicated, and I've tried to simplify > the issues (but hopefully not too much). Any suggestions or help would > be appreciated. The next thing I'm going to do is (a) upgrade zmq to > 4.x, and (b) insert some debugging statements in the zmq library itself > to see if the C zmq library thinks it sent the message. > > 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/20140212/e71c5ce6/attachment.html> From pi at berkeley.edu Wed Feb 12 13:55:55 2014 From: pi at berkeley.edu (Paul Ivanov) Date: Wed, 12 Feb 2014 10:55:55 -0800 Subject: [IPython-dev] Getting started with widgets In-Reply-To: <CADCUEnUc5j62=6BxGkcKJuS61FQXsMx8Fdbd=T=vwn3jMfxFTg@mail.gmail.com> References: <CADCUEnUc5j62=6BxGkcKJuS61FQXsMx8Fdbd=T=vwn3jMfxFTg@mail.gmail.com> Message-ID: <20140212185555.GC9713@HbI-OTOH.berkeley.edu> Jeff Hendy, on 2014-02-12 13:31, wrote: > I've seen a few people excitedly talking about the new widgets here. Is it > correct that widget support is now in the master branch on git? Is there > some documentation on how to get started on playing around with the widgets? Hi Jeff, Yes, in master, just start a notebook server in the examples/widgets directory. You'll see something like this [1] in your Dashboard - start with Part 1 and work your way through. 1. http://nbviewer.ipython.org/github/ipython/ipython/tree/master/examples/widgets/ best, -- _ / \ A* \^ - ,./ _.`\\ / \ / ,--.S \/ \ / `"~,_ \ \ __o ? _ \<,_ /:\ --(_)/-(_)----.../ | \ --------------.......J Paul Ivanov http://pirsquared.org From benjaminrk at gmail.com Wed Feb 12 14:01:08 2014 From: benjaminrk at gmail.com (MinRK) Date: Wed, 12 Feb 2014 11:01:08 -0800 Subject: [IPython-dev] pyzmq problems in sending shell messages to a kernel In-Reply-To: <CAHNn8BWqf9058C5i1oZYpUzXtVfjV9gUvQiSLF3x8FwQ2Lmpkw@mail.gmail.com> References: <52FBC14C.5090702@creativetrax.com> <CAHNn8BWqf9058C5i1oZYpUzXtVfjV9gUvQiSLF3x8FwQ2Lmpkw@mail.gmail.com> Message-ID: <CAHNn8BWES5c38E1UAeR5aCq9g0YTM7U8492e1kkqUmTSKOYSyQ@mail.gmail.com> Do you perchance customize KernelManagers? Specifically, do you change how sockets are created or what socket types are used? -MinRK On Wed, Feb 12, 2014 at 10:54 AM, MinRK <benjaminrk at gmail.com> wrote: > Nothing springs to mind, but I will think about this one for a while. Are > there likely other outstanding requests to the same kernel at the time, > and/or from the same requesting socket? If so, can you ballpark how many? > What are you using to indicate that pyzmq thinks the message has been sent? > > -MinRK > > > On Wed, Feb 12, 2014 at 10:45 AM, Jason Grout <jason-sage at creativetrax.com > > wrote: > >> Hi everyone, >> >> I'm trying to track down a problem we're seeing in the Sage cell server >> with sending computation messages to an IPython kernel. This may end up >> being a problem with using pyzmq or zmq, so apologies in advance if it >> turns out to be OT for this list. >> >> The tl;dr version is: it appears that in some very sporadic cases, pyzmq >> is sending a message (an execute_request message) to a kernel's shell >> channel tcp port on localhost, but wireshark never registers that >> message being sent, and the kernel that is supposed to receive the >> message never acts on it. My question is: does anyone have suggestions >> on debugging this or narrowing down the problem? >> >> The (abbreviated, simplified) long version: in the sage cell server, we >> start up a number of IPython kernels that we keep waiting around for >> computations. When a computation is requested, we hook up the kernel's >> shell/iopub/heartbeat channels (i.e., create pyzmq zmqstream objects >> connecting to the tcp ports corresponding to the kernel's >> shell/io/heartbeat channels), send an execute_request, and assemble an >> answer for the user from output coming back on the iopub channel. When >> the system is under moderate load, every now and then (maybe every 300 >> computations), we send an execute_request message to one of these >> kernels that is waiting around, and I see the zmq socket code claiming >> that it sent the message, but wireshark indicates that the message was >> never transmitted when looking at raw tcp traffic, and the kernel acts >> like it never received the message. We didn't change the high water >> mark for zmq, and I'm running zmq 3.2.2 and pyzmq 14.0.1. I've spent a >> long time narrowing the issue down to a zmq message not being sent, even >> though pyzmq seems to have thought it sent it. Does anyone have any >> suggestions for narrowing this down more, or possible causes? >> >> I realize that my setup is a bit complicated, and I've tried to simplify >> the issues (but hopefully not too much). Any suggestions or help would >> be appreciated. The next thing I'm going to do is (a) upgrade zmq to >> 4.x, and (b) insert some debugging statements in the zmq library itself >> to see if the C zmq library thinks it sent the message. >> >> 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/20140212/09b517d1/attachment.html> From jason-sage at creativetrax.com Wed Feb 12 14:04:30 2014 From: jason-sage at creativetrax.com (Jason Grout) Date: Wed, 12 Feb 2014 13:04:30 -0600 Subject: [IPython-dev] pyzmq problems in sending shell messages to a kernel In-Reply-To: <CAHNn8BWqf9058C5i1oZYpUzXtVfjV9gUvQiSLF3x8FwQ2Lmpkw@mail.gmail.com> References: <52FBC14C.5090702@creativetrax.com> <CAHNn8BWqf9058C5i1oZYpUzXtVfjV9gUvQiSLF3x8FwQ2Lmpkw@mail.gmail.com> Message-ID: <52FBC5BE.6040304@creativetrax.com> On 2/12/14 12:54 PM, MinRK wrote: > Nothing springs to mind, but I will think about this one for a while. > Are there likely other outstanding requests to the same kernel at the > time, and/or from the same requesting socket? If so, can you ballpark > how many? What are you using to indicate that pyzmq thinks the message > has been sent? > There shouldn't be any other outstanding requests to the same kernel tcp port (i.e., the receiving side; it literally is just sitting there waiting for computation requests). As for messages queuing up on the sending side, I'm pretty sure there shouldn't be any (i.e., we create a new socket), but I will check that both with our code and with wireshark. To tell pyzmq thought it was sending/receiving a message, I inserted code like this in the zmq/eventloop/zmqstream.py file, in the _handle_send and _handle_recv methods, just after the recv_multipart or send_multipart calls: import logging logging.getLogger('sagecell').info('sent ZMQ: %s %s'%(msg, status)) The result in the _handle_send is that the message was printed out, with a status of None. The receiving side didn't print anything out in the anomalous cases, but did print out the received message in the vast majority of times. Thanks, Jason > -MinRK > > > On Wed, Feb 12, 2014 at 10:45 AM, Jason Grout > <jason-sage at creativetrax.com <mailto:jason-sage at creativetrax.com>> wrote: > > Hi everyone, > > I'm trying to track down a problem we're seeing in the Sage cell server > with sending computation messages to an IPython kernel. This may end up > being a problem with using pyzmq or zmq, so apologies in advance if it > turns out to be OT for this list. > > The tl;dr version is: it appears that in some very sporadic cases, pyzmq > is sending a message (an execute_request message) to a kernel's shell > channel tcp port on localhost, but wireshark never registers that > message being sent, and the kernel that is supposed to receive the > message never acts on it. My question is: does anyone have suggestions > on debugging this or narrowing down the problem? > > The (abbreviated, simplified) long version: in the sage cell server, we > start up a number of IPython kernels that we keep waiting around for > computations. When a computation is requested, we hook up the kernel's > shell/iopub/heartbeat channels (i.e., create pyzmq zmqstream objects > connecting to the tcp ports corresponding to the kernel's > shell/io/heartbeat channels), send an execute_request, and assemble an > answer for the user from output coming back on the iopub channel. When > the system is under moderate load, every now and then (maybe every 300 > computations), we send an execute_request message to one of these > kernels that is waiting around, and I see the zmq socket code claiming > that it sent the message, but wireshark indicates that the message was > never transmitted when looking at raw tcp traffic, and the kernel acts > like it never received the message. We didn't change the high water > mark for zmq, and I'm running zmq 3.2.2 and pyzmq 14.0.1. I've spent a > long time narrowing the issue down to a zmq message not being sent, even > though pyzmq seems to have thought it sent it. Does anyone have any > suggestions for narrowing this down more, or possible causes? > > I realize that my setup is a bit complicated, and I've tried to simplify > the issues (but hopefully not too much). Any suggestions or help would > be appreciated. The next thing I'm going to do is (a) upgrade zmq to > 4.x, and (b) insert some debugging statements in the zmq library itself > to see if the C zmq library thinks it sent the message. > > Thanks, > > Jason > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org <mailto: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 benjaminrk at gmail.com Wed Feb 12 14:09:38 2014 From: benjaminrk at gmail.com (MinRK) Date: Wed, 12 Feb 2014 11:09:38 -0800 Subject: [IPython-dev] ipython.parallel - running programs on cores with persistent data In-Reply-To: <DUB128-DS278516FC2A27AC7D06337FD2920@phx.gbl> References: <DUB128-DS278516FC2A27AC7D06337FD2920@phx.gbl> Message-ID: <CAHNn8BXL=qmqMPtHPuWEe7WK1rJUaVKqMmCOEBgqhwy-Ckyxzw@mail.gmail.com> On Wed, Feb 12, 2014 at 6:39 AM, Dinesh Vadhia <dineshvadhia at outlook.com> wrote: Hi! New to the list and have a few questions about ipython.parallel for > building a request/response system: > > a. Does ipython.parallel support computations on persistent data objects > at the nodes or does it (always) recreate the data objects for each new > request? > Each task is just a Python function, evaluated in the namespace of the engine(s). So any objects created in that namespace are persistent until explicitly deleted. The namespace is persistent for the lifetime of the engine. Nothing is created except by explicit request of the Client. > b. Assuming a), each core runs a python program that operates on > persistent data objects in-memory and the programs are running continuously > servicing requests from the controller. > - How are the programs started up (and stopped) on each core using > ipython.parallel without using any of the magic commands because the system > is not "interactive" in the ipython sense? > - Are 3rd party distributed/cluster systems management tools needed to > achieve these functions? > The IPython Engine is actually the exact same code as the IPython Kernel used in the Notebook, so it is ?interactive? in the very same way. Each task submitted with View.apply (I assume this is what you mean by ?program?) is just a Python function. The function is serialized, sent to the Engine, where it is deserialized and just called. There is no ?stopping?, the functions just return. -MinRK > Best ... > Dinesh > > _______________________________________________ > 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/20140212/ffdbd36b/attachment.html> From jason-sage at creativetrax.com Wed Feb 12 14:25:39 2014 From: jason-sage at creativetrax.com (Jason Grout) Date: Wed, 12 Feb 2014 13:25:39 -0600 Subject: [IPython-dev] pyzmq problems in sending shell messages to a kernel In-Reply-To: <CAHNn8BWES5c38E1UAeR5aCq9g0YTM7U8492e1kkqUmTSKOYSyQ@mail.gmail.com> References: <52FBC14C.5090702@creativetrax.com> <CAHNn8BWqf9058C5i1oZYpUzXtVfjV9gUvQiSLF3x8FwQ2Lmpkw@mail.gmail.com> <CAHNn8BWES5c38E1UAeR5aCq9g0YTM7U8492e1kkqUmTSKOYSyQ@mail.gmail.com> Message-ID: <52FBCAB3.9030901@creativetrax.com> On 2/12/14 1:01 PM, MinRK wrote: > Do you perchance customize KernelManagers? Specifically, do you change > how sockets are created or what socket types are used? We do have our own kernel manager. I'll check into the kinds of sockets we are creating. I don't think we changed the types of sockets. Thanks for throwing these ideas out here. Jason From pi at berkeley.edu Wed Feb 12 14:27:36 2014 From: pi at berkeley.edu (Paul Ivanov) Date: Wed, 12 Feb 2014 11:27:36 -0800 Subject: [IPython-dev] Removing displayed javascript In-Reply-To: <CAHNn8BXZ=C-gU3ST-XdEJnXG_tBr=jFqc9ghg9EN+5OKpFbLKQ@mail.gmail.com> References: <CAJXewO=VS_hE01fXa4cH04sod-jVmA+DuU3hQYMTwuAfenX+Hg@mail.gmail.com> <CAHNn8BXZ=C-gU3ST-XdEJnXG_tBr=jFqc9ghg9EN+5OKpFbLKQ@mail.gmail.com> Message-ID: <20140212192736.GA7708@HbI-OTOH.berkeley.edu> MinRK, on 2014-02-11 16:51, wrote: > clear_output() should remove any output from a cell. It doesn't allow > selectively removing particular outputs, though. Here's how you can remove a particular output in JavaScript IPython.notebook.get_cells() .filter(function (c) { return c.cell_type === 'code'; }) .map(function (c) { c.output_area.outputs .map(function (o) { delete o['application/javascript']; }); }) The 'application/javascript' key is what the right key is in master, in IPython 1.x and earlier, this key was called 'javascript' best, -- _ / \ A* \^ - ,./ _.`\\ / \ / ,--.S \/ \ / `"~,_ \ \ __o ? _ \<,_ /:\ --(_)/-(_)----.../ | \ --------------.......J Paul Ivanov http://pirsquared.org From jason-sage at creativetrax.com Wed Feb 12 14:29:55 2014 From: jason-sage at creativetrax.com (Jason Grout) Date: Wed, 12 Feb 2014 13:29:55 -0600 Subject: [IPython-dev] pyzmq problems in sending shell messages to a kernel In-Reply-To: <52FBCAB3.9030901@creativetrax.com> References: <52FBC14C.5090702@creativetrax.com> <CAHNn8BWqf9058C5i1oZYpUzXtVfjV9gUvQiSLF3x8FwQ2Lmpkw@mail.gmail.com> <CAHNn8BWES5c38E1UAeR5aCq9g0YTM7U8492e1kkqUmTSKOYSyQ@mail.gmail.com> <52FBCAB3.9030901@creativetrax.com> Message-ID: <52FBCBB3.3020801@creativetrax.com> On 2/12/14 1:25 PM, Jason Grout wrote: > We do have our own kernel manager. I'll check into the kinds of sockets > we are creating. I don't think we changed the types of sockets. (here is our code to create the shell/iopub/hb streams from the "browser" side...) https://github.com/sagemath/sagecell/blob/master/trusted_kernel_manager.py#L356 Here's our code on the kernel side (which creates a kernel by forking a sage process and then creating a kernel): https://github.com/sagemath/sagecell/blob/master/forking_kernel_manager.py#L39 I don't expect you to slog through our code if you don't want to, but just in case you want to take a peek.... Jason From msg2mw at gmail.com Wed Feb 12 15:01:11 2014 From: msg2mw at gmail.com (Mike Witt) Date: Wed, 12 Feb 2014 12:01:11 -0800 Subject: [IPython-dev] Two questions about wakari Message-ID: <1392235271.2667.8@Vector> I suppose there are some wakari users here. Two quick questions: (1) How do you "un-share" (or otherwise get rid of) a shared bundle? (2) I there a wakari user list somewhere, where questions like this would be better asked? From jchendy at gmail.com Wed Feb 12 15:10:31 2014 From: jchendy at gmail.com (Jeff Hendy) Date: Wed, 12 Feb 2014 15:10:31 -0500 Subject: [IPython-dev] Getting started with widgets In-Reply-To: <20140212185555.GC9713@HbI-OTOH.berkeley.edu> References: <CADCUEnUc5j62=6BxGkcKJuS61FQXsMx8Fdbd=T=vwn3jMfxFTg@mail.gmail.com> <20140212185555.GC9713@HbI-OTOH.berkeley.edu> Message-ID: <CADCUEnVq_RSHyA0tt6z-4EgagzkgESmO9_e98mzievv1-CteUA@mail.gmail.com> Thanks Paul, that is great! On Wed, Feb 12, 2014 at 1:55 PM, Paul Ivanov <pi at berkeley.edu> wrote: > Jeff Hendy, on 2014-02-12 13:31, wrote: > > I've seen a few people excitedly talking about the new widgets here. Is > it > > correct that widget support is now in the master branch on git? Is there > > some documentation on how to get started on playing around with the > widgets? > > Hi Jeff, > > Yes, in master, just start a notebook server in the > examples/widgets directory. > > You'll see something like this [1] in your Dashboard - start with > Part 1 and work your way through. > > 1. > http://nbviewer.ipython.org/github/ipython/ipython/tree/master/examples/widgets/ > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140212/d2b85e36/attachment.html> From dineshvadhia at outlook.com Wed Feb 12 15:55:04 2014 From: dineshvadhia at outlook.com (Dinesh Vadhia) Date: Wed, 12 Feb 2014 12:55:04 -0800 Subject: [IPython-dev] ipython.parallel - running programs on cores with persistent data Message-ID: <DUB128-DS11BCE06DB97B87F6224E56D2920@phx.gbl> a) Terrific! b) Still not clear about this! Each core runs an ipython/Python interpreter. At startup, I want to run a python program (p1) on each core which will operate on persistent data objects in its namespace. On system startup, how do I start the python program (p1) on each core? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140212/c4770953/attachment.html> From benjaminrk at gmail.com Thu Feb 13 14:20:50 2014 From: benjaminrk at gmail.com (MinRK) Date: Thu, 13 Feb 2014 11:20:50 -0800 Subject: [IPython-dev] [ANN] IPython 1.2.0 Message-ID: <CAHNn8BVb91R4wazmzooNAgLbHqoLSRZVnyMZp5g_530=PCM5Hw@mail.gmail.com> IPython 1.2.0 has been released, with various bugs fixed. For the backported patches, see what?s new<http://ipython.org/ipython-doc/1/whatsnew/github-stats-1.0.html> . After release, we did discover a bug preventing the notebook from working properly in Python 2.6, so we will cut 1.2.1 next week with a fix for this. -MinRK -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140213/404e6982/attachment.html> From asmeurer at gmail.com Thu Feb 13 19:01:07 2014 From: asmeurer at gmail.com (Aaron Meurer) Date: Thu, 13 Feb 2014 18:01:07 -0600 Subject: [IPython-dev] Two questions about wakari In-Reply-To: <1392235271.2667.8@Vector> References: <1392235271.2667.8@Vector> Message-ID: <CAKgW=6LGshpZ6aGH9Bsrvb39bCB1rz4FXkNOxCzMhszEQVXR-w@mail.gmail.com> Try wakari_support at continuum.io. Aaron Meurer On Wed, Feb 12, 2014 at 2:01 PM, Mike Witt <msg2mw at gmail.com> wrote: > I suppose there are some wakari users here. > Two quick questions: > > (1) How do you "un-share" (or otherwise get rid of) > a shared bundle? > > (2) I there a wakari user list somewhere, where questions > like this would be better asked? > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev From alessandro.gagliardi at glassdoor.com Thu Feb 13 19:15:19 2014 From: alessandro.gagliardi at glassdoor.com (Alessandro Gagliardi) Date: Fri, 14 Feb 2014 00:15:19 +0000 Subject: [IPython-dev] Trouble installing latest IPython 2.0 on Mac Message-ID: <CF22A013.51D8%alessandro.gagliardi@glassdoor.com> I?m using a Mac with Anaconda installed. I was able to pip install the master branch of IPython 2 before but I wanted to update it (so I could get widgets). It looks like it dies while trying to build the readline extension module with regard to Darwin. I already have readline 6.2 installed (from conda). When I try to pip install readline, I get the same error: Command /Users/alessandro.gagliardi/anaconda/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/s2/y7672sbn1p77xsk1zlh4zpss4brwrw/T/pip_build_alessandro.gagliardi/readline/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/s2/y7672sbn1p77xsk1zlh4zpss4brwrw/T/pip-yvVpC0-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/var/folders/s2/y7672sbn1p77xsk1zlh4zpss4brwrw/T/pip_build_alessandro.gagliardi/readline Storing debug log for failure in /Users/alessandro.gagliardi/.pip/pip.log I?ve attached the pip.log file in case that helps. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140214/62c3c459/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: pip.log Type: application/octet-stream Size: 141709 bytes Desc: pip.log URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140214/62c3c459/attachment.obj> From benjaminrk at gmail.com Thu Feb 13 19:56:49 2014 From: benjaminrk at gmail.com (MinRK) Date: Thu, 13 Feb 2014 16:56:49 -0800 Subject: [IPython-dev] Trouble installing latest IPython 2.0 on Mac In-Reply-To: <CF22A013.51D8%alessandro.gagliardi@glassdoor.com> References: <CF22A013.51D8%alessandro.gagliardi@glassdoor.com> Message-ID: <CAHNn8BWkbe363zmBg5XbQmNwDE_QnVb7_m1vOxzTULhp4Jy7zg@mail.gmail.com> This is a problem in both Anaconda and readline because of Anaconda's unfortunate choice of 10.5 as the target SDK, which then readline doesn't properly handle because the system is not actually 10.5, and it fails to build. I actually have fixes <https://github.com/conda/conda-build/pull/42> out <https://github.com/ludwigschwardt/python-readline/pull/31> to both, respectively, which will hopefully resolve before we release IPython 2.0. If they don't, I'll revert the annoying checking we have for readline on OS X so that it will install on Anaconda. In the meantime, you can install IPython with pip install --no-deps which will ignore the dependencies, and/or use the `setup.py symlink`, which is nicer than `pip install -e` or `setup.py develop`, and doesn't use setuptools, so it will not install dependencies. -MinRK On Thu, Feb 13, 2014 at 4:15 PM, Alessandro Gagliardi < alessandro.gagliardi at glassdoor.com> wrote: > I?m using a Mac with Anaconda installed. I was able to pip install the > master branch of IPython 2 before but I wanted to update it (so I could get > widgets). It looks like it dies while trying to build the readline > extension module with regard to Darwin. I already have readline 6.2 > installed (from conda). When I try to pip install readline, I get the same > error: > > Command /Users/alessandro.gagliardi/anaconda/bin/python -c "import > setuptools, > tokenize;__file__='/private/var/folders/s2/y7672sbn1p77xsk1zlh4zpss4brwrw/T/pip_build_alessandro.gagliardi/readline/setup.py';exec(compile(getattr(tokenize, > 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" > install --record > /var/folders/s2/y7672sbn1p77xsk1zlh4zpss4brwrw/T/pip-yvVpC0-record/install-record.txt > --single-version-externally-managed --compile failed with error code 1 in > /private/var/folders/s2/y7672sbn1p77xsk1zlh4zpss4brwrw/T/pip_build_alessandro.gagliardi/readline > > Storing debug log for failure in /Users/alessandro.gagliardi/.pip/pip.log > > I?ve attached the pip.log file in case that helps. > > _______________________________________________ > 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/20140213/36296c80/attachment.html> From msg2mw at gmail.com Thu Feb 13 21:27:47 2014 From: msg2mw at gmail.com (Mike Witt) Date: Thu, 13 Feb 2014 18:27:47 -0800 Subject: [IPython-dev] Two questions about wakari In-Reply-To: <CAKgW=6LGshpZ6aGH9Bsrvb39bCB1rz4FXkNOxCzMhszEQVXR-w@mail.gmail.com> (from asmeurer@gmail.com on Thu Feb 13 16:01:07 2014) References: <1392235271.2667.8@Vector> <CAKgW=6LGshpZ6aGH9Bsrvb39bCB1rz4FXkNOxCzMhszEQVXR-w@mail.gmail.com> Message-ID: <1392344867.2667.21@Vector> On 02/13/2014 04:01:07 PM, Aaron Meurer wrote: > Try wakari_support at continuum.io. Yeah, I had already done that. Bear in mind, I do have a "free" account ... Here's a tip, in case anybody's interested. My support "ticket" didn't get answered for several days. Then, today, I noticed there was a support "chat" available. That was picked up immediately and the person was able to answer me. (I did close the ticket :-) -Mike From alessandro.gagliardi at glassdoor.com Fri Feb 14 13:22:55 2014 From: alessandro.gagliardi at glassdoor.com (Alessandro Gagliardi) Date: Fri, 14 Feb 2014 18:22:55 +0000 Subject: [IPython-dev] Trouble installing latest IPython 2.0 on Mac In-Reply-To: <mailman.5.1392400804.14122.ipython-dev@scipy.org> Message-ID: <CF239C50.51FA%alessandro.gagliardi@glassdoor.com> In case it matters, I?m doing this in a conda environment. I?ve run conda install pip and conda install readline (etc.) ahead of time. I try: $ pip install --no-deps -e ".[notebook]? and it ends with Installed /Users/alessandro.gagliardi/Devel/ipython Successfully installed ipython Cleaning up? But when I try $ ipython It gives me Traceback (most recent call last): File "/Users/alessandro.gagliardi/anaconda/envs/ipython2/bin/ipython", line 5, in <module> from pkg_resources import load_entry_point File "/Users/alessandro.gagliardi/anaconda/envs/ipython2/lib/python2.7/site-pack ages/setuptools-2.2-py2.7.egg/pkg_resources.py", line 2716, in <module> File "/Users/alessandro.gagliardi/anaconda/envs/ipython2/lib/python2.7/site-pack ages/setuptools-2.2-py2.7.egg/pkg_resources.py", line 685, in require File "/Users/alessandro.gagliardi/anaconda/envs/ipython2/lib/python2.7/site-pack ages/setuptools-2.2-py2.7.egg/pkg_resources.py", line 588, in resolve pkg_resources.DistributionNotFound: readline (FWIW, if I run strait up python and import readline, it works fine.) Since that didn?t work, I tried using setup.py as you recommended, but I may have done it wrong. First: $ python setup.py symlink =========================================================================== = BUILDING IPYTHON python: 2.7.6 |Continuum Analytics, Inc.| (default, Jan 10 2014, 11:23:15) [GCC 4.0.1 (Apple Inc. build 5493)] platform: darwin OPTIONAL DEPENDENCIES sphinx: Not found (required for docs and nbconvert) pygments: Not found (required for docs and nbconvert) nose: 1.3.0 pexpect: no (will use bundled version in IPython.external) pyzmq: no (required for qtconsole, notebook, and parallel computing capabilities) tornado: no (required for notebook) readline: yes jinja2: Not found (required for notebook and nbconvert) running symlink running install_lib_symlink symlinking /Users/alessandro.gagliardi/Devel/ipython/IPython -> /Users/alessandro.gagliardi/anaconda/envs/ipython2/lib/python2.7/site-packa ges/IPython running install_scripts_sym running build_scripts . . . Then: $ python setup.py develop running develop running egg_info creating ipython.egg-info writing requirements to ipython.egg-info/requires.txt writing ipython.egg-info/PKG-INFO writing top-level names to ipython.egg-info/top_level.txt writing dependency_links to ipython.egg-info/dependency_links.txt writing entry points to ipython.egg-info/entry_points.txt writing manifest file 'ipython.egg-info/SOURCES.txt' reading manifest file 'ipython.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' no previously-included directories found matching 'IPython/html/static/mathjax' warning: no files found matching 'IPython/.git_commit_info.ini' warning: no previously-included files found matching 'docs/#*' warning: no previously-included files found matching 'docs/man/*.1.gz' no previously-included directories found matching 'docs/build' no previously-included directories found matching 'docs/gh-pages' no previously-included directories found matching 'docs/dist' warning: no previously-included files matching '*~' found anywhere in distribution warning: no previously-included files matching '*.flc' found anywhere in distribution warning: no previously-included files matching '*.pyo' found anywhere in distribution warning: no previously-included files matching '.dircopy.log' found anywhere in distribution warning: no previously-included files matching '.ipynb_checkpoints' found anywhere in distribution writing manifest file 'ipython.egg-info/SOURCES.txt' running build_ext Creating /Users/alessandro.gagliardi/anaconda/envs/ipython2/lib/python2.7/site-packa ges/ipython.egg-link (link to .) ipython 2.0.0-dev is already the active version in easy-install.pth Installing ipengine2 script to /Users/alessandro.gagliardi/anaconda/envs/ipython2/bin Installing iptest script to /Users/alessandro.gagliardi/anaconda/envs/ipython2/bin Installing ipython2 script to /Users/alessandro.gagliardi/anaconda/envs/ipython2/bin Installing ipcluster2 script to /Users/alessandro.gagliardi/anaconda/envs/ipython2/bin Installing ipcluster script to /Users/alessandro.gagliardi/anaconda/envs/ipython2/bin Installing ipython script to /Users/alessandro.gagliardi/anaconda/envs/ipython2/bin Installing ipcontroller2 script to /Users/alessandro.gagliardi/anaconda/envs/ipython2/bin Installing ipcontroller script to /Users/alessandro.gagliardi/anaconda/envs/ipython2/bin Installing iptest2 script to /Users/alessandro.gagliardi/anaconda/envs/ipython2/bin Installing ipengine script to /Users/alessandro.gagliardi/anaconda/envs/ipython2/bin Installed /Users/alessandro.gagliardi/Devel/ipython Processing dependencies for ipython==2.0.0-dev Searching for readline Reading https://pypi.python.org/simple/readline/ Best match: readline 6.2.4.1 Downloading https://pypi.python.org/packages/source/r/readline/readline-6.2.4.1.tar.gz# md5=578237939c81fdbc2c8334d168b17907 Processing readline-6.2.4.1.tar.gz Writing /var/folders/s2/y7672sbn1p77xsk1zlh4zpss4brwrw/T/easy_install-ezbbrQ/readli ne-6.2.4.1/setup.cfg Running readline-6.2.4.1/setup.py -q bdist_egg --dist-dir /var/folders/s2/y7672sbn1p77xsk1zlh4zpss4brwrw/T/easy_install-ezbbrQ/readli ne-6.2.4.1/egg-dist-tmp-zQtRft In file included from Modules/2.x/readline.c:8: In file included from /Users/alessandro.gagliardi/anaconda/envs/ipython2/include/python2.7/Python .h:19: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolch ain/usr/bin/../lib/clang/5.0/include/limits.h:38: In file included from /usr/include/limits.h:63: /usr/include/sys/cdefs.h:655:2: error: Unsupported architecture #error Unsupported architecture ^ In file included from Modules/2.x/readline.c:8: In file included from /Users/alessandro.gagliardi/anaconda/envs/ipython2/include/python2.7/Python .h:19: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolch ain/usr/bin/../lib/clang/5.0/include/limits.h:38: In file included from /usr/include/limits.h:64: /usr/include/machine/limits.h:8:2: error: architecture not supported #error architecture not supported ^ In file included from Modules/2.x/readline.c:8: In file included from /Users/alessandro.gagliardi/anaconda/envs/ipython2/include/python2.7/Python .h:33: In file included from /usr/include/stdio.h:67: In file included from /usr/include/_types.h:27: In file included from /usr/include/sys/_types.h:33: /usr/include/machine/_types.h:34:2: error: architecture not supported #error architecture not supported ^ In file included from Modules/2.x/readline.c:8: In file included from /Users/alessandro.gagliardi/anaconda/envs/ipython2/include/python2.7/Python .h:33: In file included from /usr/include/stdio.h:67: In file included from /usr/include/_types.h:27: /usr/include/sys/_types.h:94:9: error: unknown type name '__int64_t' typedef __int64_t __darwin_blkcnt_t; /* total blocks */ ^ /usr/include/sys/_types.h:95:9: error: unknown type name '__int32_t' typedef __int32_t __darwin_blksize_t; /* preferred block size */ ^ Etc. etc. etc. So it looks like setup.py symlink is finding readline but then when I try to install it gives me the same error. Date: Thu, 13 Feb 2014 16:56:49 -0800 From: MinRK <benjaminrk at gmail.com> This is a problem in both Anaconda and readline because of Anaconda's unfortunate choice of 10.5 as the target SDK, which then readline doesn't properly handle because the system is not actually 10.5, and it fails to build. I actually have fixes <https://github.com/conda/conda-build/pull/42> out <https://github.com/ludwigschwardt/python-readline/pull/31> to both, respectively, which will hopefully resolve before we release IPython 2.0. If they don't, I'll revert the annoying checking we have for readline on OS X so that it will install on Anaconda. In the meantime, you can install IPython with pip install --no-deps which will ignore the dependencies, and/or use the `setup.py symlink`, which is nicer than `pip install -e` or `setup.py develop`, and doesn't use setuptools, so it will not install dependencies. -MinRK On Thu, Feb 13, 2014 at 4:15 PM, Alessandro Gagliardi < alessandro.gagliardi at glassdoor.com> wrote: > I?m using a Mac with Anaconda installed. I was able to pip install the > master branch of IPython 2 before but I wanted to update it (so I could >get > widgets). It looks like it dies while trying to build the readline > extension module with regard to Darwin. I already have readline 6.2 > installed (from conda). When I try to pip install readline, I get the >same > error: > > Command /Users/alessandro.gagliardi/anaconda/bin/python -c "import > setuptools, > >tokenize;__file__='/private/var/folders/s2/y7672sbn1p77xsk1zlh4zpss4brwrw/ >T/pip_build_alessandro.gagliardi/readline/setup.py';exec(compile(getattr(t >okenize, > 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" > install --record > >/var/folders/s2/y7672sbn1p77xsk1zlh4zpss4brwrw/T/pip-yvVpC0-record/install >-record.txt > --single-version-externally-managed --compile failed with error code 1 in > >/private/var/folders/s2/y7672sbn1p77xsk1zlh4zpss4brwrw/T/pip_build_alessan >dro.gagliardi/readline > > Storing debug log for failure in /Users/alessandro.gagliardi/.pip/pip.log > > I?ve attached the pip.log file in case that helps. > > _______________________________________________ > 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.scipy.org/pipermail/ipython-dev/attachments/20140213/36296c80/a ttachment-0001.html ------------------------------ Message: 2 Date: Thu, 13 Feb 2014 18:27:47 -0800 From: Mike Witt <msg2mw at gmail.com> Subject: Re: [IPython-dev] Two questions about wakari To: IPython developers list <ipython-dev at scipy.org> Message-ID: <1392344867.2667.21 at Vector> Content-Type: text/plain; charset=us-ascii; DelSp=Yes; Format=Flowed On 02/13/2014 04:01:07 PM, Aaron Meurer wrote: > Try wakari_support at continuum.io. Yeah, I had already done that. Bear in mind, I do have a "free" account ... Here's a tip, in case anybody's interested. My support "ticket" didn't get answered for several days. Then, today, I noticed there was a support "chat" available. That was picked up immediately and the person was able to answer me. (I did close the ticket :-) -Mike ------------------------------ _______________________________________________ IPython-dev mailing list IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev End of IPython-dev Digest, Vol 121, Issue 21 ******************************************** From takowl at gmail.com Fri Feb 14 13:32:00 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Fri, 14 Feb 2014 10:32:00 -0800 Subject: [IPython-dev] Trouble installing latest IPython 2.0 on Mac In-Reply-To: <CF239C50.51FA%alessandro.gagliardi@glassdoor.com> References: <mailman.5.1392400804.14122.ipython-dev@scipy.org> <CF239C50.51FA%alessandro.gagliardi@glassdoor.com> Message-ID: <CAOvn4qjVcPSbW+TMJqaGnAvJyo2TxOTYiffm=rqW-HgXB+iLrw@mail.gmail.com> On 14 February 2014 10:22, Alessandro Gagliardi < alessandro.gagliardi at glassdoor.com> wrote: > First: > > $ python setup.py symlink > . . . > > > Then: > $ python setup.py develop > setup.py symlink is an *alternative* to setup.py develop. You shouldn't need to run both. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140214/840d768f/attachment.html> From benjaminrk at gmail.com Fri Feb 14 14:01:50 2014 From: benjaminrk at gmail.com (MinRK) Date: Fri, 14 Feb 2014 11:01:50 -0800 Subject: [IPython-dev] Trouble installing latest IPython 2.0 on Mac In-Reply-To: <CAOvn4qjVcPSbW+TMJqaGnAvJyo2TxOTYiffm=rqW-HgXB+iLrw@mail.gmail.com> References: <mailman.5.1392400804.14122.ipython-dev@scipy.org> <CF239C50.51FA%alessandro.gagliardi@glassdoor.com> <CAOvn4qjVcPSbW+TMJqaGnAvJyo2TxOTYiffm=rqW-HgXB+iLrw@mail.gmail.com> Message-ID: <CAHNn8BXDFSFBZd58T9d-2-USRT8SFRjErdwFVzEJ1DrurCGKgg@mail.gmail.com> So much hate for setuptools right now. I can't believe `--no-deps` skips dependency installation, but still adds a redundant check to entry points. Yes, right now on Anaconda, you will need to *not* use setuptools to install IPython dev. setup.py symlink is the best way to go, I think. Don't worry, this won't be the case by the time we release 2.0. -MinRK On Fri, Feb 14, 2014 at 10:32 AM, Thomas Kluyver <takowl at gmail.com> wrote: > On 14 February 2014 10:22, Alessandro Gagliardi < > alessandro.gagliardi at glassdoor.com> wrote: > >> First: >> >> $ python setup.py symlink >> . . . >> >> >> Then: >> $ python setup.py develop >> > > setup.py symlink is an *alternative* to setup.py develop. You shouldn't > need to run both. > > _______________________________________________ > 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/20140214/dab7ef96/attachment.html> From alessandro.gagliardi at glassdoor.com Fri Feb 14 14:14:41 2014 From: alessandro.gagliardi at glassdoor.com (Alessandro Gagliardi) Date: Fri, 14 Feb 2014 19:14:41 +0000 Subject: [IPython-dev] Trouble installing latest IPython 2.0 on Mac In-Reply-To: <CF239C50.51FA%alessandro.gagliardi@glassdoor.com> Message-ID: <CF23AABB.5236%alessandro.gagliardi@glassdoor.com> $ python setup.py symlink $ python setup.py install worked. Thanks! From: Alessandro <alessandro.gagliardi at glassdoor.com<mailto:alessandro.gagliardi at glassdoor.com>> Date: Friday, February 14, 2014 at 10:22 AM To: "ipython-dev at scipy.org<mailto:ipython-dev at scipy.org>" <ipython-dev at scipy.org<mailto:ipython-dev at scipy.org>> Subject: Re: [IPython-dev] Trouble installing latest IPython 2.0 on Mac In case it matters, I?m doing this in a conda environment. I?ve run conda install pip and conda install readline (etc.) ahead of time. I try: $ pip install --no-deps -e "[notebook]" and it ends with Installed /Users/alessandro.gagliardi/Devel/ipython Successfully installed ipython Cleaning up? But when I try $ ipython It gives me Traceback (most recent call last): File "/Users/alessandro.gagliardi/anaconda/envs/ipython2/bin/ipython", line 5, in <module> from pkg_resources import load_entry_point File "/Users/alessandro.gagliardi/anaconda/envs/ipython2/lib/python2.7/site-pack ages/setuptools-2.2-py2.7.egg/pkg_resources.py", line 2716, in <module> File "/Users/alessandro.gagliardi/anaconda/envs/ipython2/lib/python2.7/site-pack ages/setuptools-2.2-py2.7.egg/pkg_resources.py", line 685, in require File "/Users/alessandro.gagliardi/anaconda/envs/ipython2/lib/python2.7/site-pack ages/setuptools-2.2-py2.7.egg/pkg_resources.py", line 588, in resolve pkg_resources.DistributionNotFound: readline (FWIW, if I run strait up python and import readline, it works fine.) Since that didn?t work, I tried using setup.py as you recommended, but I may have done it wrong. First: $ python setup.py symlink =========================================================================== = BUILDING IPYTHON python: 2.7.6 |Continuum Analytics, Inc.| (default, Jan 10 2014, 11:23:15) [GCC 4.0.1 (Apple Inc. build 5493)] platform: darwin OPTIONAL DEPENDENCIES sphinx: Not found (required for docs and nbconvert) pygments: Not found (required for docs and nbconvert) nose: 1.3.0 pexpect: no (will use bundled version in IPython.external) pyzmq: no (required for qtconsole, notebook, and parallel computing capabilities) tornado: no (required for notebook) readline: yes jinja2: Not found (required for notebook and nbconvert) running symlink running install_lib_symlink symlinking /Users/alessandro.gagliardi/Devel/ipython/IPython -> /Users/alessandro.gagliardi/anaconda/envs/ipython2/lib/python2.7/site-packa ges/IPython running install_scripts_sym running build_scripts . . . Then: $ python setup.py develop -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140214/8bae768e/attachment.html> From takowl at gmail.com Fri Feb 14 14:32:25 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Fri, 14 Feb 2014 11:32:25 -0800 Subject: [IPython-dev] Trouble installing latest IPython 2.0 on Mac In-Reply-To: <CF23AABB.5236%alessandro.gagliardi@glassdoor.com> References: <CF239C50.51FA%alessandro.gagliardi@glassdoor.com> <CF23AABB.5236%alessandro.gagliardi@glassdoor.com> Message-ID: <CAOvn4qgdOFsN3WcNZvN2A=bZfG0xqNRHmsCPL+SN+vYQfBjWrg@mail.gmail.com> On 14 February 2014 11:14, Alessandro Gagliardi < alessandro.gagliardi at glassdoor.com> wrote: > $ python setup.py symlink > $ python setup.py install > worked. > Again, you'd normally use one or the other of these, not both. symlink installs the scripts and symlinks the IPython package into site-packages, so that updating the copy in that folder, e.g. by git pull, updates the version of IPython you're using. Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140214/2b913c5f/attachment.html> From chris.barker at noaa.gov Fri Feb 14 15:09:20 2014 From: chris.barker at noaa.gov (Chris Barker) Date: Fri, 14 Feb 2014 12:09:20 -0800 Subject: [IPython-dev] Trouble installing latest IPython 2.0 on Mac In-Reply-To: <CAOvn4qgdOFsN3WcNZvN2A=bZfG0xqNRHmsCPL+SN+vYQfBjWrg@mail.gmail.com> References: <CF239C50.51FA%alessandro.gagliardi@glassdoor.com> <CF23AABB.5236%alessandro.gagliardi@glassdoor.com> <CAOvn4qgdOFsN3WcNZvN2A=bZfG0xqNRHmsCPL+SN+vYQfBjWrg@mail.gmail.com> Message-ID: <CALGmxELxptZEU82--8go3mecMvfrPzOXXhV6EWn1xmK6kYPTmg@mail.gmail.com> On Fri, Feb 14, 2014 at 11:32 AM, Thomas Kluyver <takowl at gmail.com> wrote: > On 14 February 2014 11:14, Alessandro Gagliardi < > alessandro.gagliardi at glassdoor.com> wrote: > >> $ python setup.py symlink >> > > Again, you'd normally use one or the other of these, not both. symlink >> installs the scripts and symlinks the IPython package into site-packages, >> so that updating the copy in that folder, e.g. by git pull, updates the >> version of IPython you're using. >> > Is this a new way to spell: $ ./setup.py develop ? Or an iPython specific thing? -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/20140214/a546777f/attachment.html> From takowl at gmail.com Fri Feb 14 15:49:55 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Fri, 14 Feb 2014 12:49:55 -0800 Subject: [IPython-dev] Trouble installing latest IPython 2.0 on Mac In-Reply-To: <CALGmxELxptZEU82--8go3mecMvfrPzOXXhV6EWn1xmK6kYPTmg@mail.gmail.com> References: <CF239C50.51FA%alessandro.gagliardi@glassdoor.com> <CF23AABB.5236%alessandro.gagliardi@glassdoor.com> <CAOvn4qgdOFsN3WcNZvN2A=bZfG0xqNRHmsCPL+SN+vYQfBjWrg@mail.gmail.com> <CALGmxELxptZEU82--8go3mecMvfrPzOXXhV6EWn1xmK6kYPTmg@mail.gmail.com> Message-ID: <CAOvn4qgzT6V7yY86WYc89zEM-n-1sJuU+dAJ=e-g3XSjfuHUQQ@mail.gmail.com> On 14 February 2014 12:09, Chris Barker <chris.barker at noaa.gov> wrote: > Is this a new way to spell: > > $ ./setup.py develop > > ? > > Or an iPython specific thing? > Both ;-). We had some problems with setup.py develop - namely that if you try to use it for both Python 2 and Python 3, you can only have working scripts with one of them. So we wrote setup.py symlink, which does something similar, but doesn't involve setuptools, so it's easier to understand what's going on. Our implementation is not very polished (e.g. it may not work on Windows), but if other projects want to borrow it, they're welcome to - the implementation is a few small classes starting here: https://github.com/ipython/ipython/blob/master/setupbase.py#L394 Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140214/1f594f86/attachment.html> From chris.barker at noaa.gov Fri Feb 14 16:09:43 2014 From: chris.barker at noaa.gov (Chris Barker) Date: Fri, 14 Feb 2014 13:09:43 -0800 Subject: [IPython-dev] Trouble installing latest IPython 2.0 on Mac In-Reply-To: <CAOvn4qgzT6V7yY86WYc89zEM-n-1sJuU+dAJ=e-g3XSjfuHUQQ@mail.gmail.com> References: <CF239C50.51FA%alessandro.gagliardi@glassdoor.com> <CF23AABB.5236%alessandro.gagliardi@glassdoor.com> <CAOvn4qgdOFsN3WcNZvN2A=bZfG0xqNRHmsCPL+SN+vYQfBjWrg@mail.gmail.com> <CALGmxELxptZEU82--8go3mecMvfrPzOXXhV6EWn1xmK6kYPTmg@mail.gmail.com> <CAOvn4qgzT6V7yY86WYc89zEM-n-1sJuU+dAJ=e-g3XSjfuHUQQ@mail.gmail.com> Message-ID: <CALGmxE+s7oavCrMziwc1z1pciRZzH-pt+uomOauV=pbo8jg8zg@mail.gmail.com> On Fri, Feb 14, 2014 at 12:49 PM, Thomas Kluyver <takowl at gmail.com> wrote: > Or an iPython specific thing? >> > > Both ;-). We had some problems with setup.py develop - namely that if you > try to use it for both Python 2 and Python 3, you can only have working > scripts with one of them. > fair enough -- has this been discussed on the distutils list? IT seem sothers would like this functionality. (e.g. it may not work on Windows), > Probably not, if it involves symlinks.... > but if other projects want to borrow it, they're welcome to - the > implementation is a few small classes starting here: > > https://github.com/ipython/ipython/blob/master/setupbase.py#L394 > cool, thanks. -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/20140214/c1ab760f/attachment.html> From takowl at gmail.com Fri Feb 14 17:33:23 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Fri, 14 Feb 2014 14:33:23 -0800 Subject: [IPython-dev] Trouble installing latest IPython 2.0 on Mac In-Reply-To: <CALGmxE+s7oavCrMziwc1z1pciRZzH-pt+uomOauV=pbo8jg8zg@mail.gmail.com> References: <CF239C50.51FA%alessandro.gagliardi@glassdoor.com> <CF23AABB.5236%alessandro.gagliardi@glassdoor.com> <CAOvn4qgdOFsN3WcNZvN2A=bZfG0xqNRHmsCPL+SN+vYQfBjWrg@mail.gmail.com> <CALGmxELxptZEU82--8go3mecMvfrPzOXXhV6EWn1xmK6kYPTmg@mail.gmail.com> <CAOvn4qgzT6V7yY86WYc89zEM-n-1sJuU+dAJ=e-g3XSjfuHUQQ@mail.gmail.com> <CALGmxE+s7oavCrMziwc1z1pciRZzH-pt+uomOauV=pbo8jg8zg@mail.gmail.com> Message-ID: <CAOvn4qgjsaiqTr6Z6b1nkoAHRSU7tT3Xf-pYfS1htJCdkdS_vA@mail.gmail.com> On 14 February 2014 13:09, Chris Barker <chris.barker at noaa.gov> wrote: > Both ;-). We had some problems with setup.py develop - namely that if you >> try to use it for both Python 2 and Python 3, you can only have working >> scripts with one of them. >> > > fair enough -- has this been discussed on the distutils list? IT seem > sothers would like this functionality. > It hasn't. We're happy for people to develop it further, but we're not interested in wading into the Python packaging situation ourselves (at least, I'm not). > (e.g. it may not work on Windows), >> > > Probably not, if it involves symlinks.... > Min and I have both just investigated it, and Python 3 has os.symlink(), but the process has to be run with admin privileges. We might take out the Windows check and let it try to make symlinks. Thanks, Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140214/18d35db0/attachment.html> From asmeurer at gmail.com Fri Feb 14 19:52:39 2014 From: asmeurer at gmail.com (Aaron Meurer) Date: Fri, 14 Feb 2014 18:52:39 -0600 Subject: [IPython-dev] Two questions about wakari In-Reply-To: <1392344867.2667.21@Vector> References: <1392235271.2667.8@Vector> <CAKgW=6LGshpZ6aGH9Bsrvb39bCB1rz4FXkNOxCzMhszEQVXR-w@mail.gmail.com> <1392344867.2667.21@Vector> Message-ID: <CAKgW=6L6L7bE0it3AA4uKnznzaLrY+R_AA0YMRzgZxrEJAHJag@mail.gmail.com> Ah, so I didn't realize that wakari_support just opens a ticket. It seems there should be a Wakari users group, similar to the Anaconda users group, which is a little more public than the ticket system. Aaron Meurer On Thu, Feb 13, 2014 at 8:27 PM, Mike Witt <msg2mw at gmail.com> wrote: > On 02/13/2014 04:01:07 PM, Aaron Meurer wrote: >> Try wakari_support at continuum.io. > > Yeah, I had already done that. Bear in mind, I do have a "free" > account ... > > Here's a tip, in case anybody's interested. My support "ticket" > didn't get answered for several days. Then, today, I noticed there > was a support "chat" available. That was picked up immediately > and the person was able to answer me. (I did close the ticket :-) > > -Mike > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev From zaharid at gmail.com Mon Feb 17 13:27:10 2014 From: zaharid at gmail.com (Zahari Dim) Date: Mon, 17 Feb 2014 19:27:10 +0100 Subject: [IPython-dev] Building an integrated measurement system with IPython Message-ID: <CANx7HSYXQF=CJuftdSa8+vCcTKMjJbzqHAU17AXpFVOkmWAHYQ@mail.gmail.com> Hi, My name is Zahari Dimitrov, and I am a last year Physics Student. My final year project consists on developing a system on top of IPython which is able to integrate the configuration of laboratory measurements with the analysis of the data of those measurements (which could be made in remote clusters). I would appreciate it very much if you could tell me what do you think on the overall design, and answer some (I'm afraid too many) specific questions I have. Apologies for this long message. Some information on this project can be found on zigzah.com (but it's not really up to date...) I have already done the part dedicated to talking with instruments (more or less), and now I would like to do the following: - I'd like to represent the computation process as a polytree ( http://en.wikipedia.org/wiki/Polytree ) where the nodes (which I call IObjects) would be functions that run on some ipengine. These functions have some parameters (inputs) and return a dict of outputs. The outputs of one node can be connected to the inputs of the next, and to execute a child node, all the parents must be executed and have some results. -This structures are saved on a MongoDb Database (seems really easy to use for now) and managed with the mongoengine ORM, -I'd like to be able to transform the inputs of the graph that are not connected to an output (or have a constant value set) in an html form (the inputs declare some types like str, int or range which are mapped to different JS input widgets where possible). The free outputs are turned into some display widgets as well. -When you type ipython notebook --iograph=mygraph, the form appears on the top of your ipython notebook, and you can set the parameters and execute different parts of the graph. The results are accessible as variables in the notebook. -Things like the instrument commands (ie, ask for the frequency in an oscilloscope) are just things that extend the IObject class and run on a dedicated engine with id __instruments in the computer where the instrument is connected (could be different for different instruments). -Other more complicated classes like RangedExperiment (measure something over a given range which is an input) are also IObjects. This classes would have the capability of reporting the measurements as they are produced and fill sequentially a plot with that. -Other IObjects can take the results from the experiment and process them in a remote cluster. -For a given IObject, all results (outputs) it produces are logged by default in the mongo database. You can always set the value of the outputs to a previous result and execute its children with this input. -There will be a decorator that converts any function in a IObject (and possibly use python 3 annotations for that) As said, I'd be very happy if I could complete this. But here are the questions: -At what level do I hack the IPython notebook to add the forms? I haven't found an extension mechanism capable of doing what I need, so I thing I have to fork the project. Is there any place that explains the conventions used for the templates and the JavaScript code in the notebook? -I believe the Ipython controller has some log system. Could it be integrated with the one I want for the IObjects? -I am thinking about using mongodb to deploy a shared filesystem in the computers where Ipython is running, so it's possible load data from anywhere. Is this a good solution, particularly to save things like text-pickled python objects? -How do I avoid moving around large amounts of data when the output and input IObjects are in the same computer, different from the controller. -Which is the best way to obtain partial results from the engines, like the ones needed for the RangedExperiment example (ie, display the measurement after it is produced and then do the next)? -Which is the current best way to display interactive plots in IPython? Thinking again about the Ranged Experiment. -I understand each Ipengine will see the hardware of the computer it runs in. Is this right? -Is there any problem for a node to itself run a paralell algorithm on other engines? Thank you again for your patience, Best regards, Zahari. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140217/5ca79bba/attachment.html> From ronena at gmail.com Mon Feb 17 17:18:56 2014 From: ronena at gmail.com (Ronen Abravanel) Date: Tue, 18 Feb 2014 00:18:56 +0200 Subject: [IPython-dev] Building an integrated measurement system with IPython In-Reply-To: <CANx7HSYXQF=CJuftdSa8+vCcTKMjJbzqHAU17AXpFVOkmWAHYQ@mail.gmail.com> References: <CANx7HSYXQF=CJuftdSa8+vCcTKMjJbzqHAU17AXpFVOkmWAHYQ@mail.gmail.com> Message-ID: <CACTp8Rgv5_cggev+ezMo3-6SKXzCeTAC6JVQ3m61DN7VBoDprA@mail.gmail.com> This is awesome. I would very much like to see something like that working (at least as a proof of concept. And also in order to help and try to 'cell' python \ IPython to the experimentalists in my department. Regarding your first question, try looking at IPython 2.0 and the new widget mechanism, For some examples, see http://nbviewer.ipython.org/github/ipython/ipython/tree/master/examples/widgets/ On Mon, Feb 17, 2014 at 8:27 PM, Zahari Dim <zaharid at gmail.com> wrote: > Hi, > > My name is Zahari Dimitrov, and I am a last year Physics Student. My final > year project consists on developing a system on top of IPython which is > able to integrate the configuration of laboratory measurements with the > analysis of the data of those measurements (which could be made in remote > clusters). I would appreciate it very much if you could tell me what do you > think on the overall design, and answer some (I'm afraid too many) specific > questions I have. Apologies for this long message. > > Some information on this project can be found on zigzah.com (but it's not > really up to date...) > > I have already done the part dedicated to talking with instruments (more > or less), and now I would like to do the following: > > - I'd like to represent the computation process as a polytree ( > http://en.wikipedia.org/wiki/Polytree ) where the nodes (which I call > IObjects) would be functions that run on some ipengine. These functions > have some parameters (inputs) and return a dict of outputs. The outputs of > one node can be connected to the inputs of the next, and to execute a child > node, all the parents must be executed and have some results. > > -This structures are saved on a MongoDb Database (seems really easy to use > for now) and managed with the mongoengine ORM, > > -I'd like to be able to transform the inputs of the graph that are not > connected to an output (or have a constant value set) in an html form (the > inputs declare some types like str, int or range which are mapped to > different JS input widgets where possible). The free outputs are turned > into some display widgets as well. > > -When you type ipython notebook --iograph=mygraph, the form appears on the > top of your ipython notebook, and you can set the parameters and execute > different parts of the graph. The results are accessible as variables in > the notebook. > > -Things like the instrument commands (ie, ask for the frequency in an > oscilloscope) are just things that extend the IObject class and run on a > dedicated engine with id __instruments in the computer where the instrument > is connected (could be different for different instruments). > > -Other more complicated classes like RangedExperiment (measure something > over a given range which is an input) are also IObjects. This classes would > have the capability of reporting the measurements as they are produced and > fill sequentially a plot with that. > > -Other IObjects can take the results from the experiment and process them > in a remote cluster. > > -For a given IObject, all results (outputs) it produces are logged by > default in the mongo database. You can always set the value of the outputs > to a previous result and execute its children with this input. > > -There will be a decorator that converts any function in a IObject (and > possibly use python 3 annotations for that) > > > > As said, I'd be very happy if I could complete this. But here are the > questions: > > -At what level do I hack the IPython notebook to add the forms? I haven't > found an extension mechanism capable of doing what I need, so I thing I > have to fork the project. Is there any place that explains the conventions > used for the templates and the JavaScript code in the notebook? > > -I believe the Ipython controller has some log system. Could it be > integrated with the one I want for the IObjects? > > -I am thinking about using mongodb to deploy a shared filesystem in the > computers where Ipython is running, so it's possible load data from > anywhere. Is this a good solution, particularly to save things like > text-pickled python objects? > > -How do I avoid moving around large amounts of data when the output and > input IObjects are in the same computer, different from the controller. > > -Which is the best way to obtain partial results from the engines, like > the ones needed for the RangedExperiment example (ie, display the > measurement after it is produced and then do the next)? > > -Which is the current best way to display interactive plots in IPython? > Thinking again about the Ranged Experiment. > > -I understand each Ipengine will see the hardware of the computer it runs > in. Is this right? > > -Is there any problem for a node to itself run a paralell algorithm on > other engines? > > Thank you again for your patience, > > Best regards, > > Zahari. > > _______________________________________________ > 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/20140218/d7b88b61/attachment.html> From mmckerns at caltech.edu Mon Feb 17 17:51:21 2014 From: mmckerns at caltech.edu (Michael McKerns) Date: Mon, 17 Feb 2014 17:51:21 -0500 (EST) Subject: [IPython-dev] Building an integrated measurement system with IPython In-Reply-To: <CACTp8Rgv5_cggev+ezMo3-6SKXzCeTAC6JVQ3m61DN7VBoDprA@mail.gmail.com> References: <CANx7HSYXQF=CJuftdSa8+vCcTKMjJbzqHAU17AXpFVOkmWAHYQ@mail.gmail.com> <CACTp8Rgv5_cggev+ezMo3-6SKXzCeTAC6JVQ3m61DN7VBoDprA@mail.gmail.com> Message-ID: <56766.67.186.183.87.1392677481.squirrel@webmail.caltech.edu> Zahari, What you are looking to do is potentially a very large undertaking that could very likely require you to get some significant funding, if you want to do it robustly. If it pays off, however, you potentially will have built something that will be of a very broad general interest. I'd suggest trying to leverage as much existing technology as possible, and then picking one or so items on your list that would improve your own life the most? and try to do just that one thing well first. > This is awesome. I would very much like to see something like that > working (at least as a proof of concept. And also in order to help and try > to 'cell' python \ IPython to the experimentalists in my department. > > Regarding your first question, try looking at IPython 2.0 and the new > widget mechanism, > For some examples, see > http://nbviewer.ipython.org/github/ipython/ipython/tree/master/examples/widgets/ > > > > > On Mon, Feb 17, 2014 at 8:27 PM, Zahari Dim <zaharid at gmail.com> wrote: > >> Hi, >> >> My name is Zahari Dimitrov, and I am a last year Physics Student. My >> final >> year project consists on developing a system on top of IPython which is >> able to integrate the configuration of laboratory measurements with the >> analysis of the data of those measurements (which could be made in >> remote >> clusters). I would appreciate it very much if you could tell me what do >> you >> think on the overall design, and answer some (I'm afraid too many) >> specific >> questions I have. Apologies for this long message. >> >> Some information on this project can be found on zigzah.com (but it's >> not >> really up to date...) >> >> I have already done the part dedicated to talking with instruments (more >> or less), and now I would like to do the following: >> >> - I'd like to represent the computation process as a polytree ( >> http://en.wikipedia.org/wiki/Polytree ) where the nodes (which I call >> IObjects) would be functions that run on some ipengine. These functions >> have some parameters (inputs) and return a dict of outputs. The outputs >> of >> one node can be connected to the inputs of the next, and to execute a >> child >> node, all the parents must be executed and have some results. >> >> -This structures are saved on a MongoDb Database (seems really easy to >> use >> for now) and managed with the mongoengine ORM, >> >> -I'd like to be able to transform the inputs of the graph that are not >> connected to an output (or have a constant value set) in an html form >> (the >> inputs declare some types like str, int or range which are mapped to >> different JS input widgets where possible). The free outputs are turned >> into some display widgets as well. >> >> -When you type ipython notebook --iograph=mygraph, the form appears on >> the >> top of your ipython notebook, and you can set the parameters and execute >> different parts of the graph. The results are accessible as variables in >> the notebook. >> >> -Things like the instrument commands (ie, ask for the frequency in an >> oscilloscope) are just things that extend the IObject class and run on a >> dedicated engine with id __instruments in the computer where the >> instrument >> is connected (could be different for different instruments). >> >> -Other more complicated classes like RangedExperiment (measure something >> over a given range which is an input) are also IObjects. This classes >> would >> have the capability of reporting the measurements as they are produced >> and >> fill sequentially a plot with that. >> >> -Other IObjects can take the results from the experiment and process >> them >> in a remote cluster. >> >> -For a given IObject, all results (outputs) it produces are logged by >> default in the mongo database. You can always set the value of the >> outputs >> to a previous result and execute its children with this input. >> >> -There will be a decorator that converts any function in a IObject (and >> possibly use python 3 annotations for that) >> >> >> >> As said, I'd be very happy if I could complete this. But here are the >> questions: >> >> -At what level do I hack the IPython notebook to add the forms? I >> haven't >> found an extension mechanism capable of doing what I need, so I thing I >> have to fork the project. Is there any place that explains the >> conventions >> used for the templates and the JavaScript code in the notebook? >> >> -I believe the Ipython controller has some log system. Could it be >> integrated with the one I want for the IObjects? >> >> -I am thinking about using mongodb to deploy a shared filesystem in the >> computers where Ipython is running, so it's possible load data from >> anywhere. Is this a good solution, particularly to save things like >> text-pickled python objects? >> >> -How do I avoid moving around large amounts of data when the output and >> input IObjects are in the same computer, different from the controller. >> >> -Which is the best way to obtain partial results from the engines, like >> the ones needed for the RangedExperiment example (ie, display the >> measurement after it is produced and then do the next)? >> >> -Which is the current best way to display interactive plots in IPython? >> Thinking again about the Ranged Experiment. >> >> -I understand each Ipengine will see the hardware of the computer it >> runs >> in. Is this right? >> >> -Is there any problem for a node to itself run a paralell algorithm on >> other engines? >> >> Thank you again for your patience, >> >> Best regards, >> >> Zahari. >> >> _______________________________________________ >> 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 > --- Mike McKerns California Institute of Technology TEL: (626)395-5773 or (626)590-8470 http://www.its.caltech.edu/~mmckerns mmckerns at caltech.edu From ntezak at stanford.edu Tue Feb 18 18:46:20 2014 From: ntezak at stanford.edu (Nikolas Tezak) Date: Tue, 18 Feb 2014 15:46:20 -0800 Subject: [IPython-dev] Embedding JointJS library Message-ID: <0713EC9C-0096-4BE2-9252-4AA785905397@stanford.edu> Hi all, I just installed the current IPython 2.0 dev version from github and I'm quite impressed! At this point I've converted half my lab to use IPython in their daily workflows. I'm especially excited about the upcoming widget features. Right now, I would like to try to embed a JointJS ( http://www.jointjs.com/ ) applet into an IPython notebook and have it talk back to the kernel. The reason is that I want to create a graphical schematic capture tool for circuit diagrams. I think I'll be able to figure out how to do this by emulating this: https://gist.github.com/minrk/6547109 However, I am already getting stuck on just importing the JointJS javascript library into a current notebook. If I have a javascript file "joint.js" and a css file "joint.css" in the same directory as a given notebook, is there any easy way of importing these into the notebook? I have looked into the IPython.display.Javascript and HTML object but couldn't get it to work. Thanks, Nik From ntezak at stanford.edu Tue Feb 18 19:23:35 2014 From: ntezak at stanford.edu (Nikolas Tezak) Date: Tue, 18 Feb 2014 16:23:35 -0800 Subject: [IPython-dev] Embedding JointJS library In-Reply-To: <0713EC9C-0096-4BE2-9252-4AA785905397@stanford.edu> References: <0713EC9C-0096-4BE2-9252-4AA785905397@stanford.edu> Message-ID: <9638C401-12D5-4F3E-BF2D-AB90BC8696E8@stanford.edu> Hey, I figured it out. To embed Javascript put it into the currently used ipython profile's "/static/custom" directory, i.e., for the default profile something like "~/.ipython/profile_default/static/custom" And then edit the custom js and css files: custom.js ---- $([IPython.events]).on('app_initialized.NotebookApp', function () { require(['/static/custom/myjs.js']); }); --- custom.css ---- @import url("mycss.css"); --- Sorry for the spam, Nik On Feb 18, 2014, at 3:46 PM, Nikolas Tezak wrote: > Hi all, > > I just installed the current IPython 2.0 dev version from github and I'm quite impressed! At this point I've converted half my lab to use IPython in their daily workflows. > I'm especially excited about the upcoming widget features. > > Right now, I would like to try to embed a JointJS ( http://www.jointjs.com/ ) applet into an IPython notebook and have it talk back to the kernel. > The reason is that I want to create a graphical schematic capture tool for circuit diagrams. > > I think I'll be able to figure out how to do this by emulating this: > https://gist.github.com/minrk/6547109 > > However, I am already getting stuck on just importing the JointJS javascript library into a current notebook. > > If I have a javascript file "joint.js" and a css file "joint.css" in the same directory as a given notebook, is there any easy way of importing these into the notebook? > I have looked into the IPython.display.Javascript and HTML object but couldn't get it to work. > > Thanks, > Nik > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev From theodore.r.drain at jpl.nasa.gov Wed Feb 19 12:50:35 2014 From: theodore.r.drain at jpl.nasa.gov (Drain, Theodore R (392P)) Date: Wed, 19 Feb 2014 17:50:35 +0000 Subject: [IPython-dev] scp error in ipcluster start when profile doesn't exist on engine host Message-ID: <0DC1CAB7F6C7FC4A8B54EE1FD49046990FB892E7@ap-embx-sp20.RES.AD.JPL> I'm running the 2.0 development code and getting an error when I try to start a cluster using the ssh engine launcher. The error happens when it tries to copy the json security file to the engine. If any of the directories in the path to the json file (.ipython/profile_NAME/security) don't exist, then scp throws an exception which stops the cluster. It's fairly annoying to have to log in to each machine in my cluster and create a directory tree every time I change the name of the profile. So - is this the expected behavior? There are some ways to use scp (or maybe rsync) that might be more robust: http://stackoverflow.com/questions/1340048/how-do-i-create-a-directory-on-remote-host-if-it-doesnt-exist-without-ssh-ing-i Thanks, Ted From benjaminrk at gmail.com Wed Feb 19 13:21:06 2014 From: benjaminrk at gmail.com (MinRK) Date: Wed, 19 Feb 2014 10:21:06 -0800 Subject: [IPython-dev] scp error in ipcluster start when profile doesn't exist on engine host In-Reply-To: <0DC1CAB7F6C7FC4A8B54EE1FD49046990FB892E7@ap-embx-sp20.RES.AD.JPL> References: <0DC1CAB7F6C7FC4A8B54EE1FD49046990FB892E7@ap-embx-sp20.RES.AD.JPL> Message-ID: <CAHNn8BXRoVW6q351k2DN2rRO2Os5FOh7x5O0K5OL-2ZTBWY9fA@mail.gmail.com> What is the commit you are using? I believe this was fixed very recently in master. -MinRK On Wed, Feb 19, 2014 at 9:50 AM, Drain, Theodore R (392P) < theodore.r.drain at jpl.nasa.gov> wrote: > I'm running the 2.0 development code and getting an error when I try to > start a cluster using the ssh engine launcher. The error happens when it > tries to copy the json security file to the engine. If any of the > directories in the path to the json file (.ipython/profile_NAME/security) > don't exist, then scp throws an exception which stops the cluster. > > It's fairly annoying to have to log in to each machine in my cluster and > create a directory tree every time I change the name of the profile. So - > is this the expected behavior? > > There are some ways to use scp (or maybe rsync) that might be more robust: > > http://stackoverflow.com/questions/1340048/how-do-i-create-a-directory-on-remote-host-if-it-doesnt-exist-without-ssh-ing-i > > 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/20140219/ef741150/attachment.html> From theodore.r.drain at jpl.nasa.gov Wed Feb 19 13:34:58 2014 From: theodore.r.drain at jpl.nasa.gov (Drain, Theodore R (392P)) Date: Wed, 19 Feb 2014 18:34:58 +0000 Subject: [IPython-dev] scp error in ipcluster start when profile doesn't exist on engine host In-Reply-To: <CAHNn8BXRoVW6q351k2DN2rRO2Os5FOh7x5O0K5OL-2ZTBWY9fA@mail.gmail.com> References: <0DC1CAB7F6C7FC4A8B54EE1FD49046990FB892E7@ap-embx-sp20.RES.AD.JPL>, <CAHNn8BXRoVW6q351k2DN2rRO2Os5FOh7x5O0K5OL-2ZTBWY9fA@mail.gmail.com> Message-ID: <0DC1CAB7F6C7FC4A8B54EE1FD49046990FB8934A@ap-embx-sp20.RES.AD.JPL> It's from Feb 05. I'll update to the latest and go from there. Thanks. ________________________________ From: ipython-dev-bounces at scipy.org [ipython-dev-bounces at scipy.org] on behalf of MinRK [benjaminrk at gmail.com] Sent: Wednesday, February 19, 2014 10:21 AM To: IPython developers list Subject: Re: [IPython-dev] scp error in ipcluster start when profile doesn't exist on engine host What is the commit you are using? I believe this was fixed very recently in master. -MinRK On Wed, Feb 19, 2014 at 9:50 AM, Drain, Theodore R (392P) <theodore.r.drain at jpl.nasa.gov<mailto:theodore.r.drain at jpl.nasa.gov>> wrote: I'm running the 2.0 development code and getting an error when I try to start a cluster using the ssh engine launcher. The error happens when it tries to copy the json security file to the engine. If any of the directories in the path to the json file (.ipython/profile_NAME/security) don't exist, then scp throws an exception which stops the cluster. It's fairly annoying to have to log in to each machine in my cluster and create a directory tree every time I change the name of the profile. So - is this the expected behavior? There are some ways to use scp (or maybe rsync) that might be more robust: http://stackoverflow.com/questions/1340048/how-do-i-create-a-directory-on-remote-host-if-it-doesnt-exist-without-ssh-ing-i Thanks, Ted _______________________________________________ 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/20140219/e8bc0cdd/attachment.html> From zaharid at gmail.com Wed Feb 19 17:28:48 2014 From: zaharid at gmail.com (Zahari Dim) Date: Wed, 19 Feb 2014 23:28:48 +0100 Subject: [IPython-dev] Building an integrated measurement system with IPython In-Reply-To: <56766.67.186.183.87.1392677481.squirrel@webmail.caltech.edu> References: <CANx7HSYXQF=CJuftdSa8+vCcTKMjJbzqHAU17AXpFVOkmWAHYQ@mail.gmail.com> <CACTp8Rgv5_cggev+ezMo3-6SKXzCeTAC6JVQ3m61DN7VBoDprA@mail.gmail.com> <56766.67.186.183.87.1392677481.squirrel@webmail.caltech.edu> Message-ID: <CANx7HSbK2vurmpnGGf6Fvk_sRC_LhXBzqRp5z5HBi6_LrEPL8Q@mail.gmail.com> Thank you very much for your comments. The module widgets looks awesome, and will avoid me having to put dirty hacks in an ipython fork. It seems that most of what I want can be done just with a custom profile/nbextension. On Mon, Feb 17, 2014 at 11:51 PM, Michael McKerns <mmckerns at caltech.edu>wrote: > Zahari, > > What you are looking to do is potentially a very large > undertaking that could very likely require you to get some > significant funding, if you want to do it robustly. If it pays > off, however, you potentially will have built something that > will be of a very broad general interest. I'd suggest trying > to leverage as much existing technology as possible, and > then picking one or so items on your list that would improve > your own life the most... and try to do just that one thing > well first. > > > --- > > I realize it's impossible for me alone to build a robust well tested application. However I think all the important bits are already present in IPython. At least, it should be possible to make a proof of concept that could work for the basic use cases, and potentially evolve from there. In fact now that I discovered the widgets module, I am a little bit more confident I could achieve some of the goals :). I guess the main question I have for now is how to do something like: def method_to_measure_in_remote_engine(): for point in points_to_measure: result=measure_one_point(point) update_local_dispay_and_dict(result) Can't see anything here that could help: http://ipython.org/ipython-doc/dev/parallel/parallel_multiengine.html Best regards, Zahari. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140219/142cd84f/attachment.html> From andrew.gibiansky at gmail.com Wed Feb 19 18:37:24 2014 From: andrew.gibiansky at gmail.com (Andrew Gibiansky) Date: Wed, 19 Feb 2014 15:37:24 -0800 Subject: [IPython-dev] IPython Notebook Diagrams Message-ID: <etPan.53054039.189a769b.106@vortex> Hello, I am tired of needing to create diagrams externally and then either use Markdown links (which require the image to be exported and saved somewhere) or copy/pasting the base64 encoding of the image into the Markdown cell (which occasionally crashes my browser for big images). I would like to be able to create diagrams immediately within the Markdown cells. What's the best way to do this? I wanted to go with RaphaelJS and put <script> tags within Markdown cells, but it seems that that is broken on master due to bad parsing of quotes (though I've heard discussion that it'll be completely removed in 1.0, which leaves me confused, since it's clearly not completely removed...) How would you suggest going about this goal? Thanks! Andrew Gibiansky -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140219/b672983e/attachment.html> From tavisharmstrong at gmail.com Wed Feb 19 18:44:45 2014 From: tavisharmstrong at gmail.com (Tavish Armstrong) Date: Wed, 19 Feb 2014 18:44:45 -0500 Subject: [IPython-dev] IPython Notebook Diagrams In-Reply-To: <etPan.53054039.189a769b.106@vortex> References: <etPan.53054039.189a769b.106@vortex> Message-ID: <20140219234445.GG7065@temeraire> On Wed, Feb 19, 2014 at 03:37:24PM -0800, Andrew Gibiansky wrote: > Hello, > > I am tired of needing to create diagrams externally and then either > use Markdown links (which require the image to be exported and saved > somewhere) or copy/pasting the base64 encoding of the image into the > Markdown cell (which occasionally crashes my browser for big images). > I would like to be able to create diagrams immediately within the > Markdown cells. > > What's the best way to do this? I wanted to go with RaphaelJS and put > <script> tags within Markdown cells, but it seems that that is broken > on master due to bad parsing of quotes (though I've heard discussion > that it'll be completely removed in 1.0, which leaves me confused, > since it's clearly not completely removed...) > > How would you suggest going about this goal? For very simple diagrams, you might want to take a look at %blockdiag magic: https://bitbucket.org/vladf/ipython-diags It takes a cell containing... %%blockdiag { a -> b -> c -> d; c -> e; e -> a; } and generates a block/sequence/activity diagram using that spec. Hope this helps, -- Tavish From andrew.gibiansky at gmail.com Wed Feb 19 18:46:07 2014 From: andrew.gibiansky at gmail.com (Andrew Gibiansky) Date: Wed, 19 Feb 2014 15:46:07 -0800 Subject: [IPython-dev] IPython Notebook Diagrams In-Reply-To: <20140219234445.GG7065@temeraire> References: <etPan.53054039.189a769b.106@vortex> <20140219234445.GG7065@temeraire> Message-ID: <etPan.53054244.71f32454.106@vortex> That's really cool! However, I'm looking for a solution such that the diagram code is hidden from the user. This would make it plausible to publish the result as a blog or something along those lines, where the code used to make the diagram is unnecessary, but the diagram itself is. -- Andrew On February 19, 2014 at 3:44:52 PM, Tavish Armstrong (tavisharmstrong at gmail.com) wrote: On Wed, Feb 19, 2014 at 03:37:24PM -0800, Andrew Gibiansky wrote: > Hello, > > I am tired of needing to create diagrams externally and then either > use Markdown links (which require the image to be exported and saved > somewhere) or copy/pasting the base64 encoding of the image into the > Markdown cell (which occasionally crashes my browser for big images). > I would like to be able to create diagrams immediately within the > Markdown cells. > > What's the best way to do this? I wanted to go with RaphaelJS and put > <script> tags within Markdown cells, but it seems that that is broken > on master due to bad parsing of quotes (though I've heard discussion > that it'll be completely removed in 1.0, which leaves me confused, > since it's clearly not completely removed...) > > How would you suggest going about this goal? For very simple diagrams, you might want to take a look at %blockdiag magic: https://bitbucket.org/vladf/ipython-diags It takes a cell containing... %%blockdiag { a -> b -> c -> d; c -> e; e -> a; } and generates a block/sequence/activity diagram using that spec. Hope this helps, -- Tavish _______________________________________________ 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/20140219/5ecd3422/attachment.html> From andrew.gibiansky at gmail.com Wed Feb 19 21:29:07 2014 From: andrew.gibiansky at gmail.com (Andrew Gibiansky) Date: Wed, 19 Feb 2014 18:29:07 -0800 Subject: [IPython-dev] IPython Notebook Diagrams In-Reply-To: <etPan.53054244.71f32454.106@vortex> References: <etPan.53054039.189a769b.106@vortex> <20140219234445.GG7065@temeraire> <etPan.53054244.71f32454.106@vortex> Message-ID: <etPan.53056879.836c40e.106@vortex> Hey all! I've figured out one way to do this. If we use something like %%tikz (if it or something like it exists) or just using Python to generate figures, then the only thing we want to do is hide the input cell and the In[] and Out[] from the nbconvert output. You can do this with templates: If, in IPython notebook, you make cell headers be "edit metadata", and change metadata to something like {"display": "false"}, you can then change your templates to make nbconvert ignore those cells. The relevant bits in basic.tpl that need to be modified look like this: {% block output %} <div class="output_area"> {%- if output.output_type == 'pyout' and cell.metadata.display != "false" -%} <div class="prompt output_prompt"> Out[{{ cell.prompt_number }}]: {%- else -%} <div class="prompt"> {%- endif -%} </div> {{ super() }} </div> {% endblock output %} and {% block input_group -%} {%- if cell.metadata.display != "false" -%} <div class="input"> {{ super() }} </div> {%- endif -%} {% endblock input_group %} Note how those templates check that cell.metadata.display is false, so it'll ignore things that we don't want to show! It looks like there's plenty of extensions (such as Asymptote) for drawing pretty pictures, this pretty effectively solves the problem. The only issue is that you have to have your own templates, which is sorta ugly, but ain't a big problem. -- Andrew On February 19, 2014 at 3:46:14 PM, Andrew Gibiansky (andrew.gibiansky at gmail.com) wrote: That's really cool! However, I'm looking for a solution such that the diagram code is hidden from the user. This would make it plausible to publish the result as a blog or something along those lines, where the code used to make the diagram is unnecessary, but the diagram itself is. -- Andrew On February 19, 2014 at 3:44:52 PM, Tavish Armstrong (tavisharmstrong at gmail.com) wrote: On Wed, Feb 19, 2014 at 03:37:24PM -0800, Andrew Gibiansky wrote: > Hello, > > I am tired of needing to create diagrams externally and then either > use Markdown links (which require the image to be exported and saved > somewhere) or copy/pasting the base64 encoding of the image into the > Markdown cell (which occasionally crashes my browser for big images). > I would like to be able to create diagrams immediately within the > Markdown cells. > > What's the best way to do this? I wanted to go with RaphaelJS and put > <script> tags within Markdown cells, but it seems that that is broken > on master due to bad parsing of quotes (though I've heard discussion > that it'll be completely removed in 1.0, which leaves me confused, > since it's clearly not completely removed...) > > How would you suggest going about this goal? For very simple diagrams, you might want to take a look at %blockdiag magic: https://bitbucket.org/vladf/ipython-diags It takes a cell containing... %%blockdiag { a -> b -> c -> d; c -> e; e -> a; } and generates a block/sequence/activity diagram using that spec. Hope this helps, -- Tavish _______________________________________________ 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/20140219/cb7e389a/attachment.html> From aron at ahmadia.net Wed Feb 19 22:58:30 2014 From: aron at ahmadia.net (Aron Ahmadia) Date: Wed, 19 Feb 2014 22:58:30 -0500 Subject: [IPython-dev] Preferred way to customize CSS for something that will be displayed on nbviewer? Message-ID: <CAPhiW4htyT1W9Ux-wB5PRQ05+ng7GwaFnKbqN5z=04WS_7CEXw@mail.gmail.com> Let's say I've developed a snazzy CSS file and I want it so that an uploaded notebook being viewed on nbviewer uses my custom CSS. I've seen this bit of code in the wild[1]: from IPython.core.display import HTML def css_styling(): styles = open("../styles/custom.css", "r").read() return HTML(styles) css_styling() But this seems a bit awkward, since I'm effectively just piping the CSS file into the notebook's rendered HTML. Does nbviewer know to look anywhere for CSS, or is this the best we have right now? -A [1] http://nbviewer.ipython.org/github/barbagroup/AeroPython/blob/master/lessons/00_Lesson00_QuickPythonIntro.ipynb -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140219/05013ff3/attachment.html> From bussonniermatthias at gmail.com Thu Feb 20 05:54:39 2014 From: bussonniermatthias at gmail.com (Matthias Bussonnier) Date: Thu, 20 Feb 2014 11:54:39 +0100 Subject: [IPython-dev] Preferred way to customize CSS for something that will be displayed on nbviewer? In-Reply-To: <CAPhiW4htyT1W9Ux-wB5PRQ05+ng7GwaFnKbqN5z=04WS_7CEXw@mail.gmail.com> References: <CAPhiW4htyT1W9Ux-wB5PRQ05+ng7GwaFnKbqN5z=04WS_7CEXw@mail.gmail.com> Message-ID: <E8AA2F4F-9562-4091-B852-DA2F01E9543D@gmail.com> There should be a discussion on IPython user about that from a few weeks ago. We are thinking on metadata in notebook level that nbviewer could look at that allow to select a theme on nbviewer. IPEP and code to do so have to be written. Envoy? de mon iPhone > Le 20 f?vr. 2014 ? 04:58, Aron Ahmadia <aron at ahmadia.net> a ?crit : > > Let's say I've developed a snazzy CSS file and I want it so that an uploaded notebook being viewed on nbviewer uses my custom CSS. > > I've seen this bit of code in the wild[1]: > > from IPython.core.display import HTML > def css_styling(): > styles = open("../styles/custom.css", "r").read() > return HTML(styles) > css_styling() > > But this seems a bit awkward, since I'm effectively just piping the CSS file into the notebook's rendered HTML. Does nbviewer know to look anywhere for CSS, or is this the best we have right now? > > -A > > [1] http://nbviewer.ipython.org/github/barbagroup/AeroPython/blob/master/lessons/00_Lesson00_QuickPythonIntro.ipynb > _______________________________________________ > 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/20140220/5118b0c4/attachment.html> From bussonniermatthias at gmail.com Thu Feb 20 05:58:31 2014 From: bussonniermatthias at gmail.com (Matthias Bussonnier) Date: Thu, 20 Feb 2014 11:58:31 +0100 Subject: [IPython-dev] IPython Notebook Diagrams In-Reply-To: <etPan.53056879.836c40e.106@vortex> References: <etPan.53054039.189a769b.106@vortex> <20140219234445.GG7065@temeraire> <etPan.53054244.71f32454.106@vortex> <etPan.53056879.836c40e.106@vortex> Message-ID: <84B8008F-7BB5-4BC5-A862-F0444659877F@gmail.com> Instead of overwriting base.tpl you should be able to just inherit from the final template and overwrite the necessary part, then use config or command line argument to ask nbviewer to use your template. -- M Envoy? de mon iPhone > Le 20 f?vr. 2014 ? 03:29, Andrew Gibiansky <andrew.gibiansky at gmail.com> a ?crit : > > Hey all! > > I've figured out one way to do this. > > If we use something like %%tikz (if it or something like it exists) or just using Python to generate figures, then the only thing we want to do is hide the input cell and the In[] and Out[] from the nbconvert output. You can do this with templates: > > If, in IPython notebook, you make cell headers be "edit metadata", and change metadata to something like {"display": "false"}, you can then change your templates to make nbconvert ignore those cells. > > The relevant bits in basic.tpl that need to be modified look like this: > > {% block output %} > <div class="output_area"> > {%- if output.output_type == 'pyout' and cell.metadata.display != "false" -%} > <div class="prompt output_prompt"> > Out[{{ cell.prompt_number }}]: > {%- else -%} > <div class="prompt"> > {%- endif -%} > </div> > {{ super() }} > </div> > {% endblock output %} > and > > {% block input_group -%} > {%- if cell.metadata.display != "false" -%} > <div class="input"> > {{ super() }} > </div> > {%- endif -%} > {% endblock input_group %} > Note how those templates check that cell.metadata.display is false, so it'll ignore things that we don't want to show! > > It looks like there's plenty of extensions (such as Asymptote) for drawing pretty pictures, this pretty effectively solves the problem. > > The only issue is that you have to have your own templates, which is sorta ugly, but ain't a big problem. > > -- Andrew > > > >> On February 19, 2014 at 3:46:14 PM, Andrew Gibiansky (andrew.gibiansky at gmail.com) wrote: >> >> That's really cool! >> >> However, I'm looking for a solution such that the diagram code is hidden from the user. This would make it plausible to publish the result as a blog or something along those lines, where the code used to make the diagram is unnecessary, but the diagram itself is. >> >> -- Andrew >> >> >> >>> On February 19, 2014 at 3:44:52 PM, Tavish Armstrong (tavisharmstrong at gmail.com) wrote: >>> >>> On Wed, Feb 19, 2014 at 03:37:24PM -0800, Andrew Gibiansky wrote: >>> > Hello, >>> > >>> > I am tired of needing to create diagrams externally and then either >>> > use Markdown links (which require the image to be exported and saved >>> > somewhere) or copy/pasting the base64 encoding of the image into the >>> > Markdown cell (which occasionally crashes my browser for big images). >>> > I would like to be able to create diagrams immediately within the >>> > Markdown cells. >>> > >>> > What's the best way to do this? I wanted to go with RaphaelJS and put >>> > <script> tags within Markdown cells, but it seems that that is broken >>> > on master due to bad parsing of quotes (though I've heard discussion >>> > that it'll be completely removed in 1.0, which leaves me confused, >>> > since it's clearly not completely removed...) >>> > >>> > How would you suggest going about this goal? >>> >>> For very simple diagrams, you might want to take a look at %blockdiag >>> magic: >>> >>> https://bitbucket.org/vladf/ipython-diags >>> >>> It takes a cell containing... >>> >>> %%blockdiag >>> { >>> a -> b -> c -> d; >>> c -> e; >>> e -> a; >>> } >>> >>> and generates a block/sequence/activity diagram using that spec. >>> >>> Hope this helps, >>> -- >>> Tavish >>> _______________________________________________ >>> 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/20140220/be829612/attachment.html> From tarun.gaba7 at gmail.com Thu Feb 20 11:45:33 2014 From: tarun.gaba7 at gmail.com (TARUN GABA) Date: Thu, 20 Feb 2014 22:15:33 +0530 Subject: [IPython-dev] Best way to detect IPython notebook Message-ID: <CAHAono2LZ=DfeBRL-Y3k0J6c=UdE_pUX19ZTYAxLQMyZMi3AdA@mail.gmail.com> Hi, I have written a method, which behaves differently when called from IPython notebook, and from interpreter/qtconsole respectively. I need to detect whether the method is called from notebook or interpreter. This was the code I was using till now. if get_ipython().config['KernelApp']['parent_appname'] == 'ipython-notebook': ##Do something But I have came to know that this particular dict changes its format in different IPython versions(I am not sure how many changes are there). Is there any better method to achieve this? Thanks in advance :) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140220/3ca3c0ab/attachment.html> From bussonniermatthias at gmail.com Thu Feb 20 12:17:54 2014 From: bussonniermatthias at gmail.com (Matthias BUSSONNIER) Date: Thu, 20 Feb 2014 18:17:54 +0100 Subject: [IPython-dev] Best way to detect IPython notebook In-Reply-To: <CAHAono2LZ=DfeBRL-Y3k0J6c=UdE_pUX19ZTYAxLQMyZMi3AdA@mail.gmail.com> References: <CAHAono2LZ=DfeBRL-Y3k0J6c=UdE_pUX19ZTYAxLQMyZMi3AdA@mail.gmail.com> Message-ID: <6CC95483-B554-40C9-91AB-DB63FCDE0AA3@gmail.com> Hi, Le 20 f?vr. 2014 ? 17:45, TARUN GABA a ?crit : > Hi, > I have written a method, which behaves differently when called from IPython notebook, and from interpreter/qtconsole respectively. > I need to detect whether the method is called from notebook or interpreter. > This was the code I was using till now. > > if get_ipython().config['KernelApp']['parent_appname'] == 'ipython-notebook': > ##Do something > > But I have came to know that this particular dict changes its format in different IPython versions(I am not sure how many changes are there). > > Is there any better method to achieve this? You should describe what you ment by "called from a notebook" it is not clear enough to give a correct answer. But if the question is the same as usual, and as stated in many discussion scattered over the net and mailing list, there is no, and there will be no reliable way to detect which frontend are requiring code execution, as there is no reason for a kernel to be connected to only one frontend. It is like a book writer asking "how can I make the eye color of my main character the same as my reader" ? The question make no sense as two person can be reading the same page of the same book at the same time. And as usual, if you describe what you are trying to archive instead of how, you might get an answer that suit you. Cheers, -- Matthias > Thanks in advance :) > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev From takowl at gmail.com Thu Feb 20 14:41:56 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Thu, 20 Feb 2014 11:41:56 -0800 Subject: [IPython-dev] Best way to detect IPython notebook In-Reply-To: <CAHAono2LZ=DfeBRL-Y3k0J6c=UdE_pUX19ZTYAxLQMyZMi3AdA@mail.gmail.com> References: <CAHAono2LZ=DfeBRL-Y3k0J6c=UdE_pUX19ZTYAxLQMyZMi3AdA@mail.gmail.com> Message-ID: <CAOvn4qgeKxZVK1SveUMBX+L3ovc5ds_XPqSFryj2rUy280gXmQ@mail.gmail.com> On 20 February 2014 08:45, TARUN GABA <tarun.gaba7 at gmail.com> wrote: > if get_ipython().config['KernelApp']['parent_appname'] == > 'ipython-notebook': > Be aware that: - This only tells you what started the kernel - you can start a kernel with the notebook and attach a Qt console to it, and there's no good way to tell which one has sent a piece of code. - We want to get rid of that value eventually: https://github.com/ipython/ipython/pull/4980 As Matthias mentioned, can you tell us a bit more about what it is that you're trying to do? Thanks, Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140220/5b9aea40/attachment.html> From moorepants at gmail.com Thu Feb 20 22:56:41 2014 From: moorepants at gmail.com (Jason Moore) Date: Thu, 20 Feb 2014 22:56:41 -0500 Subject: [IPython-dev] Best way to detect IPython notebook In-Reply-To: <CAOvn4qgeKxZVK1SveUMBX+L3ovc5ds_XPqSFryj2rUy280gXmQ@mail.gmail.com> References: <CAHAono2LZ=DfeBRL-Y3k0J6c=UdE_pUX19ZTYAxLQMyZMi3AdA@mail.gmail.com> <CAOvn4qgeKxZVK1SveUMBX+L3ovc5ds_XPqSFryj2rUy280gXmQ@mail.gmail.com> Message-ID: <CAP7f1Ag3GRDS-3Vpakn-9m7tFW0Pe1P8EvVixgaeZt38ARC-2A@mail.gmail.com> Tarun's has some code that starts a SimpleHTTPServer which runs a three.js app on a new port. He's been trying to have the code open a new browser tab if you run the code from the notebook. See the last cell here: http://nbviewer.ipython.org/github/PythonDynamics/pydy-tutorial-pycon-2014/blob/master/notebooks/n08_visualization.ipynb(once IPython 2.0 is out, we plan to have this optionally open up in a notebook cell). The code that does this is mostly here: https://github.com/pydy/pydy-viz/blob/master/pydy_viz/server.py I think he was trying to detect whether you were in a notebook so that different behavior happens when the visualization server is opened. He'll have to comment more on the details. Jason moorepants.info +01 530-601-9791 On Thu, Feb 20, 2014 at 2:41 PM, Thomas Kluyver <takowl at gmail.com> wrote: > On 20 February 2014 08:45, TARUN GABA <tarun.gaba7 at gmail.com> wrote: > >> if get_ipython().config['KernelApp']['parent_appname'] == >> 'ipython-notebook': >> > > Be aware that: > - This only tells you what started the kernel - you can start a kernel > with the notebook and attach a Qt console to it, and there's no good way to > tell which one has sent a piece of code. > - We want to get rid of that value eventually: > https://github.com/ipython/ipython/pull/4980 > > As Matthias mentioned, can you tell us a bit more about what it is that > you're trying to do? > > Thanks, > 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/20140220/d851525e/attachment.html> From moorepants at gmail.com Thu Feb 20 22:58:13 2014 From: moorepants at gmail.com (Jason Moore) Date: Thu, 20 Feb 2014 22:58:13 -0500 Subject: [IPython-dev] Best way to detect IPython notebook In-Reply-To: <CAP7f1Ag3GRDS-3Vpakn-9m7tFW0Pe1P8EvVixgaeZt38ARC-2A@mail.gmail.com> References: <CAHAono2LZ=DfeBRL-Y3k0J6c=UdE_pUX19ZTYAxLQMyZMi3AdA@mail.gmail.com> <CAOvn4qgeKxZVK1SveUMBX+L3ovc5ds_XPqSFryj2rUy280gXmQ@mail.gmail.com> <CAP7f1Ag3GRDS-3Vpakn-9m7tFW0Pe1P8EvVixgaeZt38ARC-2A@mail.gmail.com> Message-ID: <CAP7f1AiUQrDyPFER2v-GsOxip3DyjKTi4HEMAXfGhfQzdiqRPw@mail.gmail.com> Here's the IPython check: https://github.com/pydy/pydy-viz/blob/master/pydy_viz/scene.py#L372 Jason moorepants.info +01 530-601-9791 On Thu, Feb 20, 2014 at 10:56 PM, Jason Moore <moorepants at gmail.com> wrote: > Tarun's has some code that starts a SimpleHTTPServer which runs a three.js > app on a new port. He's been trying to have the code open a new browser tab > if you run the code from the notebook. See the last cell here: > http://nbviewer.ipython.org/github/PythonDynamics/pydy-tutorial-pycon-2014/blob/master/notebooks/n08_visualization.ipynb(once IPython 2.0 is out, we plan to have this optionally open up in a > notebook cell). The code that does this is mostly here: > https://github.com/pydy/pydy-viz/blob/master/pydy_viz/server.py > > I think he was trying to detect whether you were in a notebook so that > different behavior happens when the visualization server is opened. He'll > have to comment more on the details. > > > Jason > moorepants.info > +01 530-601-9791 > > > On Thu, Feb 20, 2014 at 2:41 PM, Thomas Kluyver <takowl at gmail.com> wrote: > >> On 20 February 2014 08:45, TARUN GABA <tarun.gaba7 at gmail.com> wrote: >> >>> if get_ipython().config['KernelApp']['parent_appname'] == >>> 'ipython-notebook': >>> >> >> Be aware that: >> - This only tells you what started the kernel - you can start a kernel >> with the notebook and attach a Qt console to it, and there's no good way to >> tell which one has sent a piece of code. >> - We want to get rid of that value eventually: >> https://github.com/ipython/ipython/pull/4980 >> >> As Matthias mentioned, can you tell us a bit more about what it is that >> you're trying to do? >> >> Thanks, >> 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/20140220/dd9e9cac/attachment.html> From tarun.gaba7 at gmail.com Fri Feb 21 00:41:35 2014 From: tarun.gaba7 at gmail.com (TARUN GABA) Date: Fri, 21 Feb 2014 11:11:35 +0530 Subject: [IPython-dev] IPython-dev Digest, Vol 121, Issue 28 In-Reply-To: <mailman.5.1392919202.2789.ipython-dev@scipy.org> References: <mailman.5.1392919202.2789.ipython-dev@scipy.org> Message-ID: <CAHAono1ugNFJ3KqC3oiGznJoZVp0zLHMCYfYiHjZ_+_89MrBdQ@mail.gmail.com> So the function I mention is supposed to open the browser with a specific url. Now if it is called from ipython notebook, a browser is already open, so it simply opens up a new tab. If the method is called from command line interpreter or qtconsole instead of popping up a browser window (some people find it irritating), we can display a message that requests them to manually open browser and move to that url. What is the best approach for this? On 20 Feb 2014 23:35, <ipython-dev-request at scipy.org> wrote: > Send IPython-dev mailing list submissions to > ipython-dev at scipy.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://mail.scipy.org/mailman/listinfo/ipython-dev > or, via email, send a message with subject or body 'help' to > ipython-dev-request at scipy.org > > You can reach the person managing the list at > ipython-dev-owner at scipy.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of IPython-dev digest..." > > > Today's Topics: > > 1. Best way to detect IPython notebook (TARUN GABA) > 2. Re: Best way to detect IPython notebook (Matthias BUSSONNIER) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 20 Feb 2014 22:15:33 +0530 > From: TARUN GABA <tarun.gaba7 at gmail.com> > Subject: [IPython-dev] Best way to detect IPython notebook > To: ipython-dev at scipy.org > Message-ID: > <CAHAono2LZ=DfeBRL-Y3k0J6c= > UdE_pUX19ZTYAxLQMyZMi3AdA at mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > Hi, > I have written a method, which behaves differently when called from IPython > notebook, and from interpreter/qtconsole respectively. > I need to detect whether the method is called from notebook or interpreter. > This was the code I was using till now. > > if get_ipython().config['KernelApp']['parent_appname'] == > 'ipython-notebook': > ##Do something > > But I have came to know that this particular dict changes its format in > different IPython versions(I am not sure how many changes are there). > > Is there any better method to achieve this? > Thanks in advance :) > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > http://mail.scipy.org/pipermail/ipython-dev/attachments/20140220/3ca3c0ab/attachment-0001.html > > ------------------------------ > > Message: 2 > Date: Thu, 20 Feb 2014 18:17:54 +0100 > From: Matthias BUSSONNIER <bussonniermatthias at gmail.com> > Subject: Re: [IPython-dev] Best way to detect IPython notebook > To: IPython developers list <ipython-dev at scipy.org> > Message-ID: <6CC95483-B554-40C9-91AB-DB63FCDE0AA3 at gmail.com> > Content-Type: text/plain; charset=iso-8859-1 > > Hi, > > Le 20 f?vr. 2014 ? 17:45, TARUN GABA a ?crit : > > > Hi, > > I have written a method, which behaves differently when called from > IPython notebook, and from interpreter/qtconsole respectively. > > I need to detect whether the method is called from notebook or > interpreter. > > This was the code I was using till now. > > > > if get_ipython().config['KernelApp']['parent_appname'] == > 'ipython-notebook': > > ##Do something > > > > But I have came to know that this particular dict changes its format in > different IPython versions(I am not sure how many changes are there). > > > > Is there any better method to achieve this? > > You should describe what you ment by "called from a notebook" > it is not clear enough to give a correct answer. > > But if the question is the same as usual, and as stated in many discussion > scattered > over the net and mailing list, there is no, and there will be no reliable > way to detect which > frontend are requiring code execution, as there is no reason for a kernel > to be connected > to only one frontend. > > It is like a book writer asking "how can I make the eye color of my main > character the same as my reader" ? > The question make no sense as two person can be reading the same page of > the same book at the same time. > > And as usual, if you describe what you are trying to archive instead of > how, > you might get an answer that suit you. > > > Cheers, > -- > Matthias > > > > > > Thanks in advance :) > > _______________________________________________ > > 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 > > > End of IPython-dev Digest, Vol 121, Issue 28 > ******************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140221/23ceb3de/attachment.html> From aaron.oleary at gmail.com Fri Feb 21 08:58:06 2014 From: aaron.oleary at gmail.com (Aaron O'Leary) Date: Fri, 21 Feb 2014 13:58:06 +0000 Subject: [IPython-dev] running notebook from command line Message-ID: <CAHzsXVVUBBfQUa-pjwVJH+CmmsN_SoHbQrZ7zbeNWXg1VKHpww@mail.gmail.com> Hi, Is it possible to run the notebook non interactively? This was asked on StackOverflow a few months ago: http://stackoverflow.com/questions/17905350/ Outside of ipython there is [runipy], which does what I need, but some switch on ipython itself would be nice. [runipy]: https://github.com/paulgb/runipy Cheers, Aaron From zeitlinie at yahoo.de Fri Feb 21 12:35:56 2014 From: zeitlinie at yahoo.de (Name Name) Date: Fri, 21 Feb 2014 17:35:56 +0000 (GMT) Subject: [IPython-dev] libreadline.so.5 missing in Canopy's IPython? Message-ID: <1393004156.65870.YahooMailBasic@web133203.mail.ir2.yahoo.com> I'm (partially) using IPython also out of Enthought's Canopy environment. Hopefully someone on this list is familiar with that. I just upgraded to version 1.3.0.1715 only to find that I could not invoke the simple 'non-notebook' IPython shell anymore without error because of a missing libreadline.so.5. I then realized, that indeed appdata/canopy-1.3.0.1715.rh5-x86_64/lib/ is lacking libreadline.so.5 completely(?) Also I realized that strangely/luckily appdata/canopy-1.1.0.1371.rh5-x86_64/lib/ of the earlier version was not deleted during update(?) Moreover the 'old' appdata/canopy-1.1.0.1371.rh5-x86_64/lib/ does contain libreadline.so.5 After putting links to the 'old' libreadline.so.5 into the new appdata/canopy-1.3.0.1715.rh5-x86_64/lib/ the 'non-notebook' IPython shell starts again without error. Most likely all of this is not supposed to be. Does anyone have/had similar experiences? What am I missing here? From ellisonbg at gmail.com Fri Feb 21 12:42:00 2014 From: ellisonbg at gmail.com (Brian Granger) Date: Fri, 21 Feb 2014 09:42:00 -0800 Subject: [IPython-dev] libreadline.so.5 missing in Canopy's IPython? In-Reply-To: <1393004156.65870.YahooMailBasic@web133203.mail.ir2.yahoo.com> References: <1393004156.65870.YahooMailBasic@web133203.mail.ir2.yahoo.com> Message-ID: <CAH4pYpQwPWHx6oLAAFvkxpA0MCHJd3Eu-eLj8rYBd4cpdMAGWw@mail.gmail.com> This sounds like an issue with Canopy itself. Please contact Enthought about the issue. Cheers, Brian On Fri, Feb 21, 2014 at 9:35 AM, Name Name <zeitlinie at yahoo.de> wrote: > I'm (partially) using IPython also out of Enthought's Canopy environment. Hopefully someone on this list is familiar with that. > > I just upgraded to version 1.3.0.1715 only to find that I could not invoke the simple 'non-notebook' IPython shell anymore without error because of a missing libreadline.so.5. > > I then realized, that indeed appdata/canopy-1.3.0.1715.rh5-x86_64/lib/ is lacking libreadline.so.5 completely(?) > Also I realized that strangely/luckily appdata/canopy-1.1.0.1371.rh5-x86_64/lib/ of the earlier version was not deleted during update(?) > Moreover the 'old' appdata/canopy-1.1.0.1371.rh5-x86_64/lib/ does contain libreadline.so.5 > > After putting links to the 'old' libreadline.so.5 into the new appdata/canopy-1.3.0.1715.rh5-x86_64/lib/ the 'non-notebook' IPython shell starts again without error. > > Most likely all of this is not supposed to be. Does anyone have/had similar experiences? What am I missing here? > > _______________________________________________ > 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 tritemio at gmail.com Fri Feb 21 12:57:56 2014 From: tritemio at gmail.com (Antonino Ingargiola) Date: Fri, 21 Feb 2014 09:57:56 -0800 Subject: [IPython-dev] Notebook: Horizontal layout for multiple figures in output cell Message-ID: <CANn2QUz7rNzXY3hp4iyzkvmTXxcfkskDT8L=xerHEwpLPu1w7A@mail.gmail.com> Hi to all, my workflow often requires plotting 2-3 figures for comparison. The analysis notebook is usually quite long, with several comparisons: each cell performs a kind of plot comparison. I tend to put multiple figures in one single cell without using subplots as this is easier and faster to handle. Other times I plot series of plots in a loop, each one in a different figure. These plots are logically related (a time evolution, same plot on different data-sets, etc...) Right now the different figures stack vertically in the notebook cell creating big gaps and breaking the notebook flow. Using subplots is just too cumbersome for quick and evolving analysis. Would be nice to have the option to stack multiple figures horizontally by default in a notebook output cell. With long series of plots I wouldn't mind to scroll horizontally the page, the logical structure of the document would more clear. Is a way to achieve this? Does anyone fell the same need? Thanks, Antonio -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140221/415d75d6/attachment.html> From prabhu at aero.iitb.ac.in Fri Feb 21 13:07:36 2014 From: prabhu at aero.iitb.ac.in (Prabhu Ramachandran) Date: Fri, 21 Feb 2014 23:37:36 +0530 Subject: [IPython-dev] libreadline.so.5 missing in Canopy's IPython? In-Reply-To: <1393004156.65870.YahooMailBasic@web133203.mail.ir2.yahoo.com> References: <1393004156.65870.YahooMailBasic@web133203.mail.ir2.yahoo.com> Message-ID: <530795E8.4060305@aero.iitb.ac.in> On 2/21/14 11:05 PM, Name Name wrote: > I'm (partially) using IPython also out of Enthought's Canopy environment. Hopefully someone on this list is familiar with that. > > I just upgraded to version 1.3.0.1715 only to find that I could not invoke the simple 'non-notebook' IPython shell anymore without error because of a missing libreadline.so.5. > > I then realized, that indeed appdata/canopy-1.3.0.1715.rh5-x86_64/lib/ is lacking libreadline.so.5 completely(?) > Also I realized that strangely/luckily appdata/canopy-1.1.0.1371.rh5-x86_64/lib/ of the earlier version was not deleted during update(?) > Moreover the 'old' appdata/canopy-1.1.0.1371.rh5-x86_64/lib/ does contain libreadline.so.5 > > After putting links to the 'old' libreadline.so.5 into the new appdata/canopy-1.3.0.1715.rh5-x86_64/lib/ the 'non-notebook' IPython shell starts again without error. > > Most likely all of this is not supposed to be. Does anyone have/had similar experiences? What am I missing here? Readline should have been installed in your user environment automatically after your upgrade so I am surprised it did not work for you. Do you have readline installed in your User environment? How are you launching IPython? You shouldn't have to touch your appdata/canopy-1.3.0.1715.rh5-x86_64/lib/ and you can probably remove the older appdata/canopy-1.1.0.1371.rh5-x86_64/lib/ as well. If you don't see readline in your environment, install it using enpkg readline. cheers, Prabhu From patrick.surry at gmail.com Fri Feb 21 13:13:02 2014 From: patrick.surry at gmail.com (Patrick Surry) Date: Fri, 21 Feb 2014 13:13:02 -0500 Subject: [IPython-dev] Notebook: Horizontal layout for multiple figures in output cell Message-ID: <CAA-tCo41iYXSbxLs762dB9BmZgf9xLWee46jU9HpuqvPg64JCg@mail.gmail.com> If you're using matplotlib for your plots, you can use subplots to create a horizontal (or arbitrary grid) of plots in an output cell. Try this example http://matplotlib.org/examples/pylab_examples/subplot_demo.html but change plt.subplot(2,1,1) and plt.subplot(2,1,2) (which indicate a 2x1 grid and plot #1 and #2) to plt.subplot(1,2,1) and plt.subplot(1,2,2) which does the same in a 1x2 grid. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140221/9deb1461/attachment.html> From JDM at MarchRay.net Fri Feb 21 13:19:37 2014 From: JDM at MarchRay.net (Jonathan March) Date: Fri, 21 Feb 2014 12:19:37 -0600 Subject: [IPython-dev] libreadline.so.5 missing in Canopy's IPython? In-Reply-To: <530795E8.4060305@aero.iitb.ac.in> References: <1393004156.65870.YahooMailBasic@web133203.mail.ir2.yahoo.com> <530795E8.4060305@aero.iitb.ac.in> Message-ID: <CAGsogBTqJPUWmUcwHyfpzTd8UxqkD0_5jwdur3HLnkzKkBh4_Q@mail.gmail.com> On Fri, Feb 21, 2014 at 12:07 PM, Prabhu Ramachandran < prabhu at aero.iitb.ac.in> wrote: > On 2/21/14 11:05 PM, Name Name wrote: > > I'm (partially) using IPython also out of Enthought's Canopy > environment. Hopefully someone on this list is familiar with that. > > > > I just upgraded to version 1.3.0.1715 only to find that I could not > invoke the simple 'non-notebook' IPython shell anymore without error > because of a missing libreadline.so.5. > > > > I then realized, that indeed appdata/canopy-1.3.0.1715.rh5-x86_64/lib/ > is lacking libreadline.so.5 completely(?) > > Also I realized that strangely/luckily > appdata/canopy-1.1.0.1371.rh5-x86_64/lib/ of the earlier version was not > deleted during update(?) > > Moreover the 'old' appdata/canopy-1.1.0.1371.rh5-x86_64/lib/ does > contain libreadline.so.5 > > > > After putting links to the 'old' libreadline.so.5 into the new > appdata/canopy-1.3.0.1715.rh5-x86_64/lib/ the 'non-notebook' IPython shell > starts again without error. > > > > Most likely all of this is not supposed to be. Does anyone have/had > similar experiences? What am I missing here? > > Readline should have been installed in your user environment > automatically after your upgrade so I am surprised it did not work for > you. Do you have readline installed in your User environment? How are > you launching IPython? You shouldn't have to touch your > appdata/canopy-1.3.0.1715.rh5-x86_64/lib/ and you can probably remove > the older appdata/canopy-1.1.0.1371.rh5-x86_64/lib/ as well. If you > don't see readline in your environment, install it using enpkg readline. > To underscore Prabhu's comment: You are running the wrong ipython. Do not run ipython (or anything else other than canopy itself) from your installation directory. Run them from the User environment. For more information, see: http://docs.enthought.com/canopy/configure/faq.html#where-are-all-of-the-python-packages-in-my-user-python-environment https://support.enthought.com/entries/23646538-Make-Canopy-User-Python-be-your-default-Python best, Jonathan -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140221/ed544df6/attachment.html> From tritemio at gmail.com Fri Feb 21 13:41:03 2014 From: tritemio at gmail.com (Antonino Ingargiola) Date: Fri, 21 Feb 2014 10:41:03 -0800 Subject: [IPython-dev] Notebook: Horizontal layout for multiple figures in output cell In-Reply-To: <CAA-tCo41iYXSbxLs762dB9BmZgf9xLWee46jU9HpuqvPg64JCg@mail.gmail.com> References: <CAA-tCo41iYXSbxLs762dB9BmZgf9xLWee46jU9HpuqvPg64JCg@mail.gmail.com> Message-ID: <CANn2QUwWnGg+EuUed=y=h-zSwPXcTvsmQJXVkBwy8yAPpkhUnw@mail.gmail.com> Hi Patrick, thanks for your input. Yes I'm using matplotlib. I know very well the different (and excellent!) options for creating subplots. In my workflow, as common in scientific computing, the analysis is "evolving". I need to try several routes before I find the right way. So I want to make this process as smooth as possible. In this use case I value simplicity over everything else. For example when I plot a series of plots I need to scale the subplots if the number of plots changes (otherwise the plots becomes smaller, labels overlaps an so on). Moreover with separate figures I'm "ready" to save "the good one" with a savefig. Also, oftentimes I send my notebooks to non-python developers (read PI), and if I use the most basic matlab-like interface they can follow the code. When I start to mess with lists of axes, dynamic resizes, etc.., the code become more difficult to follow, for no good reason. As I said, using multiple figures is just too convenient in some use-cases. It's just annoying, in my case, that the figures stack vertically, and I would like the option to change this. I think this may be a common enough scenario to grant an IPython config/option/plugin to achieve it. Any suggestion is welcome... Thanks, Antonio On Fri, Feb 21, 2014 at 10:13 AM, Patrick Surry <patrick.surry at gmail.com>wrote: > If you're using matplotlib for your plots, you can use subplots to create > a horizontal (or arbitrary grid) of plots in an output cell. > > Try this example > http://matplotlib.org/examples/pylab_examples/subplot_demo.html > > but change plt.subplot(2,1,1) and plt.subplot(2,1,2) (which indicate a 2x1 > grid and plot #1 and #2) to plt.subplot(1,2,1) and plt.subplot(1,2,2) which > does the same in a 1x2 grid. > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140221/fa16a0ea/attachment.html> From tritemio at gmail.com Fri Feb 21 13:44:27 2014 From: tritemio at gmail.com (Antonino Ingargiola) Date: Fri, 21 Feb 2014 10:44:27 -0800 Subject: [IPython-dev] Notebook: Horizontal layout for multiple figures in output cell In-Reply-To: <CANn2QUwWnGg+EuUed=y=h-zSwPXcTvsmQJXVkBwy8yAPpkhUnw@mail.gmail.com> References: <CAA-tCo41iYXSbxLs762dB9BmZgf9xLWee46jU9HpuqvPg64JCg@mail.gmail.com> <CANn2QUwWnGg+EuUed=y=h-zSwPXcTvsmQJXVkBwy8yAPpkhUnw@mail.gmail.com> Message-ID: <CANn2QUy0SHr5Z48c2QwoOpcZ-dQTrmGRfKZEt1ub-a_g0Nc-KQ@mail.gmail.com> On Fri, Feb 21, 2014 at 10:41 AM, Antonino Ingargiola <tritemio at gmail.com>wrote: > > In this use case I value simplicity over everything else. For example when > I plot a series of plots I need to scale the subplots if the number of > plots changes (otherwise the plots becomes smaller, labels overlaps an so > on). > Here I mean: if I use subplots I need to take care of rescaling, avoiding overlaps and so on. Problems absent when using separate figures. Antonio -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140221/5236017a/attachment.html> From jsw at fnal.gov Fri Feb 21 13:49:32 2014 From: jsw at fnal.gov (Jon Wilson) Date: Fri, 21 Feb 2014 12:49:32 -0600 Subject: [IPython-dev] Notebook: Horizontal layout for multiple figures in output cell In-Reply-To: <CAA-tCo41iYXSbxLs762dB9BmZgf9xLWee46jU9HpuqvPg64JCg@mail.gmail.com> References: <CAA-tCo41iYXSbxLs762dB9BmZgf9xLWee46jU9HpuqvPg64JCg@mail.gmail.com> Message-ID: <53079FBC.7040603@fnal.gov> I often have the same desire as Antonino, for much the same reasons. Creating subplots is really not an appropriate solution. The separate figures are exactly that, separate figures. It is semantically incorrect to combine them into one figure, and causes additional complications when I want to save them to a file (for example if I want to include them in a manuscript) -- if I have combined them as subplots, then when I want to save them, I must re-separate them. Antonino, at one point, with a much older (pre 1.0) version of the notebook, I found a way to hack the notebook CSS so that output cells would float left. This was a (nearly) perfect solution for me. However, I suspect it might not work anymore with newer versions of the notebook. When I updated to a post 1.0 version, I never took the time to get it working again. But perhaps that idea is a starting point for you. Take a look at the HTML structure of the notebook and output cells, and then fiddle with the CSS (in whatever way is now appropriate) until you get something that works better for you. Regards, Jon On 02/21/2014 12:13 PM, Patrick Surry wrote: > If you're using matplotlib for your plots, you can use subplots to > create a horizontal (or arbitrary grid) of plots in an output cell. > > Try this example > http://matplotlib.org/examples/pylab_examples/subplot_demo.html > > but change plt.subplot(2,1,1) and plt.subplot(2,1,2) (which indicate a > 2x1 grid and plot #1 and #2) to plt.subplot(1,2,1) and > plt.subplot(1,2,2) which does the same in a 1x2 grid. > > > > _______________________________________________ > 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/20140221/ccf05039/attachment.html> From tritemio at gmail.com Fri Feb 21 14:54:50 2014 From: tritemio at gmail.com (Antonino Ingargiola) Date: Fri, 21 Feb 2014 11:54:50 -0800 Subject: [IPython-dev] Notebook: Horizontal layout for multiple figures in output cell In-Reply-To: <53079FBC.7040603@fnal.gov> References: <CAA-tCo41iYXSbxLs762dB9BmZgf9xLWee46jU9HpuqvPg64JCg@mail.gmail.com> <53079FBC.7040603@fnal.gov> Message-ID: <CANn2QUyAFHHfaFrhKiOKA7dbrVzJjSc8UywJ9Xk81cUeW7OT4w@mail.gmail.com> Looking at the HTML structure I found that the output cell is inside a <div class="output_vbox"> containing one or more <div class="output_area"> that are vertically stacked. With two plots we have 3 "output_area": the first for the text output (Out[1] ...) and the other two for the two figures. The problem in changing the style of <div class="output_vbox"> to horizontal is that also the text-only div will be stacked horizontally, shifting the figures to the right. Probably this is why Jon had right aligned figures. Ideally the output text should stay unchanged and the figures stacked horizontally just below the text, with a left alignment. Any idea on how to achieve this appreciated. Antonio On Fri, Feb 21, 2014 at 10:49 AM, Jon Wilson <jsw at fnal.gov> wrote: > I often have the same desire as Antonino, for much the same reasons. > Creating subplots is really not an appropriate solution. The separate > figures are exactly that, separate figures. It is semantically incorrect > to combine them into one figure, and causes additional complications when I > want to save them to a file (for example if I want to include them in a > manuscript) -- if I have combined them as subplots, then when I want to > save them, I must re-separate them. > > Antonino, at one point, with a much older (pre 1.0) version of the > notebook, I found a way to hack the notebook CSS so that output cells would > float left. This was a (nearly) perfect solution for me. However, I > suspect it might not work anymore with newer versions of the notebook. > When I updated to a post 1.0 version, I never took the time to get it > working again. But perhaps that idea is a starting point for you. Take a > look at the HTML structure of the notebook and output cells, and then > fiddle with the CSS (in whatever way is now appropriate) until you get > something that works better for you. > > Regards, > Jon > > > On 02/21/2014 12:13 PM, Patrick Surry wrote: > > If you're using matplotlib for your plots, you can use subplots to > create a horizontal (or arbitrary grid) of plots in an output cell. > > Try this example > http://matplotlib.org/examples/pylab_examples/subplot_demo.html > > but change plt.subplot(2,1,1) and plt.subplot(2,1,2) (which indicate a > 2x1 grid and plot #1 and #2) to plt.subplot(1,2,1) and plt.subplot(1,2,2) > which does the same in a 1x2 grid. > > > > > _______________________________________________ > 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140221/f8ab0e7f/attachment.html> From patrick.surry at gmail.com Fri Feb 21 15:08:52 2014 From: patrick.surry at gmail.com (Patrick Surry) Date: Fri, 21 Feb 2014 15:08:52 -0500 Subject: [IPython-dev] Notebook: Horizontal layout for multiple figures in output cell In-Reply-To: <CANn2QUy0SHr5Z48c2QwoOpcZ-dQTrmGRfKZEt1ub-a_g0Nc-KQ@mail.gmail.com> References: <CAA-tCo41iYXSbxLs762dB9BmZgf9xLWee46jU9HpuqvPg64JCg@mail.gmail.com> <CANn2QUwWnGg+EuUed=y=h-zSwPXcTvsmQJXVkBwy8yAPpkhUnw@mail.gmail.com> <CANn2QUy0SHr5Z48c2QwoOpcZ-dQTrmGRfKZEt1ub-a_g0Nc-KQ@mail.gmail.com> Message-ID: <CAA-tCo7rF7qNAmy1NFc6_W85TM+g1Pr7apovO1Hx1DGBX1Keqg@mail.gmail.com> Yes, completely agree. Sorry I misunderstood your question. For a while I used the separate viewer (non-inline) which gave a new window for every plot. This allowed nice side-by-side comparison, but it became unmanageable in a typical ad hoc session where you had twenty similar windows without proper labeling and couldn't find what you wanted. And you lost track of where each figure had come from in the original notebook. Inline is better from point of view of keeping a record of what you did, but I always end up scrolling up and down to compare things, and often end up then inserting new cells in a non-linear order which breaks dependencies if I later re-run. Your idea of putting new plots side by side would help to some extent but not sure it would really solve it. I almost want a separate tab or frame that contains all my plots in some kind of paged or tabbed layout, where I could save interesting ones or kill ones I'm done with. A bit like what R-Studio does. Maybe there's a general concept of separating the linear "lab notebook" where you always add new notes/code/diagrams at the end (current ipython notebook), and some new "pinboard" area where you can collect, compare, reorder "interesting" bits of output? Read-only, linked to original output cells in the notebook? Maybe you just need to be able to "pin" or favourite any notebook output cell and have it appear on this separate pinboard thing? Sorry for the stream of conciousness... Patrick On Fri, Feb 21, 2014 at 1:44 PM, Antonino Ingargiola <tritemio at gmail.com>wrote: > On Fri, Feb 21, 2014 at 10:41 AM, Antonino Ingargiola <tritemio at gmail.com>wrote: >> >> In this use case I value simplicity over everything else. For example >> when I plot a series of plots I need to scale the subplots if the number of >> plots changes (otherwise the plots becomes smaller, labels overlaps an so >> on). >> > > Here I mean: if I use subplots I need to take care of rescaling, avoiding > overlaps and so on. Problems absent when using separate figures. > > Antonio > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140221/e27db7fc/attachment.html> From zeitlinie at yahoo.de Fri Feb 21 16:46:40 2014 From: zeitlinie at yahoo.de (xaverm) Date: Fri, 21 Feb 2014 22:46:40 +0100 Subject: [IPython-dev] libreadline.so.5 missing in Canopy's IPython? In-Reply-To: <530795E8.4060305@aero.iitb.ac.in> References: <1393004156.65870.YahooMailBasic@web133203.mail.ir2.yahoo.com> <530795E8.4060305@aero.iitb.ac.in> Message-ID: <5307C940.904@yahoo.de> On 02/21/2014 07:07 PM, Prabhu Ramachandran wrote: > On 2/21/14 11:05 PM, Name Name wrote: >> I'm (partially) using IPython also out of Enthought's Canopy environment. Hopefully someone on this list is familiar with that. >> >> I just upgraded to version 1.3.0.1715 only to find that I could not invoke the simple 'non-notebook' IPython shell anymore without error because of a missing libreadline.so.5. >> >> I then realized, that indeed appdata/canopy-1.3.0.1715.rh5-x86_64/lib/ is lacking libreadline.so.5 completely(?) >> Also I realized that strangely/luckily appdata/canopy-1.1.0.1371.rh5-x86_64/lib/ of the earlier version was not deleted during update(?) >> Moreover the 'old' appdata/canopy-1.1.0.1371.rh5-x86_64/lib/ does contain libreadline.so.5 >> >> After putting links to the 'old' libreadline.so.5 into the new appdata/canopy-1.3.0.1715.rh5-x86_64/lib/ the 'non-notebook' IPython shell starts again without error. >> >> Most likely all of this is not supposed to be. Does anyone have/had similar experiences? What am I missing here? > > Readline should have been installed in your user environment > automatically after your upgrade so I am surprised it did not work for > you. Do you have readline installed in your User environment? How are > you launching IPython? You shouldn't have to touch your > appdata/canopy-1.3.0.1715.rh5-x86_64/lib/ and you can probably remove > the older appdata/canopy-1.1.0.1371.rh5-x86_64/lib/ as well. If you > don't see readline in your environment, install it using enpkg readline. Hi Prabhu, by now I can get a little more specific: a) I've grabbed a Linux machine 'virgin' with respect to Canopy b) I've installed Canopy 1.3.0.1715 completely fresh c) I've created an EPD-like environment using ~/Canopy/canopy_cli setup ~/xxx/EPDenvironment d) I've put ~/xxx/EPDenvironment/bin into my PATH e) I run ipython =================================== ~>ipython WARNING: Readline services not available or not loaded. WARNING: The auto-indent feature requires the readline library Python 2.7.6 | 64-bit | (default, Jan 29 2014, 17:35:36) 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. --------------------------------------------------------------------------- ImportError Traceback (most recent call last) /home/iami/xxx/EPDenvironment/lib/python2.7/site-packages/IPython/utils/py3compat.pyc in execfile(fname, *where) 202 else: 203 filename = fname --> 204 __builtin__.execfile(filename, *where) /etc/pythonstart in <module>() 5 import atexit 6 import os ----> 7 import readline 8 import rlcompleter 9 ImportError: libreadline.so.5: cannot open shared object file: No such file or directory In [1]: =================================== f) I did 'enpkg readline' as you suggested. No change. B.t.w. 'enpkg readline' gets you readline.so at most, but not libreadline.so.5 g) FINALLY: and that very much fits with my initial question: I removed any libreadline.so versions from the 'virgin' linux box *before* installing Canopy. Now, after the preceding step g) I installed libreadline.so.5 into the standard library directory of linux box's distribution, so nothing which has anything to do with Canopy .... and, heureka, after that ====================================== ~>ipython Python 2.7.6 | 64-bit | (default, Jan 29 2014, 17:35:36) 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. In [1]: ===================================== So, now I am very much inclined to claim that indeed libreadline.so.5 is missing from Canopy 1.3.0.1715's /lib/ directories, and that it only works because most users probably have libreadline.so.5 in their $LD_LIBRARY_PATH anyway. MXaver From nick.bollweg at gmail.com Fri Feb 21 17:01:55 2014 From: nick.bollweg at gmail.com (Nicholas Bollweg) Date: Fri, 21 Feb 2014 17:01:55 -0500 Subject: [IPython-dev] Notebook: Horizontal layout for multiple figures in output cell In-Reply-To: <CAA-tCo7rF7qNAmy1NFc6_W85TM+g1Pr7apovO1Hx1DGBX1Keqg@mail.gmail.com> References: <CAA-tCo41iYXSbxLs762dB9BmZgf9xLWee46jU9HpuqvPg64JCg@mail.gmail.com> <CANn2QUwWnGg+EuUed=y=h-zSwPXcTvsmQJXVkBwy8yAPpkhUnw@mail.gmail.com> <CANn2QUy0SHr5Z48c2QwoOpcZ-dQTrmGRfKZEt1ub-a_g0Nc-KQ@mail.gmail.com> <CAA-tCo7rF7qNAmy1NFc6_W85TM+g1Pr7apovO1Hx1DGBX1Keqg@mail.gmail.com> Message-ID: <CACejjWwUH=c4N_sLmKT_c02ThL+6a+Juc_JXYxCiVpMuJRyXtA@mail.gmail.com> @antonino: can you use a css selector, like :first-child, to keep the your format from bleeding over onto the text output? @patrick: I think your insight is good: IPEP 23 provide the capability to do what you want (and more), but may still not be simple enough for quick comparisons like what anotnino wants. I have, at times, hacked up a dirty nest of HTML displays to create just such panels that contain the data I want... but something that was able to store a second, zoomable layout in cell metadata would be very slick indeed... perhaps built on impress.js? While I love nbconvert's reveal.js capabilities, I could see this being more engaging for run-time hacking than the slides of reveal... On Fri, Feb 21, 2014 at 3:08 PM, Patrick Surry <patrick.surry at gmail.com>wrote: > Yes, completely agree. Sorry I misunderstood your question. > > For a while I used the separate viewer (non-inline) which gave a new > window for every plot. This allowed nice side-by-side comparison, but it > became unmanageable in a typical ad hoc session where you had twenty > similar windows without proper labeling and couldn't find what you wanted. > And you lost track of where each figure had come from in the original > notebook. > > Inline is better from point of view of keeping a record of what you did, > but I always end up scrolling up and down to compare things, and often end > up then inserting new cells in a non-linear order which breaks dependencies > if I later re-run. > > Your idea of putting new plots side by side would help to some extent but > not sure it would really solve it. I almost want a separate tab or frame > that contains all my plots in some kind of paged or tabbed layout, where I > could save interesting ones or kill ones I'm done with. A bit like what > R-Studio does. > > Maybe there's a general concept of separating the linear "lab notebook" > where you always add new notes/code/diagrams at the end (current ipython > notebook), and some new "pinboard" area where you can collect, compare, > reorder "interesting" bits of output? Read-only, linked to original output > cells in the notebook? Maybe you just need to be able to "pin" or > favourite any notebook output cell and have it appear on this separate > pinboard thing? > > Sorry for the stream of conciousness... > > Patrick > > > On Fri, Feb 21, 2014 at 1:44 PM, Antonino Ingargiola <tritemio at gmail.com>wrote: > >> On Fri, Feb 21, 2014 at 10:41 AM, Antonino Ingargiola <tritemio at gmail.com >> > wrote: >>> >>> In this use case I value simplicity over everything else. For example >>> when I plot a series of plots I need to scale the subplots if the number of >>> plots changes (otherwise the plots becomes smaller, labels overlaps an so >>> on). >>> >> >> Here I mean: if I use subplots I need to take care of rescaling, avoiding >> overlaps and so on. Problems absent when using separate figures. >> >> Antonio >> > > > _______________________________________________ > 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/20140221/fb6078ad/attachment.html> From tritemio at gmail.com Fri Feb 21 20:59:51 2014 From: tritemio at gmail.com (Antonino Ingargiola) Date: Fri, 21 Feb 2014 17:59:51 -0800 Subject: [IPython-dev] Notebook: Horizontal layout for multiple figures in output cell In-Reply-To: <CACejjWwUH=c4N_sLmKT_c02ThL+6a+Juc_JXYxCiVpMuJRyXtA@mail.gmail.com> References: <CAA-tCo41iYXSbxLs762dB9BmZgf9xLWee46jU9HpuqvPg64JCg@mail.gmail.com> <CANn2QUwWnGg+EuUed=y=h-zSwPXcTvsmQJXVkBwy8yAPpkhUnw@mail.gmail.com> <CANn2QUy0SHr5Z48c2QwoOpcZ-dQTrmGRfKZEt1ub-a_g0Nc-KQ@mail.gmail.com> <CAA-tCo7rF7qNAmy1NFc6_W85TM+g1Pr7apovO1Hx1DGBX1Keqg@mail.gmail.com> <CACejjWwUH=c4N_sLmKT_c02ThL+6a+Juc_JXYxCiVpMuJRyXtA@mail.gmail.com> Message-ID: <CANn2QUzWEuweLvpzPhyW_HQVL+vTGRV5oNZahVN95ugWB8kk-g@mail.gmail.com> On Fri, Feb 21, 2014 at 2:01 PM, Nicholas Bollweg <nick.bollweg at gmail.com>wrote: > @antonino: can you use a css selector, like :first-child, to keep the your > format from bleeding over onto the text output? > I'm not familiar with CSS, I just used the "Developer Tool" inspector in Chrome to find the relevant elements. How should I proceed if I want to do some tests? Is modifying style.min.css on disk and reloading the notebook the proper way to do it. How people usually develop this king of stuff, at least in the ipython context? Antonio -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140221/8ae64c63/attachment.html> From jason-sage at creativetrax.com Sat Feb 22 01:18:08 2014 From: jason-sage at creativetrax.com (Jason Grout) Date: Sat, 22 Feb 2014 00:18:08 -0600 Subject: [IPython-dev] widget models caching the view Message-ID: <53084120.4010303@creativetrax.com> Hi all, Right now, in the new widget system, when a view is created of a model, the view is added to the model's view list here: https://github.com/ipython/ipython/blob/master/IPython/html/static/notebook/js/widgetmanager.js#L123 Since that code was written, we've settled on a more complete understanding of the roles of views, models, and the python traits classes. It seems that it would be better now to have a single view cached with the model rather than a list of views, and if create_view is called on a model that already has a view created, the already-created view should be returned, rather than creating a new view. In other words, it seems that the create_view function in the widget manager should: 1. check to see if model.view is set. If it is, return it 2. If model.view is not set, construct and return it, caching the new view in the model.view attribute. Brian, Jonathan, others? What do you think? Thanks, Jason From bussonniermatthias at gmail.com Sat Feb 22 04:20:18 2014 From: bussonniermatthias at gmail.com (Matthias Bussonnier) Date: Sat, 22 Feb 2014 10:20:18 +0100 Subject: [IPython-dev] IPython-dev Digest, Vol 121, Issue 28 In-Reply-To: <CAHAono1ugNFJ3KqC3oiGznJoZVp0zLHMCYfYiHjZ_+_89MrBdQ@mail.gmail.com> References: <mailman.5.1392919202.2789.ipython-dev@scipy.org> <CAHAono1ugNFJ3KqC3oiGznJoZVp0zLHMCYfYiHjZ_+_89MrBdQ@mail.gmail.com> Message-ID: <90862B5A-1CF3-4076-ADA9-D226D0B57E52@gmail.com> Return/display an object that a repr text, html and JavaScript. Text in console can be copy pasted, html in qtconsole will be clickable. Js in notebook will open a new tab (or a new window) depending on user preferences. I find irritating that libs open a tab for me, wether I am in console or browser already. I would'nt implement the js part if it was me. Envoy? de mon iPhone > Le 21 f?vr. 2014 ? 06:41, TARUN GABA <tarun.gaba7 at gmail.com> a ?crit : > > So the function I mention is supposed to open the browser with a specific url. > Now if it is called from ipython notebook, a browser is already open, so it simply opens up a new tab. > If the method is called from command line interpreter or qtconsole instead of popping up a browser window (some people find it irritating), we can display a message that requests them to manually open browser and move to that url. What is the best approach for this? > >> On 20 Feb 2014 23:35, <ipython-dev-request at scipy.org> wrote: >> Send IPython-dev mailing list submissions to >> ipython-dev at scipy.org >> >> To subscribe or unsubscribe via the World Wide Web, visit >> http://mail.scipy.org/mailman/listinfo/ipython-dev >> or, via email, send a message with subject or body 'help' to >> ipython-dev-request at scipy.org >> >> You can reach the person managing the list at >> ipython-dev-owner at scipy.org >> >> When replying, please edit your Subject line so it is more specific >> than "Re: Contents of IPython-dev digest..." >> >> >> Today's Topics: >> >> 1. Best way to detect IPython notebook (TARUN GABA) >> 2. Re: Best way to detect IPython notebook (Matthias BUSSONNIER) >> >> >> ---------------------------------------------------------------------- >> >> Message: 1 >> Date: Thu, 20 Feb 2014 22:15:33 +0530 >> From: TARUN GABA <tarun.gaba7 at gmail.com> >> Subject: [IPython-dev] Best way to detect IPython notebook >> To: ipython-dev at scipy.org >> Message-ID: >> <CAHAono2LZ=DfeBRL-Y3k0J6c=UdE_pUX19ZTYAxLQMyZMi3AdA at mail.gmail.com> >> Content-Type: text/plain; charset="iso-8859-1" >> >> Hi, >> I have written a method, which behaves differently when called from IPython >> notebook, and from interpreter/qtconsole respectively. >> I need to detect whether the method is called from notebook or interpreter. >> This was the code I was using till now. >> >> if get_ipython().config['KernelApp']['parent_appname'] == >> 'ipython-notebook': >> ##Do something >> >> But I have came to know that this particular dict changes its format in >> different IPython versions(I am not sure how many changes are there). >> >> Is there any better method to achieve this? >> Thanks in advance :) >> -------------- next part -------------- >> An HTML attachment was scrubbed... >> URL: http://mail.scipy.org/pipermail/ipython-dev/attachments/20140220/3ca3c0ab/attachment-0001.html >> >> ------------------------------ >> >> Message: 2 >> Date: Thu, 20 Feb 2014 18:17:54 +0100 >> From: Matthias BUSSONNIER <bussonniermatthias at gmail.com> >> Subject: Re: [IPython-dev] Best way to detect IPython notebook >> To: IPython developers list <ipython-dev at scipy.org> >> Message-ID: <6CC95483-B554-40C9-91AB-DB63FCDE0AA3 at gmail.com> >> Content-Type: text/plain; charset=iso-8859-1 >> >> Hi, >> >> Le 20 f?vr. 2014 ? 17:45, TARUN GABA a ?crit : >> >> > Hi, >> > I have written a method, which behaves differently when called from IPython notebook, and from interpreter/qtconsole respectively. >> > I need to detect whether the method is called from notebook or interpreter. >> > This was the code I was using till now. >> > >> > if get_ipython().config['KernelApp']['parent_appname'] == 'ipython-notebook': >> > ##Do something >> > >> > But I have came to know that this particular dict changes its format in different IPython versions(I am not sure how many changes are there). >> > >> > Is there any better method to achieve this? >> >> You should describe what you ment by "called from a notebook" >> it is not clear enough to give a correct answer. >> >> But if the question is the same as usual, and as stated in many discussion scattered >> over the net and mailing list, there is no, and there will be no reliable way to detect which >> frontend are requiring code execution, as there is no reason for a kernel to be connected >> to only one frontend. >> >> It is like a book writer asking "how can I make the eye color of my main character the same as my reader" ? >> The question make no sense as two person can be reading the same page of the same book at the same time. >> >> And as usual, if you describe what you are trying to archive instead of how, >> you might get an answer that suit you. >> >> >> Cheers, >> -- >> Matthias >> >> >> >> >> > Thanks in advance :) >> > _______________________________________________ >> > 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 >> >> >> End of IPython-dev Digest, Vol 121, Issue 28 >> ******************************************** > _______________________________________________ > 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/20140222/be9285aa/attachment.html> From lists at hilboll.de Sat Feb 22 05:16:19 2014 From: lists at hilboll.de (Andreas Hilboll) Date: Sat, 22 Feb 2014 11:16:19 +0100 Subject: [IPython-dev] Plans for notebook server / Authentication Message-ID: <530878F3.9000605@hilboll.de> Hi IPython devs, first of all thanks a lot for such a great product! I'd like to inquire what are your plans for the notebook server? I'd want to deploy it on a large server, with access for all my users. Ideally, the following things would hold: - all access to the notebook server is password-protected - users have to login using their username and password - users and passwords are not stored in IPython itself, but notebook server authenticates against the (Linux) server's own authentication system (/etc/passwd, or LDAP) - users have the possibility to browse their $HOME directory on the server and open/save notebooks from/to any place they have filesystem access to An unrelated point which just comes to my mind is have version control inside the notebook. For this, it would be enough to have a button to push the notebook to some (git) repository, and have a link in the notebook itself to open that repository's homepage (obviously, this would only work with web-hosted repos, like gist, github, bitbucket, you name it). Are there plans in these directions? How can I learn about which directions IPython is going? Do you need help implementing the server stuff I've been mentioning? Cheers, Andreas. From damianavila at gmail.com Sat Feb 22 07:31:00 2014 From: damianavila at gmail.com (=?ISO-8859-1?Q?Dami=E1n_Avila?=) Date: Sat, 22 Feb 2014 09:31:00 -0300 Subject: [IPython-dev] Notebook: Horizontal layout for multiple figures in output cell In-Reply-To: <CANn2QUzWEuweLvpzPhyW_HQVL+vTGRV5oNZahVN95ugWB8kk-g@mail.gmail.com> References: <CAA-tCo41iYXSbxLs762dB9BmZgf9xLWee46jU9HpuqvPg64JCg@mail.gmail.com> <CANn2QUwWnGg+EuUed=y=h-zSwPXcTvsmQJXVkBwy8yAPpkhUnw@mail.gmail.com> <CANn2QUy0SHr5Z48c2QwoOpcZ-dQTrmGRfKZEt1ub-a_g0Nc-KQ@mail.gmail.com> <CAA-tCo7rF7qNAmy1NFc6_W85TM+g1Pr7apovO1Hx1DGBX1Keqg@mail.gmail.com> <CACejjWwUH=c4N_sLmKT_c02ThL+6a+Juc_JXYxCiVpMuJRyXtA@mail.gmail.com> <CANn2QUzWEuweLvpzPhyW_HQVL+vTGRV5oNZahVN95ugWB8kk-g@mail.gmail.com> Message-ID: <CAH+mRR1Ckh8_co5ObPSUoqgadXUdk-XXr48vUh1J9cTm5Yngvw@mail.gmail.com> If you want to play with the css, I strongly recommend you to modify the less files which are generating the final style.min.css. After your modifications of the pertinent less files, you have to compile them to get a new style.min.css which will be applied to the notebook. 2014-02-21 22:59 GMT-03:00 Antonino Ingargiola <tritemio at gmail.com>: > On Fri, Feb 21, 2014 at 2:01 PM, Nicholas Bollweg <nick.bollweg at gmail.com>wrote: > >> @antonino: can you use a css selector, like :first-child, to keep the >> your format from bleeding over onto the text output? >> > > I'm not familiar with CSS, I just used the "Developer Tool" inspector in > Chrome to find the relevant elements. > > How should I proceed if I want to do some tests? Is modifying > style.min.css on disk and reloading the notebook the proper way to do it. > How people usually develop this king of stuff, at least in the ipython > context? > > Antonio > > > _______________________________________________ > 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/20140222/f6af59ab/attachment.html> From wes.turner at gmail.com Sat Feb 22 07:59:57 2014 From: wes.turner at gmail.com (Wes Turner) Date: Sat, 22 Feb 2014 06:59:57 -0600 Subject: [IPython-dev] Notebook: Horizontal layout for multiple figures in output cell In-Reply-To: <CAH+mRR1Ckh8_co5ObPSUoqgadXUdk-XXr48vUh1J9cTm5Yngvw@mail.gmail.com> References: <CAA-tCo41iYXSbxLs762dB9BmZgf9xLWee46jU9HpuqvPg64JCg@mail.gmail.com> <CANn2QUwWnGg+EuUed=y=h-zSwPXcTvsmQJXVkBwy8yAPpkhUnw@mail.gmail.com> <CANn2QUy0SHr5Z48c2QwoOpcZ-dQTrmGRfKZEt1ub-a_g0Nc-KQ@mail.gmail.com> <CAA-tCo7rF7qNAmy1NFc6_W85TM+g1Pr7apovO1Hx1DGBX1Keqg@mail.gmail.com> <CACejjWwUH=c4N_sLmKT_c02ThL+6a+Juc_JXYxCiVpMuJRyXtA@mail.gmail.com> <CANn2QUzWEuweLvpzPhyW_HQVL+vTGRV5oNZahVN95ugWB8kk-g@mail.gmail.com> <CAH+mRR1Ckh8_co5ObPSUoqgadXUdk-XXr48vUh1J9cTm5Yngvw@mail.gmail.com> Message-ID: <CACfEFw_3gp-_X1fnJ3pHz=n=YGmMvvmPcXEpkVH5AMEnSaZVFw@mail.gmail.com> On Feb 22, 2014 6:31 AM, "Dami?n Avila" <damianavila at gmail.com> wrote: > > If you want to play with the css, I strongly recommend you to modify the less files which are generating the final style.min.css. Bootstrap 2 grids may be sufficient? http://getbootstrap.com/2.3.2/scaffolding.html It shouldn't be too difficult to pass a few objects with _repr_html_ methods to a function that returns HTML with wrapper divs and Bootstrap classes? > After your modifications of the pertinent less files, you have to compile them to get a new style.min.css which will be applied to the notebook. Any roadmap update on Bootstrap 3? I guess it still doesn't support submenus? > > > 2014-02-21 22:59 GMT-03:00 Antonino Ingargiola <tritemio at gmail.com>: >> >> On Fri, Feb 21, 2014 at 2:01 PM, Nicholas Bollweg <nick.bollweg at gmail.com> wrote: >>> >>> @antonino: can you use a css selector, like :first-child, to keep the your format from bleeding over onto the text output? >> >> >> I'm not familiar with CSS, I just used the "Developer Tool" inspector in Chrome to find the relevant elements. >> >> How should I proceed if I want to do some tests? Is modifying style.min.css on disk and reloading the notebook the proper way to do it. How people usually develop this king of stuff, at least in the ipython context? >> >> Antonio >> >> >> _______________________________________________ >> 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/20140222/2e61e271/attachment.html> From damianavila at gmail.com Sat Feb 22 08:07:03 2014 From: damianavila at gmail.com (=?ISO-8859-1?Q?Dami=E1n_Avila?=) Date: Sat, 22 Feb 2014 10:07:03 -0300 Subject: [IPython-dev] Notebook: Horizontal layout for multiple figures in output cell In-Reply-To: <CACfEFw_3gp-_X1fnJ3pHz=n=YGmMvvmPcXEpkVH5AMEnSaZVFw@mail.gmail.com> References: <CAA-tCo41iYXSbxLs762dB9BmZgf9xLWee46jU9HpuqvPg64JCg@mail.gmail.com> <CANn2QUwWnGg+EuUed=y=h-zSwPXcTvsmQJXVkBwy8yAPpkhUnw@mail.gmail.com> <CANn2QUy0SHr5Z48c2QwoOpcZ-dQTrmGRfKZEt1ub-a_g0Nc-KQ@mail.gmail.com> <CAA-tCo7rF7qNAmy1NFc6_W85TM+g1Pr7apovO1Hx1DGBX1Keqg@mail.gmail.com> <CACejjWwUH=c4N_sLmKT_c02ThL+6a+Juc_JXYxCiVpMuJRyXtA@mail.gmail.com> <CANn2QUzWEuweLvpzPhyW_HQVL+vTGRV5oNZahVN95ugWB8kk-g@mail.gmail.com> <CAH+mRR1Ckh8_co5ObPSUoqgadXUdk-XXr48vUh1J9cTm5Yngvw@mail.gmail.com> <CACfEFw_3gp-_X1fnJ3pHz=n=YGmMvvmPcXEpkVH5AMEnSaZVFw@mail.gmail.com> Message-ID: <CAH+mRR0iuVi6yjoDFi3FXjZ6o=SLi7McDW8gAtqreJRkmHRjfw@mail.gmail.com> Probably, the work to update Bootstrap3 will be done after the release of 2.0... but yes, there are some things to deal with... eg. submenus... 2014-02-22 9:59 GMT-03:00 Wes Turner <wes.turner at gmail.com>: > > On Feb 22, 2014 6:31 AM, "Dami?n Avila" <damianavila at gmail.com> wrote: > > > > If you want to play with the css, I strongly recommend you to modify the > less files which are generating the final style.min.css. > > Bootstrap 2 grids may be sufficient? > > http://getbootstrap.com/2.3.2/scaffolding.html > > It shouldn't be too difficult to pass a few objects with _repr_html_ > methods to a function that returns HTML with wrapper divs and Bootstrap > classes? > > > After your modifications of the pertinent less files, you have to > compile them to get a new style.min.css which will be applied to the > notebook. > > Any roadmap update on Bootstrap 3? I guess it still doesn't support > submenus? > > > > > > > 2014-02-21 22:59 GMT-03:00 Antonino Ingargiola <tritemio at gmail.com>: > >> > >> On Fri, Feb 21, 2014 at 2:01 PM, Nicholas Bollweg < > nick.bollweg at gmail.com> wrote: > >>> > >>> @antonino: can you use a css selector, like :first-child, to keep the > your format from bleeding over onto the text output? > >> > >> > >> I'm not familiar with CSS, I just used the "Developer Tool" inspector > in Chrome to find the relevant elements. > >> > >> How should I proceed if I want to do some tests? Is modifying > style.min.css on disk and reloading the notebook the proper way to do it. > How people usually develop this king of stuff, at least in the ipython > context? > >> > >> Antonio > >> > >> > >> _______________________________________________ > >> 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 > > -- 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/20140222/a50dcb6f/attachment.html> From doug.blank at gmail.com Sat Feb 22 08:52:29 2014 From: doug.blank at gmail.com (Doug Blank) Date: Sat, 22 Feb 2014 08:52:29 -0500 Subject: [IPython-dev] Stand-alone kernel uses wrong kernel? Message-ID: <CAAusYCjRqHHZRrs3KPw9uLkh3wAmtLd9_sFosAJjXM_bWGXe2Q@mail.gmail.com> Bug or user error? If I start up a stand-alone kernel with latest IPython-master 2.0.0-dev like so: """ $ ipython kernel --profile calico NOTE: When using the `ipython kernel` entry point, Ctrl-C will not work. To exit, you will have to explicitly quit this process, by either sending "quit" from a client, or using Ctrl-\ in UNIX-like environments. To read more about this, see https://github.com/ipython/ipython/issues/2049 To connect another client to this kernel, use: --existing kernel-20283.json --profile calico """ And then attempt to connect onto it with any frontend: """ $ ipython console --existing kernel-20283.json --profile calico Python 2.7.5+ (default, Sep 19 2013, 13:48:49) Type "copyright", "credits" or "license" for more information. IPython 2.0.0-dev -- 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. IPython profile: calico In [1]: calico --------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-1-c2029787b47e> in <module>() ----> 1 calico NameError: name 'calico' is not defined """ As can be seen, it is not using the Calico kernel. Everything else seems to work great with this config/profile. """ $ ipython console --profile calico Loading Calico version 2.5.0... Python 2.7.5+ (default, Sep 19 2013, 13:48:49) Type "copyright", "credits" or "license" for more information. IPython 2.0.0-dev -- 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. IPython profile: calico In [1]: calico Out[1]: <Calico instance, version 2.5.0> """ I have just edited the one ipython_config.py as follows: """ $ ls -al ~/.ipython/profile_calico/ total 136 drwxr-xr-x 8 dblank dblank 4096 Feb 22 08:35 . drwxr-xr-x 6 dblank dblank 4096 Feb 21 09:46 .. drwxr-xr-x 2 dblank dblank 4096 Feb 21 09:46 db -rw-r--r-- 1 dblank dblank 9216 Feb 22 08:35 history.sqlite -rw-r--r-- 1 dblank dblank 485 Feb 21 13:55 ipython_config.py -rw-r--r-- 1 dblank dblank 31535 Feb 21 10:18 ipython_nbconvert_config.py -rw-r--r-- 1 dblank dblank 23317 Feb 21 10:18 ipython_notebook_config.py -rw-r--r-- 1 dblank dblank 24577 Feb 21 10:18 ipython_qtconsole_config.py drwxr-xr-x 2 dblank dblank 4096 Feb 21 09:46 log drwx------ 2 dblank dblank 4096 Feb 21 09:46 pid drwx------ 2 dblank dblank 4096 Feb 22 08:34 security drwxr-xr-x 2 dblank dblank 4096 Feb 21 13:55 startup drwxr-xr-x 3 dblank dblank 4096 Feb 21 09:46 static dblank at vaio:~/Calico$ cat ~/.ipython/profile_calico/ipython_config.py # Configuration file for ipython. c = get_config() c.KernelManager.kernel_cmd = [ 'mono', '/home/dblank/Calico/bin/Calico.exe', '--server', '{connection_file}'] """ And the JSON connection file looks fine: """ $ cat ~/.ipython/profile_calico/security/kernel-20283.json { "stdin_port": 56854, "ip": "127.0.0.1", "control_port": 50139, "hb_port": 35067, "signature_scheme": "hmac-sha256", "key": "...", "shell_port": 59556, "transport": "tcp", "iopub_port": 52203 } """ Am I using the kernel subcommand incorrectly, or just that there is a bug in selecting the kernel? -Doug -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140222/fdee4a1b/attachment.html> From jason-sage at creativetrax.com Sat Feb 22 10:35:11 2014 From: jason-sage at creativetrax.com (Jason Grout) Date: Sat, 22 Feb 2014 09:35:11 -0600 Subject: [IPython-dev] widget models caching the view In-Reply-To: <53084120.4010303@creativetrax.com> References: <53084120.4010303@creativetrax.com> Message-ID: <5308C3AF.6080504@creativetrax.com> On 2/22/14 12:18 AM, Jason Grout wrote: > Hi all, > > Right now, in the new widget system, when a view is created of a model, > the view is added to the model's view list here: > > https://github.com/ipython/ipython/blob/master/IPython/html/static/notebook/js/widgetmanager.js#L123 > > Since that code was written, we've settled on a more complete > understanding of the roles of views, models, and the python traits > classes. It seems that it would be better now to have a single view > cached with the model rather than a list of views, and if create_view is > called on a model that already has a view created, the already-created > view should be returned, rather than creating a new view. In other > words, it seems that the create_view function in the widget manager should: > > 1. check to see if model.view is set. If it is, return it > > 2. If model.view is not set, construct and return it, caching the new > view in the model.view attribute. > > Brian, Jonathan, others? What do you think? I've submitted a PR for this change: https://github.com/ipython/ipython/pull/5198 Thanks, Jason From takowl at gmail.com Sat Feb 22 11:11:18 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Sat, 22 Feb 2014 08:11:18 -0800 Subject: [IPython-dev] Stand-alone kernel uses wrong kernel? In-Reply-To: <CAAusYCjRqHHZRrs3KPw9uLkh3wAmtLd9_sFosAJjXM_bWGXe2Q@mail.gmail.com> References: <CAAusYCjRqHHZRrs3KPw9uLkh3wAmtLd9_sFosAJjXM_bWGXe2Q@mail.gmail.com> Message-ID: <CAOvn4qhxr6N1kdVNKczs-J4oiOpniktTYSO-9DeerBjnj3s6dQ@mail.gmail.com> 'ipython kernel' is the command to start an IPython kernel. It's not a wrapper around a kernel process, it is a kernel process. To start your own kernel, run whatever command you put in kernel_cmd. Thomas On 22 Feb 2014 05:52, "Doug Blank" <doug.blank at gmail.com> wrote: > Bug or user error? If I start up a stand-alone kernel with latest > IPython-master 2.0.0-dev like so: > > """ > $ ipython kernel --profile calico > NOTE: When using the `ipython kernel` entry point, Ctrl-C will not work. > > To exit, you will have to explicitly quit this process, by either sending > "quit" from a client, or using Ctrl-\ in UNIX-like environments. > > To read more about this, see > https://github.com/ipython/ipython/issues/2049 > > To connect another client to this kernel, use: > --existing kernel-20283.json --profile calico > """ > > And then attempt to connect onto it with any frontend: > > """ > $ ipython console --existing kernel-20283.json --profile calico > Python 2.7.5+ (default, Sep 19 2013, 13:48:49) > Type "copyright", "credits" or "license" for more information. > > IPython 2.0.0-dev -- 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. > > IPython profile: calico > > In [1]: calico > --------------------------------------------------------------------------- > NameError Traceback (most recent call last) > <ipython-input-1-c2029787b47e> in <module>() > ----> 1 calico > > NameError: name 'calico' is not defined > """ > > As can be seen, it is not using the Calico kernel. Everything else seems > to work great with this config/profile. > > """ > $ ipython console --profile calico > Loading Calico version 2.5.0... > Python 2.7.5+ (default, Sep 19 2013, 13:48:49) > Type "copyright", "credits" or "license" for more information. > > IPython 2.0.0-dev -- 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. > > IPython profile: calico > > In [1]: calico > Out[1]: <Calico instance, version 2.5.0> > """ > > I have just edited the one ipython_config.py as follows: > > """ > $ ls -al ~/.ipython/profile_calico/ > total 136 > drwxr-xr-x 8 dblank dblank 4096 Feb 22 08:35 . > drwxr-xr-x 6 dblank dblank 4096 Feb 21 09:46 .. > drwxr-xr-x 2 dblank dblank 4096 Feb 21 09:46 db > -rw-r--r-- 1 dblank dblank 9216 Feb 22 08:35 history.sqlite > -rw-r--r-- 1 dblank dblank 485 Feb 21 13:55 ipython_config.py > -rw-r--r-- 1 dblank dblank 31535 Feb 21 10:18 ipython_nbconvert_config.py > -rw-r--r-- 1 dblank dblank 23317 Feb 21 10:18 ipython_notebook_config.py > -rw-r--r-- 1 dblank dblank 24577 Feb 21 10:18 ipython_qtconsole_config.py > drwxr-xr-x 2 dblank dblank 4096 Feb 21 09:46 log > drwx------ 2 dblank dblank 4096 Feb 21 09:46 pid > drwx------ 2 dblank dblank 4096 Feb 22 08:34 security > drwxr-xr-x 2 dblank dblank 4096 Feb 21 13:55 startup > drwxr-xr-x 3 dblank dblank 4096 Feb 21 09:46 static > dblank at vaio:~/Calico$ cat ~/.ipython/profile_calico/ipython_config.py > # Configuration file for ipython. > > c = get_config() > c.KernelManager.kernel_cmd = [ > 'mono', '/home/dblank/Calico/bin/Calico.exe', > '--server', '{connection_file}'] > """ > > And the JSON connection file looks fine: > > """ > $ cat ~/.ipython/profile_calico/security/kernel-20283.json > { > "stdin_port": 56854, > "ip": "127.0.0.1", > "control_port": 50139, > "hb_port": 35067, > "signature_scheme": "hmac-sha256", > "key": "...", > "shell_port": 59556, > "transport": "tcp", > "iopub_port": 52203 > } > """ > > Am I using the kernel subcommand incorrectly, or just that there is a bug > in selecting the kernel? > > -Doug > > _______________________________________________ > 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/20140222/5359390b/attachment.html> From doug.blank at gmail.com Sat Feb 22 11:28:25 2014 From: doug.blank at gmail.com (Doug Blank) Date: Sat, 22 Feb 2014 11:28:25 -0500 Subject: [IPython-dev] Stand-alone kernel uses wrong kernel? In-Reply-To: <CAOvn4qhxr6N1kdVNKczs-J4oiOpniktTYSO-9DeerBjnj3s6dQ@mail.gmail.com> References: <CAAusYCjRqHHZRrs3KPw9uLkh3wAmtLd9_sFosAJjXM_bWGXe2Q@mail.gmail.com> <CAOvn4qhxr6N1kdVNKczs-J4oiOpniktTYSO-9DeerBjnj3s6dQ@mail.gmail.com> Message-ID: <CAAusYCjqKXOW6J9KWWRQaQGVKpzdMRRXgePvJKsaRED9iKp=VA@mail.gmail.com> On Sat, Feb 22, 2014 at 11:11 AM, Thomas Kluyver <takowl at gmail.com> wrote: > 'ipython kernel' is the command to start an IPython kernel. It's not a > wrapper around a kernel process, it is a kernel process. To start your own > kernel, run whatever command you put in kernel_cmd. > Well, that is not quite the whole story, because something needs to create the JSON file to pass to the command that you put in kernel_cmd, right? Wouldn't it just be easier if "ipython kernel" used the kernel_cmd from the profile given, and spawned a kernel process if necessary, in the case of external kernels? Then it would be exactly symmetric to the rest of the subcommands. Is there a specific reason it doesn't? (Otherwise, all of the other kernels will have to replicate this exact functionality). -Doug > Thomas > On 22 Feb 2014 05:52, "Doug Blank" <doug.blank at gmail.com> wrote: > >> Bug or user error? If I start up a stand-alone kernel with latest >> IPython-master 2.0.0-dev like so: >> >> """ >> $ ipython kernel --profile calico >> NOTE: When using the `ipython kernel` entry point, Ctrl-C will not work. >> >> To exit, you will have to explicitly quit this process, by either sending >> "quit" from a client, or using Ctrl-\ in UNIX-like environments. >> >> To read more about this, see >> https://github.com/ipython/ipython/issues/2049 >> >> To connect another client to this kernel, use: >> --existing kernel-20283.json --profile calico >> """ >> >> And then attempt to connect onto it with any frontend: >> >> """ >> $ ipython console --existing kernel-20283.json --profile calico >> Python 2.7.5+ (default, Sep 19 2013, 13:48:49) >> Type "copyright", "credits" or "license" for more information. >> >> IPython 2.0.0-dev -- 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. >> >> IPython profile: calico >> >> In [1]: calico >> >> --------------------------------------------------------------------------- >> NameError Traceback (most recent call >> last) >> <ipython-input-1-c2029787b47e> in <module>() >> ----> 1 calico >> >> NameError: name 'calico' is not defined >> """ >> >> As can be seen, it is not using the Calico kernel. Everything else seems >> to work great with this config/profile. >> >> """ >> $ ipython console --profile calico >> Loading Calico version 2.5.0... >> Python 2.7.5+ (default, Sep 19 2013, 13:48:49) >> Type "copyright", "credits" or "license" for more information. >> >> IPython 2.0.0-dev -- 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. >> >> IPython profile: calico >> >> In [1]: calico >> Out[1]: <Calico instance, version 2.5.0> >> """ >> >> I have just edited the one ipython_config.py as follows: >> >> """ >> $ ls -al ~/.ipython/profile_calico/ >> total 136 >> drwxr-xr-x 8 dblank dblank 4096 Feb 22 08:35 . >> drwxr-xr-x 6 dblank dblank 4096 Feb 21 09:46 .. >> drwxr-xr-x 2 dblank dblank 4096 Feb 21 09:46 db >> -rw-r--r-- 1 dblank dblank 9216 Feb 22 08:35 history.sqlite >> -rw-r--r-- 1 dblank dblank 485 Feb 21 13:55 ipython_config.py >> -rw-r--r-- 1 dblank dblank 31535 Feb 21 10:18 ipython_nbconvert_config.py >> -rw-r--r-- 1 dblank dblank 23317 Feb 21 10:18 ipython_notebook_config.py >> -rw-r--r-- 1 dblank dblank 24577 Feb 21 10:18 ipython_qtconsole_config.py >> drwxr-xr-x 2 dblank dblank 4096 Feb 21 09:46 log >> drwx------ 2 dblank dblank 4096 Feb 21 09:46 pid >> drwx------ 2 dblank dblank 4096 Feb 22 08:34 security >> drwxr-xr-x 2 dblank dblank 4096 Feb 21 13:55 startup >> drwxr-xr-x 3 dblank dblank 4096 Feb 21 09:46 static >> dblank at vaio:~/Calico$ cat ~/.ipython/profile_calico/ipython_config.py >> # Configuration file for ipython. >> >> c = get_config() >> c.KernelManager.kernel_cmd = [ >> 'mono', '/home/dblank/Calico/bin/Calico.exe', >> '--server', '{connection_file}'] >> """ >> >> And the JSON connection file looks fine: >> >> """ >> $ cat ~/.ipython/profile_calico/security/kernel-20283.json >> { >> "stdin_port": 56854, >> "ip": "127.0.0.1", >> "control_port": 50139, >> "hb_port": 35067, >> "signature_scheme": "hmac-sha256", >> "key": "...", >> "shell_port": 59556, >> "transport": "tcp", >> "iopub_port": 52203 >> } >> """ >> >> Am I using the kernel subcommand incorrectly, or just that there is a bug >> in selecting the kernel? >> >> -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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140222/30077524/attachment.html> From ian.h.bell at gmail.com Sat Feb 22 11:50:30 2014 From: ian.h.bell at gmail.com (Ian Bell) Date: Sat, 22 Feb 2014 17:50:30 +0100 Subject: [IPython-dev] Random crashes when doing conversion Message-ID: <CAJQnXJeL19fwJ0AvccYM7c=3cygCqqLGMk1mti6z99U+TXn+pg@mail.gmail.com> I am using the most excellent runipy script to generate HTML documentation from a large set of dynamically generated notebooks. More on that theme soon! I am getting random crashes (not repeatable) along the lines of that shown below. I can't seem to see any pattern. I'll convert a few files, then this error. Or sometimes I can convert ~10 files, and then it crashes. I have 114 notebooks to convert, so just converting 10 isn't quite cutting it Ian Traceback (most recent call last): File "C:\Python27\lib\site-packages\zmq\eventloop\zmqstream.py", line 401, in _run_callback callback(*args, **kwargs) File "C:\Python27\lib\site-packages\zmq\eventloop\minitornado\stack_context.py", line 241, in wrapped callback(*args, **kwargs) File "C:\Python27\lib\site-packages\ipython-2.0.0_dev-py2.7.egg\IPython\kernel\channels.py", line 170, in _handle_recv self.call_handlers(self.session.unserialize(smsg)) File "C:\Python27\lib\site-packages\ipython-2.0.0_dev-py2.7.egg\IPython\kernel\zmq\session.py", line 822, in unserialize message['header'] = extract_dates(header) File "C:\Python27\lib\site-packages\ipython-2.0.0_dev-py2.7.egg\IPython\utils\jsonutil.py", line 87, in extract_dates new_obj[k] = extract_dates(v) File "C:\Python27\lib\site-packages\ipython-2.0.0_dev-py2.7.egg\IPython\utils\jsonutil.py", line 92, in extract_dates obj = parse_date(obj) File "C:\Python27\lib\site-packages\ipython-2.0.0_dev-py2.7.egg\IPython\utils\jsonutil.py", line 79, in parse_date return datetime.strptime(notz, ISO8601) AttributeError: _strptime -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140222/3b879002/attachment.html> From fperez.net at gmail.com Sat Feb 22 15:22:34 2014 From: fperez.net at gmail.com (Fernando Perez) Date: Sat, 22 Feb 2014 12:22:34 -0800 Subject: [IPython-dev] Plans for notebook server / Authentication In-Reply-To: <530878F3.9000605@hilboll.de> References: <530878F3.9000605@hilboll.de> Message-ID: <CAHAreOoZh=FavDU3JqeORh9ERnpX3C21iOsrn9qiYezLS+RxbQ@mail.gmail.com> Hi Andreas, On Sat, Feb 22, 2014 at 2:16 AM, Andreas Hilboll <lists at hilboll.de> wrote: > Hi IPython devs, > > first of all thanks a lot for such a great product! I'd like to inquire > what are your plans for the notebook server? I'd want to deploy it on a > large server, with access for all my users. Ideally, the following > things would hold: > > - all access to the notebook server is password-protected > - users have to login using their username and password > - users and passwords are not stored in IPython itself, but notebook > server authenticates against the (Linux) server's own authentication > system (/etc/passwd, or LDAP) > - users have the possibility to browse their $HOME directory on the > server and open/save notebooks from/to any place they have filesystem > access to > Yup, this is pretty much the model we have in mind. See below for more. > An unrelated point which just comes to my mind is have version control > inside the notebook. For this, it would be enough to have a button to > push the notebook to some (git) repository, and have a link in the > notebook itself to open that repository's homepage (obviously, this > would only work with web-hosted repos, like gist, github, bitbucket, you > name it). > For now, we'll be skipping any kind of external VC integration. While certainly a nice convenience to have, it's a huge amount of work with lots of UI questions to solve and lots of engineering required to interface with all the possible (and changing!) external services. We simply don't have the resources for something like that, and need to keep our scope well contained. Since that's something that users can already solve at the command line or with their GUI tool of choice, that will remain the solution for the foreseeable future. > Are there plans in these directions? How can I learn about which > directions IPython is going? Do you need help implementing the server > stuff I've been mentioning? We're finishing up the work for the 2.0 release, and will then switch gears to the 3.0 one, whose major focus will be precisely the multiuser server. You can find out more about these plans here, that represent our current design docs as we captured our discussions during the dev meeting: https://hackpad.com/IPython-Winter-2014-Development-Meeting-fKrExqKCWmC We'll continue all further discussions about this, as usual, on this list and our weekly public dev meetings on G+. Cheers f -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140222/2c84ea8c/attachment.html> From satra at mit.edu Sat Feb 22 15:27:31 2014 From: satra at mit.edu (Satrajit Ghosh) Date: Sat, 22 Feb 2014 15:27:31 -0500 Subject: [IPython-dev] Plans for notebook server / Authentication In-Reply-To: <CAHAreOoZh=FavDU3JqeORh9ERnpX3C21iOsrn9qiYezLS+RxbQ@mail.gmail.com> References: <530878F3.9000605@hilboll.de> <CAHAreOoZh=FavDU3JqeORh9ERnpX3C21iOsrn9qiYezLS+RxbQ@mail.gmail.com> Message-ID: <CA+A4wO=YBuTpHGX2B33Tc3cpHZam=yg9Bw9_+KzvObjCWja8iQ@mail.gmail.com> hi dev-team, i don't know the best place to add a pointer, but would like to point to two projects that are of relevance here, both from mozilla: 1. persona (http://www.mozilla.org/en-US/persona/) 2. togetherjs (https://togetherjs.com/) cheers, satra On Sat, Feb 22, 2014 at 3:22 PM, Fernando Perez <fperez.net at gmail.com>wrote: > Hi Andreas, > > On Sat, Feb 22, 2014 at 2:16 AM, Andreas Hilboll <lists at hilboll.de> wrote: > >> Hi IPython devs, >> >> first of all thanks a lot for such a great product! I'd like to inquire >> what are your plans for the notebook server? I'd want to deploy it on a >> large server, with access for all my users. Ideally, the following >> things would hold: >> >> - all access to the notebook server is password-protected >> - users have to login using their username and password >> - users and passwords are not stored in IPython itself, but notebook >> server authenticates against the (Linux) server's own authentication >> system (/etc/passwd, or LDAP) >> - users have the possibility to browse their $HOME directory on the >> server and open/save notebooks from/to any place they have filesystem >> access to >> > > Yup, this is pretty much the model we have in mind. See below for more. > > >> An unrelated point which just comes to my mind is have version control >> inside the notebook. For this, it would be enough to have a button to >> push the notebook to some (git) repository, and have a link in the >> notebook itself to open that repository's homepage (obviously, this >> would only work with web-hosted repos, like gist, github, bitbucket, you >> name it). >> > > For now, we'll be skipping any kind of external VC integration. While > certainly a nice convenience to have, it's a huge amount of work with lots > of UI questions to solve and lots of engineering required to interface with > all the possible (and changing!) external services. We simply don't have > the resources for something like that, and need to keep our scope well > contained. > > Since that's something that users can already solve at the command line or > with their GUI tool of choice, that will remain the solution for the > foreseeable future. > > >> Are there plans in these directions? How can I learn about which >> directions IPython is going? Do you need help implementing the server >> stuff I've been mentioning? > > > We're finishing up the work for the 2.0 release, and will then switch > gears to the 3.0 one, whose major focus will be precisely the multiuser > server. > > You can find out more about these plans here, that represent our current > design docs as we captured our discussions during the dev meeting: > > https://hackpad.com/IPython-Winter-2014-Development-Meeting-fKrExqKCWmC > > We'll continue all further discussions about this, as usual, on this list > and our weekly public dev meetings on G+. > > Cheers > > > f > > _______________________________________________ > 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/20140222/afbd3225/attachment.html> From burkhard at ualberta.ca Sat Feb 22 17:17:35 2014 From: burkhard at ualberta.ca (Burkhard Ritter) Date: Sat, 22 Feb 2014 15:17:35 -0700 Subject: [IPython-dev] Notebook: Horizontal layout for multiple figures in output cell In-Reply-To: <CANn2QUwWnGg+EuUed=y=h-zSwPXcTvsmQJXVkBwy8yAPpkhUnw@mail.gmail.com> References: <CAA-tCo41iYXSbxLs762dB9BmZgf9xLWee46jU9HpuqvPg64JCg@mail.gmail.com> <CANn2QUwWnGg+EuUed=y=h-zSwPXcTvsmQJXVkBwy8yAPpkhUnw@mail.gmail.com> Message-ID: <CACSBSE29hzAuyyvPunBd-FYXcegUbPQQPjD27Cn+YHcQMQqRWA@mail.gmail.com> I have a very similar workflow and agree that plotting and arranging figures is not as easy or flexibe as it could be. However, my approach is slightly different: All my plots are subplots. I usually define each subplot in a separate function that takes Axes as an argument (this could be extended to directly create a new figure if no axes argument is passed). I then create a figure with a number of columns and rows and attach the previously defined subplots in a convenient order. I usually iterate the defined subplots and the arrangement of the subplots until I am happy with the figure. It should be easier to rearrange (sub)plots, but I am not sure if the IPython notebook / HTML is the right place to do it. If matplotlib would make this more convenient this might be all we need. I just played around with moving / copying axes (subplots) between figures in matplotlib and while I think it's supposed to work and works to some extend, it does not work properly (e.g. size, position, axes of the subplots are wrong when reattached to a different figure). Cheers, Burkhard On Fri, Feb 21, 2014 at 11:41 AM, Antonino Ingargiola <tritemio at gmail.com> wrote: > Hi Patrick, > > thanks for your input. > > Yes I'm using matplotlib. > > I know very well the different (and excellent!) options for creating > subplots. > > In my workflow, as common in scientific computing, the analysis is > "evolving". I need to try several routes before I find the right way. So I > want to make this process as smooth as possible. > > In this use case I value simplicity over everything else. For example when I > plot a series of plots I need to scale the subplots if the number of plots > changes (otherwise the plots becomes smaller, labels overlaps an so on). > Moreover with separate figures I'm "ready" to save "the good one" with a > savefig. Also, oftentimes I send my notebooks to non-python developers (read > PI), and if I use the most basic matlab-like interface they can follow the > code. When I start to mess with lists of axes, dynamic resizes, etc.., the > code become more difficult to follow, for no good reason. As I said, using > multiple figures is just too convenient in some use-cases. It's just > annoying, in my case, that the figures stack vertically, and I would like > the option to change this. > > I think this may be a common enough scenario to grant an IPython > config/option/plugin to achieve it. > > Any suggestion is welcome... > > Thanks, > Antonio > > > > > On Fri, Feb 21, 2014 at 10:13 AM, Patrick Surry <patrick.surry at gmail.com> > wrote: >> >> If you're using matplotlib for your plots, you can use subplots to create >> a horizontal (or arbitrary grid) of plots in an output cell. >> >> Try this example >> http://matplotlib.org/examples/pylab_examples/subplot_demo.html >> >> but change plt.subplot(2,1,1) and plt.subplot(2,1,2) (which indicate a 2x1 >> grid and plot #1 and #2) to plt.subplot(1,2,1) and plt.subplot(1,2,2) which >> does the same in a 1x2 grid. >> >> > > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > From ellisonbg at gmail.com Sat Feb 22 21:53:37 2014 From: ellisonbg at gmail.com (Brian Granger) Date: Sat, 22 Feb 2014 18:53:37 -0800 Subject: [IPython-dev] Random crashes when doing conversion In-Reply-To: <CAJQnXJeL19fwJ0AvccYM7c=3cygCqqLGMk1mti6z99U+TXn+pg@mail.gmail.com> References: <CAJQnXJeL19fwJ0AvccYM7c=3cygCqqLGMk1mti6z99U+TXn+pg@mail.gmail.com> Message-ID: <CAH4pYpTA2EwLw2Sg5PjpkXev5x42EzNzqaNu=aqnRRGnCHyVrQ@mail.gmail.com> I am guessing that this is problem with runipy, not IPython, so you might follow up with the runipy developer. But to help all debug this, can you share one of the notebooks that has this problem? On Sat, Feb 22, 2014 at 8:50 AM, Ian Bell <ian.h.bell at gmail.com> wrote: > I am using the most excellent runipy script to generate HTML documentation > from a large set of dynamically generated notebooks. More on that theme > soon! > > I am getting random crashes (not repeatable) along the lines of that shown > below. I can't seem to see any pattern. I'll convert a few files, then > this error. Or sometimes I can convert ~10 files, and then it crashes. I > have 114 notebooks to convert, so just converting 10 isn't quite cutting it > > Ian > > Traceback (most recent call last): > File "C:\Python27\lib\site-packages\zmq\eventloop\zmqstream.py", line 401, > in _run_callback > callback(*args, **kwargs) > File > "C:\Python27\lib\site-packages\zmq\eventloop\minitornado\stack_context.py", > line 241, in wrapped > callback(*args, **kwargs) > File > "C:\Python27\lib\site-packages\ipython-2.0.0_dev-py2.7.egg\IPython\kernel\channels.py", > line 170, in _handle_recv > self.call_handlers(self.session.unserialize(smsg)) > File > "C:\Python27\lib\site-packages\ipython-2.0.0_dev-py2.7.egg\IPython\kernel\zmq\session.py", > line 822, in unserialize > message['header'] = extract_dates(header) > File > "C:\Python27\lib\site-packages\ipython-2.0.0_dev-py2.7.egg\IPython\utils\jsonutil.py", > line 87, in extract_dates > new_obj[k] = extract_dates(v) > File > "C:\Python27\lib\site-packages\ipython-2.0.0_dev-py2.7.egg\IPython\utils\jsonutil.py", > line 92, in extract_dates > obj = parse_date(obj) > File > "C:\Python27\lib\site-packages\ipython-2.0.0_dev-py2.7.egg\IPython\utils\jsonutil.py", > line 79, in parse_date > return datetime.strptime(notz, ISO8601) > AttributeError: _strptime > > > _______________________________________________ > 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 Feb 22 21:58:52 2014 From: ellisonbg at gmail.com (Brian Granger) Date: Sat, 22 Feb 2014 18:58:52 -0800 Subject: [IPython-dev] widget models caching the view In-Reply-To: <5308C3AF.6080504@creativetrax.com> References: <53084120.4010303@creativetrax.com> <5308C3AF.6080504@creativetrax.com> Message-ID: <CAH4pYpR6vn2EuhDbynLuQM90UWTd_qWoUMt=BCTd2yX6OXMAEw@mail.gmail.com> Hi, sorry, just catching up. I am confused. I don't see how this is even possible. In browsers/DOM it is not possible to have a single DOM element displayed in multiple places on the page. Isn't that what this change tries to do? If it does work, I am guessing that it is broken - surely the events won't fire properly when the view is on the page multiple times. Conceptually, I think we *do* want multiple views. Each view maps onto one place in the page where the widget is displayed. Each of those instances needs to be able to handle its own events, etc. For example, only one instance of the view can have focus at a time or accept keyboard input. Am I missing something? On Sat, Feb 22, 2014 at 7:35 AM, Jason Grout <jason-sage at creativetrax.com> wrote: > On 2/22/14 12:18 AM, Jason Grout wrote: >> Hi all, >> >> Right now, in the new widget system, when a view is created of a model, >> the view is added to the model's view list here: >> >> https://github.com/ipython/ipython/blob/master/IPython/html/static/notebook/js/widgetmanager.js#L123 >> >> Since that code was written, we've settled on a more complete >> understanding of the roles of views, models, and the python traits >> classes. It seems that it would be better now to have a single view >> cached with the model rather than a list of views, and if create_view is >> called on a model that already has a view created, the already-created >> view should be returned, rather than creating a new view. In other >> words, it seems that the create_view function in the widget manager should: >> >> 1. check to see if model.view is set. If it is, return it >> >> 2. If model.view is not set, construct and return it, caching the new >> view in the model.view attribute. >> >> Brian, Jonathan, others? What do you think? > > I've submitted a PR for this change: > https://github.com/ipython/ipython/pull/5198 > > 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 ian.h.bell at gmail.com Sat Feb 22 22:08:38 2014 From: ian.h.bell at gmail.com (Ian Bell) Date: Sun, 23 Feb 2014 04:08:38 +0100 Subject: [IPython-dev] Random crashes when doing conversion In-Reply-To: <CAH4pYpTA2EwLw2Sg5PjpkXev5x42EzNzqaNu=aqnRRGnCHyVrQ@mail.gmail.com> References: <CAJQnXJeL19fwJ0AvccYM7c=3cygCqqLGMk1mti6z99U+TXn+pg@mail.gmail.com> <CAH4pYpTA2EwLw2Sg5PjpkXev5x42EzNzqaNu=aqnRRGnCHyVrQ@mail.gmail.com> Message-ID: <CAJQnXJeTNF=qMCUtMOtvr_RPaRk-hG5F-gSbBxdQ_5LhDr=aUA@mail.gmail.com> Will do, here's an example of one that fails: https://github.com/ibell/coolprop/blob/master/Web/FluidTemplate.ipynb On Sun, Feb 23, 2014 at 3:53 AM, Brian Granger <ellisonbg at gmail.com> wrote: > I am guessing that this is problem with runipy, not IPython, so you > might follow up with the runipy developer. But to help all debug this, > can you share one of the notebooks that has this problem? > > On Sat, Feb 22, 2014 at 8:50 AM, Ian Bell <ian.h.bell at gmail.com> wrote: > > I am using the most excellent runipy script to generate HTML > documentation > > from a large set of dynamically generated notebooks. More on that theme > > soon! > > > > I am getting random crashes (not repeatable) along the lines of that > shown > > below. I can't seem to see any pattern. I'll convert a few files, then > > this error. Or sometimes I can convert ~10 files, and then it crashes. > I > > have 114 notebooks to convert, so just converting 10 isn't quite cutting > it > > > > Ian > > > > Traceback (most recent call last): > > File "C:\Python27\lib\site-packages\zmq\eventloop\zmqstream.py", line > 401, > > in _run_callback > > callback(*args, **kwargs) > > File > > > "C:\Python27\lib\site-packages\zmq\eventloop\minitornado\stack_context.py", > > line 241, in wrapped > > callback(*args, **kwargs) > > File > > > "C:\Python27\lib\site-packages\ipython-2.0.0_dev-py2.7.egg\IPython\kernel\channels.py", > > line 170, in _handle_recv > > self.call_handlers(self.session.unserialize(smsg)) > > File > > > "C:\Python27\lib\site-packages\ipython-2.0.0_dev-py2.7.egg\IPython\kernel\zmq\session.py", > > line 822, in unserialize > > message['header'] = extract_dates(header) > > File > > > "C:\Python27\lib\site-packages\ipython-2.0.0_dev-py2.7.egg\IPython\utils\jsonutil.py", > > line 87, in extract_dates > > new_obj[k] = extract_dates(v) > > File > > > "C:\Python27\lib\site-packages\ipython-2.0.0_dev-py2.7.egg\IPython\utils\jsonutil.py", > > line 92, in extract_dates > > obj = parse_date(obj) > > File > > > "C:\Python27\lib\site-packages\ipython-2.0.0_dev-py2.7.egg\IPython\utils\jsonutil.py", > > line 79, in parse_date > > return datetime.strptime(notz, ISO8601) > > AttributeError: _strptime > > > > > > _______________________________________________ > > 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/20140223/66ce9772/attachment.html> From jason-sage at creativetrax.com Sat Feb 22 22:19:06 2014 From: jason-sage at creativetrax.com (Jason Grout) Date: Sat, 22 Feb 2014 21:19:06 -0600 Subject: [IPython-dev] widget models caching the view In-Reply-To: <CAH4pYpR6vn2EuhDbynLuQM90UWTd_qWoUMt=BCTd2yX6OXMAEw@mail.gmail.com> References: <53084120.4010303@creativetrax.com> <5308C3AF.6080504@creativetrax.com> <CAH4pYpR6vn2EuhDbynLuQM90UWTd_qWoUMt=BCTd2yX6OXMAEw@mail.gmail.com> Message-ID: <530968AA.7050302@creativetrax.com> On 2/22/14 8:58 PM, Brian Granger wrote: > Hi, sorry, just catching up. I am confused. I don't see how this is > even possible. In browsers/DOM it is not possible to have a single DOM > element displayed in multiple places on the page. Isn't that what this > change tries to do? If it does work, I am guessing that it is broken - > surely the events won't fire properly when the view is on the page > multiple times. But widget views !== dom elements. For my usecase, for example, widget views are Three.js objects. And you can certainly have the same three.js object in multiple places in the scene graph. For example, I want the same geometry object with several different kinds of material. > Conceptually, I think we *do* want multiple views. Each view maps onto > one place in the page where the widget is displayed. Each of those > instances needs to be able to handle its own events, etc. For example, > only one instance of the view can have focus at a time or accept > keyboard input. > > Am I missing something? I thought we were transitioning to having multiple widgets for display in different places that were linked together. The "view" is really the python instance+backbone model+backbone view. If you want a widget in multiple places, create multiple widgets and link them together. The model is simpler. If you want multiple views in javascript for the same model/python instance, then you really probably ought to expose those views on the python side with full python view classes. Thanks, Jason From jason-sage at creativetrax.com Sat Feb 22 22:37:46 2014 From: jason-sage at creativetrax.com (Jason Grout) Date: Sat, 22 Feb 2014 21:37:46 -0600 Subject: [IPython-dev] widget models caching the view In-Reply-To: <530968AA.7050302@creativetrax.com> References: <53084120.4010303@creativetrax.com> <5308C3AF.6080504@creativetrax.com> <CAH4pYpR6vn2EuhDbynLuQM90UWTd_qWoUMt=BCTd2yX6OXMAEw@mail.gmail.com> <530968AA.7050302@creativetrax.com> Message-ID: <53096D0A.1080408@creativetrax.com> On 2/22/14 9:19 PM, Jason Grout wrote: > On 2/22/14 8:58 PM, Brian Granger wrote: >> Am I missing something? I think I see better what you are saying. Are you saying that currently this works: s=Slider(...) display(s) (and then in another cell) display(s) but then after this change, that wouldn't work? I guess it would still "work", in that it would probably move the slider DOM element to the new position. But I think you're right that it would make displaying the same widget multiple times difficult. Do we want to support displaying a single widget multiple times (for example, as different sliders)? Perhaps that is the slippery slope to exposing full view classes in Python so you can display the slider data also as other controls elsewhere? Thanks, Jason From ellisonbg at gmail.com Sat Feb 22 22:40:17 2014 From: ellisonbg at gmail.com (Brian Granger) Date: Sat, 22 Feb 2014 19:40:17 -0800 Subject: [IPython-dev] widget models caching the view In-Reply-To: <530968AA.7050302@creativetrax.com> References: <53084120.4010303@creativetrax.com> <5308C3AF.6080504@creativetrax.com> <CAH4pYpR6vn2EuhDbynLuQM90UWTd_qWoUMt=BCTd2yX6OXMAEw@mail.gmail.com> <530968AA.7050302@creativetrax.com> Message-ID: <EBB1B71B-DD2B-4FF8-B00B-F943AF869B70@gmail.com> Boarding a plane... Sent from my iPhone > On Feb 22, 2014, at 7:19 PM, Jason Grout <jason-sage at creativetrax.com> wrote: > >> On 2/22/14 8:58 PM, Brian Granger wrote: >> Hi, sorry, just catching up. I am confused. I don't see how this is >> even possible. In browsers/DOM it is not possible to have a single DOM >> element displayed in multiple places on the page. Isn't that what this >> change tries to do? If it does work, I am guessing that it is broken - >> surely the events won't fire properly when the view is on the page >> multiple times. > > But widget views !== dom elements. For my usecase, for example, widget > views are Three.js objects. And you can certainly have the same > three.js object in multiple places in the scene graph. For example, I > want the same geometry object with several different kinds of material. > They way backbone traditionally works - for dom based views - is that the do map one-to-one with those dom elements. They even have a $el attribute that points to the dom element on the page. I understand that not all views use this, but we can't break it for the many views that do use it. > >> Conceptually, I think we *do* want multiple views. Each view maps onto >> one place in the page where the widget is displayed. Each of those >> instances needs to be able to handle its own events, etc. For example, >> only one instance of the view can have focus at a time or accept >> keyboard input. >> >> Am I missing something? > > I thought we were transitioning to having multiple widgets for display > in different places that were linked together. The "view" is really the > python instance+backbone model+backbone view. If you want a widget in > multiple places, create multiple widgets and link them together. The > model is simpler. If you want multiple views in javascript for the same > model/python instance, then you really probably ought to expose those > views on the python side with full python view classes. > That transition was not away from multiple views in general. That is and must be fully supported. What we did move away from is a single model with multiple *different* views - like a slider and text box attached to the same model. The word multiple is a bit vague - I use it to mean an instances of the same view class attached to one model but shown in different places on the page - typically different cells > Thanks, > > Jason > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev From ellisonbg at gmail.com Sat Feb 22 22:43:12 2014 From: ellisonbg at gmail.com (Brian Granger) Date: Sat, 22 Feb 2014 19:43:12 -0800 Subject: [IPython-dev] widget models caching the view In-Reply-To: <53096D0A.1080408@creativetrax.com> References: <53084120.4010303@creativetrax.com> <5308C3AF.6080504@creativetrax.com> <CAH4pYpR6vn2EuhDbynLuQM90UWTd_qWoUMt=BCTd2yX6OXMAEw@mail.gmail.com> <530968AA.7050302@creativetrax.com> <53096D0A.1080408@creativetrax.com> Message-ID: <39F0E7F8-7E1A-46CF-AC52-3F1A94162BC9@gmail.com> Yes this is it exactly. I do think we bed to support it, otherwise the second you display a widget, it becomes pinned to that cell - you could use it later Sent from my iPhone > On Feb 22, 2014, at 7:37 PM, Jason Grout <jason-sage at creativetrax.com> wrote: > >> On 2/22/14 9:19 PM, Jason Grout wrote: >> On 2/22/14 8:58 PM, Brian Granger wrote: > >>> Am I missing something? > > I think I see better what you are saying. Are you saying that currently > this works: > > s=Slider(...) > display(s) > > (and then in another cell) > > display(s) > > but then after this change, that wouldn't work? I guess it would still > "work", in that it would probably move the slider DOM element to the new > position. But I think you're right that it would make displaying the > same widget multiple times difficult. > > Do we want to support displaying a single widget multiple times (for > example, as different sliders)? Perhaps that is the slippery slope to > exposing full view classes in Python so you can display the slider data > also as other controls elsewhere? > > Thanks, > > Jason > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev From jason-sage at creativetrax.com Sat Feb 22 22:48:06 2014 From: jason-sage at creativetrax.com (Jason Grout) Date: Sat, 22 Feb 2014 21:48:06 -0600 Subject: [IPython-dev] widget models caching the view In-Reply-To: <39F0E7F8-7E1A-46CF-AC52-3F1A94162BC9@gmail.com> References: <53084120.4010303@creativetrax.com> <5308C3AF.6080504@creativetrax.com> <CAH4pYpR6vn2EuhDbynLuQM90UWTd_qWoUMt=BCTd2yX6OXMAEw@mail.gmail.com> <530968AA.7050302@creativetrax.com> <53096D0A.1080408@creativetrax.com> <39F0E7F8-7E1A-46CF-AC52-3F1A94162BC9@gmail.com> Message-ID: <53096F76.7060001@creativetrax.com> You bring up some good points. I'll rethink how I'm trying to cache my view objects. Thanks, Jason On 2/22/14 9:43 PM, Brian Granger wrote: > Yes this is it exactly. I do think we bed to support it, otherwise the second you display a widget, it becomes pinned to that cell - you could use it later > > Sent from my iPhone > >> On Feb 22, 2014, at 7:37 PM, Jason Grout <jason-sage at creativetrax.com> wrote: >> >>> On 2/22/14 9:19 PM, Jason Grout wrote: >>> On 2/22/14 8:58 PM, Brian Granger wrote: >> >>>> Am I missing something? >> >> I think I see better what you are saying. Are you saying that currently >> this works: >> >> s=Slider(...) >> display(s) >> >> (and then in another cell) >> >> display(s) >> >> but then after this change, that wouldn't work? I guess it would still >> "work", in that it would probably move the slider DOM element to the new >> position. But I think you're right that it would make displaying the >> same widget multiple times difficult. >> >> Do we want to support displaying a single widget multiple times (for >> example, as different sliders)? Perhaps that is the slippery slope to >> exposing full view classes in Python so you can display the slider data >> also as other controls elsewhere? >> >> 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 > From doug.blank at gmail.com Sun Feb 23 02:47:18 2014 From: doug.blank at gmail.com (Doug Blank) Date: Sun, 23 Feb 2014 02:47:18 -0500 Subject: [IPython-dev] Stand-alone kernel uses wrong kernel? In-Reply-To: <CAAusYCjqKXOW6J9KWWRQaQGVKpzdMRRXgePvJKsaRED9iKp=VA@mail.gmail.com> References: <CAAusYCjRqHHZRrs3KPw9uLkh3wAmtLd9_sFosAJjXM_bWGXe2Q@mail.gmail.com> <CAOvn4qhxr6N1kdVNKczs-J4oiOpniktTYSO-9DeerBjnj3s6dQ@mail.gmail.com> <CAAusYCjqKXOW6J9KWWRQaQGVKpzdMRRXgePvJKsaRED9iKp=VA@mail.gmail.com> Message-ID: <CAAusYCjizrpL1q+OPQyuTZHnaq6wQyroZ6857gzPvOKT9A8TAA@mail.gmail.com> On Sat, Feb 22, 2014 at 11:28 AM, Doug Blank <doug.blank at gmail.com> wrote: > On Sat, Feb 22, 2014 at 11:11 AM, Thomas Kluyver <takowl at gmail.com> wrote: > >> 'ipython kernel' is the command to start an IPython kernel. It's not a >> wrapper around a kernel process, it is a kernel process. To start your own >> kernel, run whatever command you put in kernel_cmd. >> > Well, that is not quite the whole story, because something needs to create > the JSON file to pass to the command that you put in kernel_cmd, right? > > Wouldn't it just be easier if "ipython kernel" used the kernel_cmd from > the profile given, and spawned a kernel process if necessary, in the case > of external kernels? Then it would be exactly symmetric to the rest of the > subcommands. Is there a specific reason it doesn't? (Otherwise, all of the > other kernels will have to replicate this exact functionality). > I looked into making "ipython kernel" work with external kernels, but there isn't much for it to do other than pass control on to the other kernel. Finding random ports in ZMQ is done by actually trying to bind onto random ports, and so it can be done fairly straightforwardly. The only other thing to do is to write out the config file in IPython's user directory, and display the filename on the console. In case other kernel authors are looking for a pattern, I made it so that running kernel_cmd without being given a {connection_file} will act as does "ipython kernel" (eg, kernel_cmd = ['calico', '--server', "{connection_file}"] will use the connection file if given, but if it is not given, then it generates one, displays the filename, and begins listening as a kernel). -Doug > > > -Doug > > >> Thomas >> On 22 Feb 2014 05:52, "Doug Blank" <doug.blank at gmail.com> wrote: >> >>> Bug or user error? If I start up a stand-alone kernel with latest >>> IPython-master 2.0.0-dev like so: >>> >>> """ >>> $ ipython kernel --profile calico >>> NOTE: When using the `ipython kernel` entry point, Ctrl-C will not work. >>> >>> To exit, you will have to explicitly quit this process, by either sending >>> "quit" from a client, or using Ctrl-\ in UNIX-like environments. >>> >>> To read more about this, see >>> https://github.com/ipython/ipython/issues/2049 >>> >>> To connect another client to this kernel, use: >>> --existing kernel-20283.json --profile calico >>> """ >>> >>> And then attempt to connect onto it with any frontend: >>> >>> """ >>> $ ipython console --existing kernel-20283.json --profile calico >>> Python 2.7.5+ (default, Sep 19 2013, 13:48:49) >>> Type "copyright", "credits" or "license" for more information. >>> >>> IPython 2.0.0-dev -- 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. >>> >>> IPython profile: calico >>> >>> In [1]: calico >>> >>> --------------------------------------------------------------------------- >>> NameError Traceback (most recent call >>> last) >>> <ipython-input-1-c2029787b47e> in <module>() >>> ----> 1 calico >>> >>> NameError: name 'calico' is not defined >>> """ >>> >>> As can be seen, it is not using the Calico kernel. Everything else seems >>> to work great with this config/profile. >>> >>> """ >>> $ ipython console --profile calico >>> Loading Calico version 2.5.0... >>> Python 2.7.5+ (default, Sep 19 2013, 13:48:49) >>> Type "copyright", "credits" or "license" for more information. >>> >>> IPython 2.0.0-dev -- 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. >>> >>> IPython profile: calico >>> >>> In [1]: calico >>> Out[1]: <Calico instance, version 2.5.0> >>> """ >>> >>> I have just edited the one ipython_config.py as follows: >>> >>> """ >>> $ ls -al ~/.ipython/profile_calico/ >>> total 136 >>> drwxr-xr-x 8 dblank dblank 4096 Feb 22 08:35 . >>> drwxr-xr-x 6 dblank dblank 4096 Feb 21 09:46 .. >>> drwxr-xr-x 2 dblank dblank 4096 Feb 21 09:46 db >>> -rw-r--r-- 1 dblank dblank 9216 Feb 22 08:35 history.sqlite >>> -rw-r--r-- 1 dblank dblank 485 Feb 21 13:55 ipython_config.py >>> -rw-r--r-- 1 dblank dblank 31535 Feb 21 10:18 ipython_nbconvert_config.py >>> -rw-r--r-- 1 dblank dblank 23317 Feb 21 10:18 ipython_notebook_config.py >>> -rw-r--r-- 1 dblank dblank 24577 Feb 21 10:18 ipython_qtconsole_config.py >>> drwxr-xr-x 2 dblank dblank 4096 Feb 21 09:46 log >>> drwx------ 2 dblank dblank 4096 Feb 21 09:46 pid >>> drwx------ 2 dblank dblank 4096 Feb 22 08:34 security >>> drwxr-xr-x 2 dblank dblank 4096 Feb 21 13:55 startup >>> drwxr-xr-x 3 dblank dblank 4096 Feb 21 09:46 static >>> dblank at vaio:~/Calico$ cat ~/.ipython/profile_calico/ipython_config.py >>> # Configuration file for ipython. >>> >>> c = get_config() >>> c.KernelManager.kernel_cmd = [ >>> 'mono', '/home/dblank/Calico/bin/Calico.exe', >>> '--server', '{connection_file}'] >>> """ >>> >>> And the JSON connection file looks fine: >>> >>> """ >>> $ cat ~/.ipython/profile_calico/security/kernel-20283.json >>> { >>> "stdin_port": 56854, >>> "ip": "127.0.0.1", >>> "control_port": 50139, >>> "hb_port": 35067, >>> "signature_scheme": "hmac-sha256", >>> "key": "...", >>> "shell_port": 59556, >>> "transport": "tcp", >>> "iopub_port": 52203 >>> } >>> """ >>> >>> Am I using the kernel subcommand incorrectly, or just that there is a >>> bug in selecting the kernel? >>> >>> -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 >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140223/5c123ee4/attachment.html> From felix at fbreuer.de Sun Feb 23 07:10:30 2014 From: felix at fbreuer.de (Felix Breuer) Date: Sun, 23 Feb 2014 13:10:30 +0100 Subject: [IPython-dev] state changes to custom widget trigger update twice Message-ID: <2BDDA9AA-74F8-4C41-A2F1-10C4B8725602@fbreuer.de> Hello everyone! Inspired by Jonathan?s D3 demos (https://github.com/jdfreder/ipython-d3), I am trying to wrap my head around creating custom widgets in the IPython notebook. Starting with a minimal (non-D3) example, I have already run into a couple of questions that I couldn?t figure out yet. Most importantly, it seems like on the JavaScript side update() is always called twice whenever a state change is sent from Python. Why is that and how can I make sure update is called just once? Concrete example: from IPython.html import widgets # Widget definitions from IPython.display import display # Used to display widgets in the notebook from IPython.utils.traitlets import Unicode, Dict, List # Used to declare attributes of our widget class MinimalWidget(widgets.DOMWidget): _view_name = Unicode('MinimalView', sync=True) value = Dict({'hello':'world'},sync=True) %%javascript require(["notebook/js/widgets/widget"], function(WidgetManager){ var MinimalView = IPython.DOMWidgetView.extend({ render: function() { console.log("render"); this.$container = $('<div></div>').attr('id','container').appendTo(this.$el); this.update(); }, update: function() { console.log("update"); var dict = this.model.get("value"); this.$container.empty(); var that = this; $.each(dict, function(key,val) { console.log(key,val); that.$container.append("<p>" + key + ": " + val + "</p>"); }); return MinimalView.__super__.update.apply(this); } }); WidgetManager.register_widget_view('MinimalView', MinimalView); }); Now, to try it out: # show widget w = MinimalWidget() display(w) # update is called once here # change value w.value["foo"] = ?bar? # does not trigger update w.send_state() # calls update *twice* w.value = {'one':'two?} # triggers update *twice* del w.value["one?] # does not trigger update w.send_state() # calls update *twice* For applications that use D3, for example, it is important that update is called just once. Calling update twice defeats the purpose of .enter() and .exit(). Any help in figuring out where I went wrong would be greatly appreciated. Cheers, Felix -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140223/e42a17e1/attachment.html> From filipe at kde.org Sun Feb 23 16:58:37 2014 From: filipe at kde.org (Filipe Saraiva) Date: Sun, 23 Feb 2014 18:58:37 -0300 Subject: [IPython-dev] Embedding IPython in C using Python/C API Message-ID: <530A6F0D.4060009@kde.org> Hello, I would like to develop an IPython backend for Cantor, a IDE from KDE-edu project for several mathematical softwares like Python 2, Scilab, Maxima, Octave, etc. You can see the Python 2 backend info in http://blog.filipesaraiva.info/?p=1213. I searched for info on the web about the use of Python/C API and IPython but I can not find anything. I am thinking in to use PyRun_SimpleString to send commands to IPython and get the commands output using stdout/stderr to show this outputs in C side. I will appreciate any reference to use of Python/C API in IPython. Thank you; -- Filipe Saraiva http://filipesaraiva.info/ From fperez.net at gmail.com Sun Feb 23 17:13:58 2014 From: fperez.net at gmail.com (Fernando Perez) Date: Sun, 23 Feb 2014 14:13:58 -0800 Subject: [IPython-dev] Embedding IPython in C using Python/C API In-Reply-To: <530A6F0D.4060009@kde.org> References: <530A6F0D.4060009@kde.org> Message-ID: <CAHAreOrmCCUTWTAgwUPN6+Ou55tC7Pk4ZD+9AbNfgKGKmrW5eQ@mail.gmail.com> You may want to look at the various high-level entry points here: http://docs.python.org/2/c-api/veryhigh.html It may be more convenient for you to put all the python code you'll need in a file and use one of the file-oriented C API functions. But overall, you're on the right track: IPython has no pure C API, only Python. So you'll need to use the functions to call Python source code from inside CPython. Cheers f On Sun, Feb 23, 2014 at 1:58 PM, Filipe Saraiva <filipe at kde.org> wrote: > Hello, > > I would like to develop an IPython backend for Cantor, a IDE from > KDE-edu project for several mathematical softwares like Python 2, > Scilab, Maxima, Octave, etc. You can see the Python 2 backend info in > http://blog.filipesaraiva.info/?p=1213. > > I searched for info on the web about the use of Python/C API and IPython > but I can not find anything. I am thinking in to use PyRun_SimpleString > to send commands to IPython and get the commands output using > stdout/stderr to show this outputs in C side. > > I will appreciate any reference to use of Python/C API in IPython. > > Thank you; > > -- > Filipe Saraiva > http://filipesaraiva.info/ > > _______________________________________________ > 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/20140223/192fd815/attachment.html> From moorepants at gmail.com Sun Feb 23 18:00:01 2014 From: moorepants at gmail.com (Jason Moore) Date: Sun, 23 Feb 2014 18:00:01 -0500 Subject: [IPython-dev] What's the easiest way to open an IPython Notebook server in a particular directory on Windows? Message-ID: <CAP7f1AiiqJOCdb8HVreask9dOEPMtWBmq4M7CzLSdYvOk+WmUg@mail.gmail.com> The IPython Notebook shortcut installed by Anaconda defaults to opening in the "IPython Notebooks" directory. Is there an easier (point and click?) method to opening the server in another directory besides (1) open a CMD prompt and cd'ing to the directory or (2) changing the "start in" properties of the shortcut? I'm giving a tutorial to command line novices and was hoping for something very simple for them to open up the notebook server in the correct directory. Jason moorepants.info +01 530-601-9791 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140223/d9595e26/attachment.html> From aron at ahmadia.net Sun Feb 23 18:06:14 2014 From: aron at ahmadia.net (Aron Ahmadia) Date: Sun, 23 Feb 2014 18:06:14 -0500 Subject: [IPython-dev] What's the easiest way to open an IPython Notebook server in a particular directory on Windows? In-Reply-To: <CAP7f1AiiqJOCdb8HVreask9dOEPMtWBmq4M7CzLSdYvOk+WmUg@mail.gmail.com> References: <CAP7f1AiiqJOCdb8HVreask9dOEPMtWBmq4M7CzLSdYvOk+WmUg@mail.gmail.com> Message-ID: <CAPhiW4juhCDZHvqfX8KnEhTe44qohY_WmxXEhLmMBVxr3aN5ig@mail.gmail.com> It might be better to direct this question to the Anaconda mailing list (cc'd). You could distribute a shortcut for them that does the right thing when you're packaging your repository. If you come up with something better or that works for you, please add it to the Software Carpentry "configuration problems" Wiki https://github.com/swcarpentry/bc/wiki/Configuration-Problems-and-Solutions Right now Software Carpentry instructors usually get around this by teaching the command line *before* Git :) A On Sun, Feb 23, 2014 at 6:00 PM, Jason Moore <moorepants at gmail.com> wrote: > The IPython Notebook shortcut installed by Anaconda defaults to opening in > the "IPython Notebooks" directory. Is there an easier (point and click?) > method to opening the server in another directory besides (1) open a CMD > prompt and cd'ing to the directory or (2) changing the "start in" > properties of the shortcut? > > I'm giving a tutorial to command line novices and was hoping for something > very simple for them to open up the notebook server in the correct > directory. > > 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/20140223/3c9968db/attachment.html> From moorepants at gmail.com Sun Feb 23 18:09:52 2014 From: moorepants at gmail.com (Jason Moore) Date: Sun, 23 Feb 2014 18:09:52 -0500 Subject: [IPython-dev] What's the easiest way to open an IPython Notebook server in a particular directory on Windows? In-Reply-To: <CAPhiW4juhCDZHvqfX8KnEhTe44qohY_WmxXEhLmMBVxr3aN5ig@mail.gmail.com> References: <CAP7f1AiiqJOCdb8HVreask9dOEPMtWBmq4M7CzLSdYvOk+WmUg@mail.gmail.com> <CAPhiW4juhCDZHvqfX8KnEhTe44qohY_WmxXEhLmMBVxr3aN5ig@mail.gmail.com> Message-ID: <CAP7f1AgwmCTvLBF+OtBp=aFMYNnSLN1ivAfvYOtKe8C8UYZbDg@mail.gmail.com> Thanks, I already have asked the Anaconda mailing list too. Just haven't gotten a response yet. Maybe I should just include the Windows shortcut in the directory full of notebooks. That would work. Jason moorepants.info +01 530-601-9791 On Sun, Feb 23, 2014 at 6:06 PM, Aron Ahmadia <aron at ahmadia.net> wrote: > It might be better to direct this question to the Anaconda mailing list > (cc'd). > > You could distribute a shortcut for them that does the right thing when > you're packaging your repository. If you come up with something better or > that works for you, please add it to the Software Carpentry "configuration > problems" Wiki > https://github.com/swcarpentry/bc/wiki/Configuration-Problems-and-Solutions > > Right now Software Carpentry instructors usually get around this by > teaching the command line *before* Git :) > > A > > > On Sun, Feb 23, 2014 at 6:00 PM, Jason Moore <moorepants at gmail.com>wrote: > >> The IPython Notebook shortcut installed by Anaconda defaults to opening >> in the "IPython Notebooks" directory. Is there an easier (point and click?) >> method to opening the server in another directory besides (1) open a CMD >> prompt and cd'ing to the directory or (2) changing the "start in" >> properties of the shortcut? >> >> I'm giving a tutorial to command line novices and was hoping for >> something very simple for them to open up the notebook server in the >> correct directory. >> >> 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/20140223/8f5de106/attachment.html> From filipe at kde.org Sun Feb 23 20:39:24 2014 From: filipe at kde.org (Filipe Saraiva) Date: Sun, 23 Feb 2014 22:39:24 -0300 Subject: [IPython-dev] Embedding IPython in C using Python/C API In-Reply-To: <CAHAreOrmCCUTWTAgwUPN6+Ou55tC7Pk4ZD+9AbNfgKGKmrW5eQ@mail.gmail.com> References: <530A6F0D.4060009@kde.org> <CAHAreOrmCCUTWTAgwUPN6+Ou55tC7Pk4ZD+9AbNfgKGKmrW5eQ@mail.gmail.com> Message-ID: <530AA2CC.5030104@kde.org> Thanks Fernando. Well, I would like to start the IPython terminal from a C code, and to use Python/C API to send the commands to processing in IPython, but when I start IPython the terminal don't receive the codes sent by PyRun_SimpleString. The code is here http://paste.kde.org/p8psqxtks, easy to understand. I am thinking in to start a IPython kernel and make the communication using the client-server model. But, before this solution, is there any function to IPython process a command from the python interpreter? Anything like this, in python interpreter: import IPython IPython.run(command_to_processing) ? Thanks; Em 23-02-2014 19:13, Fernando Perez escreveu: > You may want to look at the various high-level entry points here: > > http://docs.python.org/2/c-api/veryhigh.html > > It may be more convenient for you to put all the python code you'll > need in a file and use one of the file-oriented C API functions. > > But overall, you're on the right track: IPython has no pure C API, > only Python. So you'll need to use the functions to call Python source > code from inside CPython. > > Cheers > > f > > > On Sun, Feb 23, 2014 at 1:58 PM, Filipe Saraiva <filipe at kde.org > <mailto:filipe at kde.org>> wrote: > > Hello, > > I would like to develop an IPython backend for Cantor, a IDE from > KDE-edu project for several mathematical softwares like Python 2, > Scilab, Maxima, Octave, etc. You can see the Python 2 backend info in > http://blog.filipesaraiva.info/?p=1213. > > I searched for info on the web about the use of Python/C API and > IPython > but I can not find anything. I am thinking in to use > PyRun_SimpleString > to send commands to IPython and get the commands output using > stdout/stderr to show this outputs in C side. > > I will appreciate any reference to use of Python/C API in IPython. > > Thank you; > > -- > Filipe Saraiva > http://filipesaraiva.info/ > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org <mailto: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 -- Filipe Saraiva http://filipesaraiva.info/ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140223/33453fd4/attachment.html> From mmwoodman at gmail.com Mon Feb 24 04:30:59 2014 From: mmwoodman at gmail.com (Marmaduke Woodman) Date: Mon, 24 Feb 2014 10:30:59 +0100 Subject: [IPython-dev] Embedding IPython in C using Python/C API In-Reply-To: <530AA2CC.5030104@kde.org> References: <530A6F0D.4060009@kde.org> <CAHAreOrmCCUTWTAgwUPN6+Ou55tC7Pk4ZD+9AbNfgKGKmrW5eQ@mail.gmail.com> <530AA2CC.5030104@kde.org> Message-ID: <CAMqwjDaJ9uBPm09C7TwWvsBkny3OksYkBPgiEaLcSZBh--TJYw@mail.gmail.com> On Mon, Feb 24, 2014 at 2:39 AM, Filipe Saraiva <filipe at kde.org> wrote: > start the IPython terminal from a C code, and to use Python/C API to send > the commands to processing in IPython You might consider using Cython instead of writing against the C API directly. You can write and expose a "cpp" class in Cython that handles IPython interaction. Cython generates the C/C++ code to talk to Python as well as a header for class to use from C++. The big win is that you don't concern yourself with error handling and you can write the code almost entirely in Python. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140224/40fa1f1c/attachment.html> From dirk.haehnel at phys.uni-goettingen.de Mon Feb 24 13:07:37 2014 From: dirk.haehnel at phys.uni-goettingen.de (Haehnel, Dirk) Date: Mon, 24 Feb 2014 18:07:37 +0000 Subject: [IPython-dev] Ipython cluster Message-ID: <04E3948E063BBF4EB9C77E814A09513C2908BEBF@UM-EXCDAG-A03.um.gwdg.de> Hi all, I was trying to configure entought python distribution on my cluster which is a MS HPC Cluster. I followed the instruction but it won't work, my guess is that I failed with the config. files where you have to change the cluster url and so forth. If someone can send me an example configure file I would be happy. Thanks for your help with kind regards Dirk H?hnel Georg August University Faculty of Physics - Third Institute of Physics - Biophysics Room: F02.114 Friedrich Hund Platz 1 D-37077 G?ttingen Room: F02.114 Office: +495513922297 Lab: +495513913758 Mobil: +4917646199802 Fax: +49551397720 Email: dirk.haehnel at phys.uni-goettingen.de<mailto:dirk.haehnel at phys.uni-goettingen.de> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140224/6749fd2d/attachment.html> From takowl at gmail.com Mon Feb 24 14:19:56 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Mon, 24 Feb 2014 11:19:56 -0800 Subject: [IPython-dev] What's the easiest way to open an IPython Notebook server in a particular directory on Windows? In-Reply-To: <CAP7f1AiiqJOCdb8HVreask9dOEPMtWBmq4M7CzLSdYvOk+WmUg@mail.gmail.com> References: <CAP7f1AiiqJOCdb8HVreask9dOEPMtWBmq4M7CzLSdYvOk+WmUg@mail.gmail.com> Message-ID: <CAOvn4qi9EA=ZMdij1OSpCo6v2Km-ywv_4XcnNoWGc0pyybQhOg@mail.gmail.com> On 23 February 2014 15:00, Jason Moore <moorepants at gmail.com> wrote: > The IPython Notebook shortcut installed by Anaconda defaults to opening in > the "IPython Notebooks" directory. Is there an easier (point and click?) > method to opening the server in another directory besides (1) open a CMD > prompt and cd'ing to the directory or (2) changing the "start in" > properties of the shortcut? I noticed the other day that in examples/core/ we have a Windows shell extension to launch IPython in a given directory. You could tweak that to launch the notebook server, using the --notebook-dir flag to start in the given directory. Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140224/ca9acbab/attachment.html> From wes.turner at gmail.com Mon Feb 24 14:26:23 2014 From: wes.turner at gmail.com (Wes Turner) Date: Mon, 24 Feb 2014 13:26:23 -0600 Subject: [IPython-dev] What's the easiest way to open an IPython Notebook server in a particular directory on Windows? In-Reply-To: <CAOvn4qi9EA=ZMdij1OSpCo6v2Km-ywv_4XcnNoWGc0pyybQhOg@mail.gmail.com> References: <CAP7f1AiiqJOCdb8HVreask9dOEPMtWBmq4M7CzLSdYvOk+WmUg@mail.gmail.com> <CAOvn4qi9EA=ZMdij1OSpCo6v2Km-ywv_4XcnNoWGc0pyybQhOg@mail.gmail.com> Message-ID: <CACfEFw8yizoA2v3t9diFuRhy6rwhkygURAHogjiJWA+mFLY=jw@mail.gmail.com> https://stackoverflow.com/questions/15885132/file-folder-chooser-dialog-from-a-windows-batch-script On 2/24/14, Thomas Kluyver <takowl at gmail.com> wrote: > On 23 February 2014 15:00, Jason Moore <moorepants at gmail.com> wrote: > >> The IPython Notebook shortcut installed by Anaconda defaults to opening >> in >> the "IPython Notebooks" directory. Is there an easier (point and click?) >> method to opening the server in another directory besides (1) open a CMD >> prompt and cd'ing to the directory or (2) changing the "start in" >> properties of the shortcut? > > > I noticed the other day that in examples/core/ we have a Windows shell > extension to launch IPython in a given directory. You could tweak that to > launch the notebook server, using the --notebook-dir flag to start in the > given directory. > > Thomas > -- -- Wes Turner From rmatthewmerrifield at gmail.com Mon Feb 24 15:04:47 2014 From: rmatthewmerrifield at gmail.com (Matt Merrifield) Date: Mon, 24 Feb 2014 12:04:47 -0800 Subject: [IPython-dev] What's the easiest way to open an IPython Notebook server in a particular directory on Windows? In-Reply-To: <CAP7f1AgwmCTvLBF+OtBp=aFMYNnSLN1ivAfvYOtKe8C8UYZbDg@mail.gmail.com> References: <CAP7f1AiiqJOCdb8HVreask9dOEPMtWBmq4M7CzLSdYvOk+WmUg@mail.gmail.com> <CAPhiW4juhCDZHvqfX8KnEhTe44qohY_WmxXEhLmMBVxr3aN5ig@mail.gmail.com> <CAP7f1AgwmCTvLBF+OtBp=aFMYNnSLN1ivAfvYOtKe8C8UYZbDg@mail.gmail.com> Message-ID: <CAOORUGKFN5bFQFGVtGQx0N3jmvJccZjjWzJOSp9ScaoXcMW2QA@mail.gmail.com> I had this exact problem. I found two solutions that I liked: Batch Files ----------- Use batch file scripts! A batch file is, after all, just a terminal command that you run by double clicking it. My co-workers liked this method a lot better than opening a new command prompt, navigating to where they wanted to work, and then running the ipython notebook command. To make a batch file script that opens an ipython notebook in whatever directory it's run from: 1. Create a simple .txt file: Right Click -> New -> Text Document 2. Re-name it "Start IPython Notebook Here.bat" (don't forget to change the extension!) 3. Open it with notepad: Right Click on it -> Edit 4. Add the text "ipython notebook" to the file -- it should look just like you would type it in a command prompt. 5. Save & close. Now when you double click on the .bat file, a notebook server will spawn in that directory. You can move the .bat file to wherever you want your IPython notebook's working directory to be. You can make copies of the .bat file, and stash one in all the directories you frequently use. You can give a copy of the file to people that you're training, and they can just double-click and go. No need to teach them the command prompt. Registry Keys ------------- I work with the IPython notebooks daily in different directories all over my filesystem, so I got tired of copying the .bat script to every directory I worked in. I added an option to start a notebook in a directory to my right-click context menu by adding a few registry keys. This option is good for anyone who uses IPython frequently, doesn't mind an extra option in their right-click menu, and is comfortable editing their windows registry. You should be able to create a text document, copy in the text above, change the extension to .reg, and then run it(just once) to add the context menu entry. Put the following 5 lines in the file: Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shell\ipynb] @="Open IPython Notebook" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shell\ipynb\command] @="C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe ipython notebook" Once the registry key has been added, whenever you right-click in a folder (or on your desktop) you'll have the option to "Open IPython Notebook". Selecting that option will spawn a powershell instance, and call "ipython notebook" as if you'd typed it on the command line -- just like the batch file method, but without the extra file in the directory. Note: if you ever want to remove the registry keys, you'll have to open up regedit.exe and delete them manually. Some users might become frustrated with the extra option if they rarely use the notebook, and they might have trouble getting rid of it, so I wouldn't offer this option unless you know they will use it all the time. Another Note: Neither of these methods starts the notebook with the "--pylab inline" flag. You can get similar functionality with the "%pylab" or "%matplotlib inline" magics. Let me know if you have any questions. I'll do what I can to answer. -Matt On Sun, Feb 23, 2014 at 3:09 PM, Jason Moore <moorepants at gmail.com> wrote: > Thanks, I already have asked the Anaconda mailing list too. Just haven't > gotten a response yet. > > Maybe I should just include the Windows shortcut in the directory full of > notebooks. That would work. > > > Jason > moorepants.info > +01 530-601-9791 > > > On Sun, Feb 23, 2014 at 6:06 PM, Aron Ahmadia <aron at ahmadia.net> wrote: > >> It might be better to direct this question to the Anaconda mailing list >> (cc'd). >> >> You could distribute a shortcut for them that does the right thing when >> you're packaging your repository. If you come up with something better or >> that works for you, please add it to the Software Carpentry "configuration >> problems" Wiki >> https://github.com/swcarpentry/bc/wiki/Configuration-Problems-and-Solutions >> >> Right now Software Carpentry instructors usually get around this by >> teaching the command line *before* Git :) >> >> A >> >> >> On Sun, Feb 23, 2014 at 6:00 PM, Jason Moore <moorepants at gmail.com>wrote: >> >>> The IPython Notebook shortcut installed by Anaconda defaults to >>> opening in the "IPython Notebooks" directory. Is there an easier (point and >>> click?) method to opening the server in another directory besides (1) open >>> a CMD prompt and cd'ing to the directory or (2) changing the "start in" >>> properties of the shortcut? >>> >>> I'm giving a tutorial to command line novices and was hoping for >>> something very simple for them to open up the notebook server in the >>> correct directory. >>> >>> 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140224/c555a4dc/attachment.html> From aron at ahmadia.net Mon Feb 24 15:51:25 2014 From: aron at ahmadia.net (Aron Ahmadia) Date: Mon, 24 Feb 2014 15:51:25 -0500 Subject: [IPython-dev] [Anaconda Support] Re: What's the easiest way to open an IPython Notebook server in a particular directory on Windows? In-Reply-To: <CAOORUGKFN5bFQFGVtGQx0N3jmvJccZjjWzJOSp9ScaoXcMW2QA@mail.gmail.com> References: <CAP7f1AiiqJOCdb8HVreask9dOEPMtWBmq4M7CzLSdYvOk+WmUg@mail.gmail.com> <CAPhiW4juhCDZHvqfX8KnEhTe44qohY_WmxXEhLmMBVxr3aN5ig@mail.gmail.com> <CAP7f1AgwmCTvLBF+OtBp=aFMYNnSLN1ivAfvYOtKe8C8UYZbDg@mail.gmail.com> <CAOORUGKFN5bFQFGVtGQx0N3jmvJccZjjWzJOSp9ScaoXcMW2QA@mail.gmail.com> Message-ID: <CAPhiW4i7s+RhsTz9V_y+AUk-vT4+25xmbh3HaEMgBedg3wrcGw@mail.gmail.com> Awesome! Both of those are comprehensive solutions to the "not able to launch IPython in the right folder" problems. I think the first solution is actually a good candidate for inclusion in the Software Carpentry "Configuration Problems and Solutions" wiki page being maintained by Justin Kitzes over here: https://github.com/swcarpentry/bc/wiki/Configuration-Problems-and-Solutions Feel free to add your solution, and perhaps a link back to this discussion for how to set up registry keys. I'd even propose that the Anaconda developers add a context menu option for launching IPython Notebooks in Windows based on your advice. Cheers, Aron On Mon, Feb 24, 2014 at 3:04 PM, Matt Merrifield < rmatthewmerrifield at gmail.com> wrote: > I had this exact problem. I found two solutions that I liked: > > Batch Files > ----------- > > Use batch file scripts! A batch file is, after all, just a terminal > command that you run by double clicking it. My co-workers liked this > method a lot better than opening a new command prompt, navigating to where > they wanted to work, and then running the ipython notebook command. > > To make a batch file script that opens an ipython notebook in whatever > directory it's run from: > > 1. Create a simple .txt file: Right Click -> New -> Text Document > 2. Re-name it "Start IPython Notebook Here.bat" (don't forget to change > the extension!) > 3. Open it with notepad: Right Click on it -> Edit > 4. Add the text "ipython notebook" to the file -- it should look just like > you would type it in a command prompt. > 5. Save & close. > > Now when you double click on the .bat file, a notebook server will spawn > in that directory. You can move the .bat file to wherever you want your > IPython notebook's working directory to be. You can make copies of the .bat > file, and stash one in all the directories you frequently use. You can give > a copy of the file to people that you're training, and they can just > double-click and go. No need to teach them the command prompt. > > > Registry Keys > ------------- > > I work with the IPython notebooks daily in different directories all over > my filesystem, so I got tired of copying the .bat script to every directory > I worked in. I added an option to start a notebook in a directory to my > right-click context menu by adding a few registry keys. > > This option is good for anyone who uses IPython frequently, doesn't mind > an extra option in their right-click menu, and is comfortable editing their > windows registry. > > You should be able to create a text document, copy in the text above, > change the extension to .reg, and then run it(just once) to add the context > menu entry. Put the following 5 lines in the file: > > > Windows Registry Editor Version 5.00 > > [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shell\ipynb] > @="Open IPython Notebook" > > > [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shell\ipynb\command] > @="C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe ipython > notebook" > > > Once the registry key has been added, whenever you right-click in a folder > (or on your desktop) you'll have the option to "Open IPython Notebook". > Selecting that option will spawn a powershell instance, and call "ipython > notebook" as if you'd typed it on the command line -- just like the batch > file method, but without the extra file in the directory. > > Note: if you ever want to remove the registry keys, you'll have to open up > regedit.exe and delete them manually. Some users might become frustrated > with the extra option if they rarely use the notebook, and they might have > trouble getting rid of it, so I wouldn't offer this option unless you know > they will use it all the time. > > Another Note: Neither of these methods starts the notebook with the > "--pylab inline" flag. You can get similar functionality with the "%pylab" > or "%matplotlib inline" magics. > > Let me know if you have any questions. I'll do what I can to answer. > > -Matt > > > On Sun, Feb 23, 2014 at 3:09 PM, Jason Moore <moorepants at gmail.com> wrote: > >> Thanks, I already have asked the Anaconda mailing list too. Just haven't >> gotten a response yet. >> >> Maybe I should just include the Windows shortcut in the directory full of >> notebooks. That would work. >> >> >> Jason >> moorepants.info >> +01 530-601-9791 >> >> >> On Sun, Feb 23, 2014 at 6:06 PM, Aron Ahmadia <aron at ahmadia.net> wrote: >> >>> It might be better to direct this question to the Anaconda mailing list >>> (cc'd). >>> >>> You could distribute a shortcut for them that does the right thing when >>> you're packaging your repository. If you come up with something better or >>> that works for you, please add it to the Software Carpentry "configuration >>> problems" Wiki >>> https://github.com/swcarpentry/bc/wiki/Configuration-Problems-and-Solutions >>> >>> Right now Software Carpentry instructors usually get around this by >>> teaching the command line *before* Git :) >>> >>> A >>> >>> >>> On Sun, Feb 23, 2014 at 6:00 PM, Jason Moore <moorepants at gmail.com>wrote: >>> >>>> The IPython Notebook shortcut installed by Anaconda defaults to >>>> opening in the "IPython Notebooks" directory. Is there an easier (point and >>>> click?) method to opening the server in another directory besides (1) open >>>> a CMD prompt and cd'ing to the directory or (2) changing the "start in" >>>> properties of the shortcut? >>>> >>>> I'm giving a tutorial to command line novices and was hoping for >>>> something very simple for them to open up the notebook server in the >>>> correct directory. >>>> >>>> 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 >> > -- > Anaconda Community Support Group Brought to you by Continuum Analytics > --- > You received this message because you are subscribed to the Google Groups > "Anaconda - Public" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to anaconda+unsubscribe at continuum.io. > To post to this group, send email to anaconda at continuum.io. > Visit this group at > http://groups.google.com/a/continuum.io/group/anaconda/. > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140224/d98df951/attachment.html> From ian.h.bell at gmail.com Mon Feb 24 16:02:39 2014 From: ian.h.bell at gmail.com (Ian Bell) Date: Mon, 24 Feb 2014 22:02:39 +0100 Subject: [IPython-dev] [Anaconda Support] Re: What's the easiest way to open an IPython Notebook server in a particular directory on Windows? In-Reply-To: <CAPhiW4i7s+RhsTz9V_y+AUk-vT4+25xmbh3HaEMgBedg3wrcGw@mail.gmail.com> References: <CAP7f1AiiqJOCdb8HVreask9dOEPMtWBmq4M7CzLSdYvOk+WmUg@mail.gmail.com> <CAPhiW4juhCDZHvqfX8KnEhTe44qohY_WmxXEhLmMBVxr3aN5ig@mail.gmail.com> <CAP7f1AgwmCTvLBF+OtBp=aFMYNnSLN1ivAfvYOtKe8C8UYZbDg@mail.gmail.com> <CAOORUGKFN5bFQFGVtGQx0N3jmvJccZjjWzJOSp9ScaoXcMW2QA@mail.gmail.com> <CAPhiW4i7s+RhsTz9V_y+AUk-vT4+25xmbh3HaEMgBedg3wrcGw@mail.gmail.com> Message-ID: <CAJQnXJddPbrMnsZ2GZO60X34fmF5Cao-PsMFP9bGNSzkYamF5w@mail.gmail.com> Another even simpler possibility, one I use myself, is to make a batch file called ipython_nb.bat (or whatever you want), with contents "ipython notebook %1" (without the quotes). Then right click a .ipynb file and set the ipython_nb.bat file as the default file opener for ipynb files. Works a treat. You could add other command line parameter as well. Only mildly negative thing is that you can get quite a few command prompts scattered around from all the servers if you use this method regularly. Ian On Mon, Feb 24, 2014 at 9:51 PM, Aron Ahmadia <aron at ahmadia.net> wrote: > Awesome! Both of those are comprehensive solutions to the "not able to > launch IPython in the right folder" problems. I think the first solution > is actually a good candidate for inclusion in the Software Carpentry > "Configuration Problems and Solutions" wiki page being maintained by Justin > Kitzes over here: > https://github.com/swcarpentry/bc/wiki/Configuration-Problems-and-Solutions > > Feel free to add your solution, and perhaps a link back to this discussion > for how to set up registry keys. I'd even propose that the Anaconda > developers add a context menu option for launching IPython Notebooks in > Windows based on your advice. > > Cheers, > Aron > > > On Mon, Feb 24, 2014 at 3:04 PM, Matt Merrifield < > rmatthewmerrifield at gmail.com> wrote: > >> I had this exact problem. I found two solutions that I liked: >> >> Batch Files >> ----------- >> >> Use batch file scripts! A batch file is, after all, just a terminal >> command that you run by double clicking it. My co-workers liked this >> method a lot better than opening a new command prompt, navigating to where >> they wanted to work, and then running the ipython notebook command. >> >> To make a batch file script that opens an ipython notebook in whatever >> directory it's run from: >> >> 1. Create a simple .txt file: Right Click -> New -> Text Document >> 2. Re-name it "Start IPython Notebook Here.bat" (don't forget to change >> the extension!) >> 3. Open it with notepad: Right Click on it -> Edit >> 4. Add the text "ipython notebook" to the file -- it should look just >> like you would type it in a command prompt. >> 5. Save & close. >> >> Now when you double click on the .bat file, a notebook server will spawn >> in that directory. You can move the .bat file to wherever you want your >> IPython notebook's working directory to be. You can make copies of the .bat >> file, and stash one in all the directories you frequently use. You can give >> a copy of the file to people that you're training, and they can just >> double-click and go. No need to teach them the command prompt. >> >> >> Registry Keys >> ------------- >> >> I work with the IPython notebooks daily in different directories all over >> my filesystem, so I got tired of copying the .bat script to every directory >> I worked in. I added an option to start a notebook in a directory to my >> right-click context menu by adding a few registry keys. >> >> This option is good for anyone who uses IPython frequently, doesn't mind >> an extra option in their right-click menu, and is comfortable editing their >> windows registry. >> >> You should be able to create a text document, copy in the text above, >> change the extension to .reg, and then run it(just once) to add the context >> menu entry. Put the following 5 lines in the file: >> >> >> Windows Registry Editor Version 5.00 >> >> [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shell\ipynb] >> @="Open IPython Notebook" >> >> >> [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shell\ipynb\command] >> @="C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe ipython >> notebook" >> >> >> Once the registry key has been added, whenever you right-click in a >> folder (or on your desktop) you'll have the option to "Open IPython >> Notebook". Selecting that option will spawn a powershell instance, and call >> "ipython notebook" as if you'd typed it on the command line -- just like >> the batch file method, but without the extra file in the directory. >> >> Note: if you ever want to remove the registry keys, you'll have to open >> up regedit.exe and delete them manually. Some users might become frustrated >> with the extra option if they rarely use the notebook, and they might have >> trouble getting rid of it, so I wouldn't offer this option unless you know >> they will use it all the time. >> >> Another Note: Neither of these methods starts the notebook with the >> "--pylab inline" flag. You can get similar functionality with the "%pylab" >> or "%matplotlib inline" magics. >> >> Let me know if you have any questions. I'll do what I can to answer. >> >> -Matt >> >> >> On Sun, Feb 23, 2014 at 3:09 PM, Jason Moore <moorepants at gmail.com>wrote: >> >>> Thanks, I already have asked the Anaconda mailing list too. Just haven't >>> gotten a response yet. >>> >>> Maybe I should just include the Windows shortcut in the directory full >>> of notebooks. That would work. >>> >>> >>> Jason >>> moorepants.info >>> +01 530-601-9791 >>> >>> >>> On Sun, Feb 23, 2014 at 6:06 PM, Aron Ahmadia <aron at ahmadia.net> wrote: >>> >>>> It might be better to direct this question to the Anaconda mailing list >>>> (cc'd). >>>> >>>> You could distribute a shortcut for them that does the right thing when >>>> you're packaging your repository. If you come up with something better or >>>> that works for you, please add it to the Software Carpentry "configuration >>>> problems" Wiki >>>> https://github.com/swcarpentry/bc/wiki/Configuration-Problems-and-Solutions >>>> >>>> Right now Software Carpentry instructors usually get around this by >>>> teaching the command line *before* Git :) >>>> >>>> A >>>> >>>> >>>> On Sun, Feb 23, 2014 at 6:00 PM, Jason Moore <moorepants at gmail.com>wrote: >>>> >>>>> The IPython Notebook shortcut installed by Anaconda defaults to >>>>> opening in the "IPython Notebooks" directory. Is there an easier (point and >>>>> click?) method to opening the server in another directory besides (1) open >>>>> a CMD prompt and cd'ing to the directory or (2) changing the "start in" >>>>> properties of the shortcut? >>>>> >>>>> I'm giving a tutorial to command line novices and was hoping for >>>>> something very simple for them to open up the notebook server in the >>>>> correct directory. >>>>> >>>>> 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 >>> >> -- >> Anaconda Community Support Group Brought to you by Continuum Analytics >> --- >> You received this message because you are subscribed to the Google Groups >> "Anaconda - Public" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to anaconda+unsubscribe at continuum.io. >> To post to this group, send email to anaconda at continuum.io. >> Visit this group at >> http://groups.google.com/a/continuum.io/group/anaconda/. >> > > > _______________________________________________ > 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/20140224/5f14e3f7/attachment.html> From rmatthewmerrifield at gmail.com Mon Feb 24 16:55:53 2014 From: rmatthewmerrifield at gmail.com (Matt Merrifield) Date: Mon, 24 Feb 2014 13:55:53 -0800 Subject: [IPython-dev] [Anaconda Support] Re: What's the easiest way to open an IPython Notebook server in a particular directory on Windows? In-Reply-To: <CAJQnXJddPbrMnsZ2GZO60X34fmF5Cao-PsMFP9bGNSzkYamF5w@mail.gmail.com> References: <CAP7f1AiiqJOCdb8HVreask9dOEPMtWBmq4M7CzLSdYvOk+WmUg@mail.gmail.com> <CAPhiW4juhCDZHvqfX8KnEhTe44qohY_WmxXEhLmMBVxr3aN5ig@mail.gmail.com> <CAP7f1AgwmCTvLBF+OtBp=aFMYNnSLN1ivAfvYOtKe8C8UYZbDg@mail.gmail.com> <CAOORUGKFN5bFQFGVtGQx0N3jmvJccZjjWzJOSp9ScaoXcMW2QA@mail.gmail.com> <CAPhiW4i7s+RhsTz9V_y+AUk-vT4+25xmbh3HaEMgBedg3wrcGw@mail.gmail.com> <CAJQnXJddPbrMnsZ2GZO60X34fmF5Cao-PsMFP9bGNSzkYamF5w@mail.gmail.com> Message-ID: <CAOORUG+W0MT=KXpgKMbmZO8_cCTWXMc_nktqMCTNEoDPdUYFjA@mail.gmail.com> Clever! Very simple and useful. I like it! Personally, I set up .ipynb files to be opened by nbconvert when clicked (done with another registry key). So when I double-click on any .ipynb file, it generates a fresh .html render that I can e-mail to the rest of my team, even the ones who don't use IPython. The contents of the key to associate nbconvert with .ipynb : Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\.ipynb\shell\nbconvert\command] @="C:\\Windows\\system32\\cmd.exe /K ipython nbconvert \"%1\"" This one took some trial-and-error to get right -- windows shell scripting is not my strong suit -- so somebody may have a better way to do this. Regardless, I've found the nbconvert functionality to be really useful. Perhaps the anaconda team could add a few things to the .ipynb file-extension context menu? Ideally the default behavior would be something like Ian's solution, to open the notebook. Ideally, it would open in the current kernel (to avoid the multitude of command prompt windows). A secondary option available through a right-click to run nbconvert on the notebook would be really useful too. On Mon, Feb 24, 2014 at 1:02 PM, Ian Bell <ian.h.bell at gmail.com> wrote: > Another even simpler possibility, one I use myself, is to make a batch > file called ipython_nb.bat (or whatever you want), with contents "ipython > notebook %1" (without the quotes). Then right click a .ipynb file and set > the ipython_nb.bat file as the default file opener for ipynb files. Works > a treat. You could add other command line parameter as well. Only mildly > negative thing is that you can get quite a few command prompts scattered > around from all the servers if you use this method regularly. > > Ian > > > > > On Mon, Feb 24, 2014 at 9:51 PM, Aron Ahmadia <aron at ahmadia.net> wrote: > >> Awesome! Both of those are comprehensive solutions to the "not able to >> launch IPython in the right folder" problems. I think the first solution >> is actually a good candidate for inclusion in the Software Carpentry >> "Configuration Problems and Solutions" wiki page being maintained by Justin >> Kitzes over here: >> https://github.com/swcarpentry/bc/wiki/Configuration-Problems-and-Solutions >> >> Feel free to add your solution, and perhaps a link back to this >> discussion for how to set up registry keys. I'd even propose that the >> Anaconda developers add a context menu option for launching IPython >> Notebooks in Windows based on your advice. >> >> Cheers, >> Aron >> >> >> On Mon, Feb 24, 2014 at 3:04 PM, Matt Merrifield < >> rmatthewmerrifield at gmail.com> wrote: >> >>> I had this exact problem. I found two solutions that I liked: >>> >>> Batch Files >>> ----------- >>> >>> Use batch file scripts! A batch file is, after all, just a terminal >>> command that you run by double clicking it. My co-workers liked this >>> method a lot better than opening a new command prompt, navigating to where >>> they wanted to work, and then running the ipython notebook command. >>> >>> To make a batch file script that opens an ipython notebook in whatever >>> directory it's run from: >>> >>> 1. Create a simple .txt file: Right Click -> New -> Text Document >>> 2. Re-name it "Start IPython Notebook Here.bat" (don't forget to change >>> the extension!) >>> 3. Open it with notepad: Right Click on it -> Edit >>> 4. Add the text "ipython notebook" to the file -- it should look just >>> like you would type it in a command prompt. >>> 5. Save & close. >>> >>> Now when you double click on the .bat file, a notebook server will spawn >>> in that directory. You can move the .bat file to wherever you want your >>> IPython notebook's working directory to be. You can make copies of the .bat >>> file, and stash one in all the directories you frequently use. You can give >>> a copy of the file to people that you're training, and they can just >>> double-click and go. No need to teach them the command prompt. >>> >>> >>> Registry Keys >>> ------------- >>> >>> I work with the IPython notebooks daily in different directories all >>> over my filesystem, so I got tired of copying the .bat script to every >>> directory I worked in. I added an option to start a notebook in a directory >>> to my right-click context menu by adding a few registry keys. >>> >>> This option is good for anyone who uses IPython frequently, doesn't mind >>> an extra option in their right-click menu, and is comfortable editing their >>> windows registry. >>> >>> You should be able to create a text document, copy in the text above, >>> change the extension to .reg, and then run it(just once) to add the context >>> menu entry. Put the following 5 lines in the file: >>> >>> >>> Windows Registry Editor Version 5.00 >>> >>> [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shell\ipynb] >>> @="Open IPython Notebook" >>> >>> >>> [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shell\ipynb\command] >>> @="C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe >>> ipython notebook" >>> >>> >>> Once the registry key has been added, whenever you right-click in a >>> folder (or on your desktop) you'll have the option to "Open IPython >>> Notebook". Selecting that option will spawn a powershell instance, and call >>> "ipython notebook" as if you'd typed it on the command line -- just like >>> the batch file method, but without the extra file in the directory. >>> >>> Note: if you ever want to remove the registry keys, you'll have to open >>> up regedit.exe and delete them manually. Some users might become frustrated >>> with the extra option if they rarely use the notebook, and they might have >>> trouble getting rid of it, so I wouldn't offer this option unless you know >>> they will use it all the time. >>> >>> Another Note: Neither of these methods starts the notebook with the >>> "--pylab inline" flag. You can get similar functionality with the "%pylab" >>> or "%matplotlib inline" magics. >>> >>> Let me know if you have any questions. I'll do what I can to answer. >>> >>> -Matt >>> >>> >>> On Sun, Feb 23, 2014 at 3:09 PM, Jason Moore <moorepants at gmail.com>wrote: >>> >>>> Thanks, I already have asked the Anaconda mailing list too. Just >>>> haven't gotten a response yet. >>>> >>>> Maybe I should just include the Windows shortcut in the directory full >>>> of notebooks. That would work. >>>> >>>> >>>> Jason >>>> moorepants.info >>>> +01 530-601-9791 >>>> >>>> >>>> On Sun, Feb 23, 2014 at 6:06 PM, Aron Ahmadia <aron at ahmadia.net> wrote: >>>> >>>>> It might be better to direct this question to the Anaconda mailing >>>>> list (cc'd). >>>>> >>>>> You could distribute a shortcut for them that does the right thing >>>>> when you're packaging your repository. If you come up with something >>>>> better or that works for you, please add it to the Software Carpentry >>>>> "configuration problems" Wiki >>>>> https://github.com/swcarpentry/bc/wiki/Configuration-Problems-and-Solutions >>>>> >>>>> Right now Software Carpentry instructors usually get around this by >>>>> teaching the command line *before* Git :) >>>>> >>>>> A >>>>> >>>>> >>>>> On Sun, Feb 23, 2014 at 6:00 PM, Jason Moore <moorepants at gmail.com>wrote: >>>>> >>>>>> The IPython Notebook shortcut installed by Anaconda defaults to >>>>>> opening in the "IPython Notebooks" directory. Is there an easier (point and >>>>>> click?) method to opening the server in another directory besides (1) open >>>>>> a CMD prompt and cd'ing to the directory or (2) changing the "start in" >>>>>> properties of the shortcut? >>>>>> >>>>>> I'm giving a tutorial to command line novices and was hoping for >>>>>> something very simple for them to open up the notebook server in the >>>>>> correct directory. >>>>>> >>>>>> 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 >>>> >>> -- >>> Anaconda Community Support Group Brought to you by Continuum Analytics >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "Anaconda - Public" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to anaconda+unsubscribe at continuum.io. >>> To post to this group, send email to anaconda at continuum.io. >>> Visit this group at >>> http://groups.google.com/a/continuum.io/group/anaconda/. >>> >> >> >> _______________________________________________ >> 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/20140224/55997b5b/attachment.html> From benjaminrk at gmail.com Mon Feb 24 17:22:01 2014 From: benjaminrk at gmail.com (MinRK) Date: Mon, 24 Feb 2014 14:22:01 -0800 Subject: [IPython-dev] [ANN] IPython 1.2.1 Message-ID: <CAHNn8BX8NJK+OvSkvjZ0BL=69_V21gBGJP8Lf9NDY-MW9VpBvA@mail.gmail.com> Minor bugfix release, with fixes mainly for compatibility with Python 2.6 and 3.4. http://archive.ipython.org/release/1.2.1/ http://ipython.org/ipython-doc/1/whatsnew/github-stats-1.0.html#issues-closed-in-1-2 -MinRK -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140224/a9652bff/attachment.html> From moorepants at gmail.com Mon Feb 24 18:20:01 2014 From: moorepants at gmail.com (Jason Moore) Date: Mon, 24 Feb 2014 18:20:01 -0500 Subject: [IPython-dev] [Anaconda Support] Re: What's the easiest way to open an IPython Notebook server in a particular directory on Windows? In-Reply-To: <CAOORUG+W0MT=KXpgKMbmZO8_cCTWXMc_nktqMCTNEoDPdUYFjA@mail.gmail.com> References: <CAP7f1AiiqJOCdb8HVreask9dOEPMtWBmq4M7CzLSdYvOk+WmUg@mail.gmail.com> <CAPhiW4juhCDZHvqfX8KnEhTe44qohY_WmxXEhLmMBVxr3aN5ig@mail.gmail.com> <CAP7f1AgwmCTvLBF+OtBp=aFMYNnSLN1ivAfvYOtKe8C8UYZbDg@mail.gmail.com> <CAOORUGKFN5bFQFGVtGQx0N3jmvJccZjjWzJOSp9ScaoXcMW2QA@mail.gmail.com> <CAPhiW4i7s+RhsTz9V_y+AUk-vT4+25xmbh3HaEMgBedg3wrcGw@mail.gmail.com> <CAJQnXJddPbrMnsZ2GZO60X34fmF5Cao-PsMFP9bGNSzkYamF5w@mail.gmail.com> <CAOORUG+W0MT=KXpgKMbmZO8_cCTWXMc_nktqMCTNEoDPdUYFjA@mail.gmail.com> Message-ID: <CAP7f1Ah8Qqk1iGbedE4bUfDeYTjPsgHP8afYSyX_meQgcQcj0g@mail.gmail.com> Thanks for all the great suggestions. I'll try out the `.bat` method as soon as I get back to a Windows machine. Jason moorepants.info +01 530-601-9791 On Mon, Feb 24, 2014 at 4:55 PM, Matt Merrifield < rmatthewmerrifield at gmail.com> wrote: > Clever! Very simple and useful. I like it! > > Personally, I set up .ipynb files to be opened by nbconvert when clicked > (done with another registry key). So when I double-click on any .ipynb > file, it generates a fresh .html render that I can e-mail to the rest of my > team, even the ones who don't use IPython. > > The contents of the key to associate nbconvert with .ipynb : > > Windows Registry Editor Version 5.00 > > [HKEY_CLASSES_ROOT\.ipynb\shell\nbconvert\command] > @="C:\\Windows\\system32\\cmd.exe /K ipython nbconvert \"%1\"" > > > This one took some trial-and-error to get right -- windows shell scripting > is not my strong suit -- so somebody may have a better way to do this. > Regardless, I've found the nbconvert functionality to be really useful. > > Perhaps the anaconda team could add a few things to the .ipynb > file-extension context menu? Ideally the default behavior would be > something like Ian's solution, to open the notebook. Ideally, it would open > in the current kernel (to avoid the multitude of command prompt windows). A > secondary option available through a right-click to run nbconvert on the > notebook would be really useful too. > > > On Mon, Feb 24, 2014 at 1:02 PM, Ian Bell <ian.h.bell at gmail.com> wrote: > >> Another even simpler possibility, one I use myself, is to make a batch >> file called ipython_nb.bat (or whatever you want), with contents "ipython >> notebook %1" (without the quotes). Then right click a .ipynb file and set >> the ipython_nb.bat file as the default file opener for ipynb files. Works >> a treat. You could add other command line parameter as well. Only mildly >> negative thing is that you can get quite a few command prompts scattered >> around from all the servers if you use this method regularly. >> >> Ian >> >> >> >> >> On Mon, Feb 24, 2014 at 9:51 PM, Aron Ahmadia <aron at ahmadia.net> wrote: >> >>> Awesome! Both of those are comprehensive solutions to the "not able to >>> launch IPython in the right folder" problems. I think the first solution >>> is actually a good candidate for inclusion in the Software Carpentry >>> "Configuration Problems and Solutions" wiki page being maintained by Justin >>> Kitzes over here: >>> https://github.com/swcarpentry/bc/wiki/Configuration-Problems-and-Solutions >>> >>> Feel free to add your solution, and perhaps a link back to this >>> discussion for how to set up registry keys. I'd even propose that the >>> Anaconda developers add a context menu option for launching IPython >>> Notebooks in Windows based on your advice. >>> >>> Cheers, >>> Aron >>> >>> >>> On Mon, Feb 24, 2014 at 3:04 PM, Matt Merrifield < >>> rmatthewmerrifield at gmail.com> wrote: >>> >>>> I had this exact problem. I found two solutions that I liked: >>>> >>>> Batch Files >>>> ----------- >>>> >>>> Use batch file scripts! A batch file is, after all, just a terminal >>>> command that you run by double clicking it. My co-workers liked this >>>> method a lot better than opening a new command prompt, navigating to where >>>> they wanted to work, and then running the ipython notebook command. >>>> >>>> To make a batch file script that opens an ipython notebook in whatever >>>> directory it's run from: >>>> >>>> 1. Create a simple .txt file: Right Click -> New -> Text Document >>>> 2. Re-name it "Start IPython Notebook Here.bat" (don't forget to change >>>> the extension!) >>>> 3. Open it with notepad: Right Click on it -> Edit >>>> 4. Add the text "ipython notebook" to the file -- it should look just >>>> like you would type it in a command prompt. >>>> 5. Save & close. >>>> >>>> Now when you double click on the .bat file, a notebook server will >>>> spawn in that directory. You can move the .bat file to wherever you want >>>> your IPython notebook's working directory to be. You can make copies of the >>>> .bat file, and stash one in all the directories you frequently use. You can >>>> give a copy of the file to people that you're training, and they can just >>>> double-click and go. No need to teach them the command prompt. >>>> >>>> >>>> Registry Keys >>>> ------------- >>>> >>>> I work with the IPython notebooks daily in different directories all >>>> over my filesystem, so I got tired of copying the .bat script to every >>>> directory I worked in. I added an option to start a notebook in a directory >>>> to my right-click context menu by adding a few registry keys. >>>> >>>> This option is good for anyone who uses IPython frequently, doesn't >>>> mind an extra option in their right-click menu, and is comfortable editing >>>> their windows registry. >>>> >>>> You should be able to create a text document, copy in the text above, >>>> change the extension to .reg, and then run it(just once) to add the context >>>> menu entry. Put the following 5 lines in the file: >>>> >>>> >>>> Windows Registry Editor Version 5.00 >>>> >>>> [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shell\ipynb] >>>> @="Open IPython Notebook" >>>> >>>> >>>> [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shell\ipynb\command] >>>> @="C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe >>>> ipython notebook" >>>> >>>> >>>> Once the registry key has been added, whenever you right-click in a >>>> folder (or on your desktop) you'll have the option to "Open IPython >>>> Notebook". Selecting that option will spawn a powershell instance, and call >>>> "ipython notebook" as if you'd typed it on the command line -- just like >>>> the batch file method, but without the extra file in the directory. >>>> >>>> Note: if you ever want to remove the registry keys, you'll have to open >>>> up regedit.exe and delete them manually. Some users might become frustrated >>>> with the extra option if they rarely use the notebook, and they might have >>>> trouble getting rid of it, so I wouldn't offer this option unless you know >>>> they will use it all the time. >>>> >>>> Another Note: Neither of these methods starts the notebook with the >>>> "--pylab inline" flag. You can get similar functionality with the "%pylab" >>>> or "%matplotlib inline" magics. >>>> >>>> Let me know if you have any questions. I'll do what I can to answer. >>>> >>>> -Matt >>>> >>>> >>>> On Sun, Feb 23, 2014 at 3:09 PM, Jason Moore <moorepants at gmail.com>wrote: >>>> >>>>> Thanks, I already have asked the Anaconda mailing list too. Just >>>>> haven't gotten a response yet. >>>>> >>>>> Maybe I should just include the Windows shortcut in the directory full >>>>> of notebooks. That would work. >>>>> >>>>> >>>>> Jason >>>>> moorepants.info >>>>> +01 530-601-9791 >>>>> >>>>> >>>>> On Sun, Feb 23, 2014 at 6:06 PM, Aron Ahmadia <aron at ahmadia.net>wrote: >>>>> >>>>>> It might be better to direct this question to the Anaconda mailing >>>>>> list (cc'd). >>>>>> >>>>>> You could distribute a shortcut for them that does the right thing >>>>>> when you're packaging your repository. If you come up with something >>>>>> better or that works for you, please add it to the Software Carpentry >>>>>> "configuration problems" Wiki >>>>>> https://github.com/swcarpentry/bc/wiki/Configuration-Problems-and-Solutions >>>>>> >>>>>> Right now Software Carpentry instructors usually get around this by >>>>>> teaching the command line *before* Git :) >>>>>> >>>>>> A >>>>>> >>>>>> >>>>>> On Sun, Feb 23, 2014 at 6:00 PM, Jason Moore <moorepants at gmail.com>wrote: >>>>>> >>>>>>> The IPython Notebook shortcut installed by Anaconda defaults to >>>>>>> opening in the "IPython Notebooks" directory. Is there an easier (point and >>>>>>> click?) method to opening the server in another directory besides (1) open >>>>>>> a CMD prompt and cd'ing to the directory or (2) changing the "start in" >>>>>>> properties of the shortcut? >>>>>>> >>>>>>> I'm giving a tutorial to command line novices and was hoping for >>>>>>> something very simple for them to open up the notebook server in the >>>>>>> correct directory. >>>>>>> >>>>>>> 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 >>>>> >>>> -- >>>> Anaconda Community Support Group Brought to you by Continuum Analytics >>>> --- >>>> You received this message because you are subscribed to the Google >>>> Groups "Anaconda - Public" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to anaconda+unsubscribe at continuum.io. >>>> To post to this group, send email to anaconda at continuum.io. >>>> Visit this group at >>>> http://groups.google.com/a/continuum.io/group/anaconda/. >>>> >>> >>> >>> _______________________________________________ >>> 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/20140224/a0349118/attachment.html> From ian.h.bell at gmail.com Mon Feb 24 18:46:13 2014 From: ian.h.bell at gmail.com (Ian Bell) Date: Tue, 25 Feb 2014 00:46:13 +0100 Subject: [IPython-dev] Random crashes when doing conversion In-Reply-To: <CAJQnXJeTNF=qMCUtMOtvr_RPaRk-hG5F-gSbBxdQ_5LhDr=aUA@mail.gmail.com> References: <CAJQnXJeL19fwJ0AvccYM7c=3cygCqqLGMk1mti6z99U+TXn+pg@mail.gmail.com> <CAH4pYpTA2EwLw2Sg5PjpkXev5x42EzNzqaNu=aqnRRGnCHyVrQ@mail.gmail.com> <CAJQnXJeTNF=qMCUtMOtvr_RPaRk-hG5F-gSbBxdQ_5LhDr=aUA@mail.gmail.com> Message-ID: <CAJQnXJc0PPy94qEaPLBderuvtE5+EswOneqOxsUyK+uxYV5dXQ@mail.gmail.com> So one workaround is to go into jsonutil.py and comment out the if m: branch so that it reads: def parse_date(s): """parse an ISO8601 date string If it is None or not a valid ISO8601 timestamp, it will be returned unmodified. Otherwise, it will return a datetime object. """ if s is None: return s m = ISO8601_PAT.match(s) # if m: # # FIXME: add actual timezone support # # this just drops the timezone info # notz = m.groups()[0] # return datetime.strptime(notz, ISO8601) return s It's a hack, but I was getting warnings like File "C:\Python27\lib\site-packages\ipython-2.0.0_dev-py2.7.egg\IPython\utils\jsonutil.py", line 79, in parse_date return datetime.strptime(notz, ISO8601) AttributeError: _strptime which is weird because strptime is getting called, not _strptime. In any case, commenting out this block does allow my compilation to run. I wonder if my datetime is out of date. This should ideally fail in a more elegant way though. On Sun, Feb 23, 2014 at 4:08 AM, Ian Bell <ian.h.bell at gmail.com> wrote: > Will do, here's an example of one that fails: > https://github.com/ibell/coolprop/blob/master/Web/FluidTemplate.ipynb > > > On Sun, Feb 23, 2014 at 3:53 AM, Brian Granger <ellisonbg at gmail.com>wrote: > >> I am guessing that this is problem with runipy, not IPython, so you >> might follow up with the runipy developer. But to help all debug this, >> can you share one of the notebooks that has this problem? >> >> On Sat, Feb 22, 2014 at 8:50 AM, Ian Bell <ian.h.bell at gmail.com> wrote: >> > I am using the most excellent runipy script to generate HTML >> documentation >> > from a large set of dynamically generated notebooks. More on that theme >> > soon! >> > >> > I am getting random crashes (not repeatable) along the lines of that >> shown >> > below. I can't seem to see any pattern. I'll convert a few files, then >> > this error. Or sometimes I can convert ~10 files, and then it crashes. >> I >> > have 114 notebooks to convert, so just converting 10 isn't quite >> cutting it >> > >> > Ian >> > >> > Traceback (most recent call last): >> > File "C:\Python27\lib\site-packages\zmq\eventloop\zmqstream.py", line >> 401, >> > in _run_callback >> > callback(*args, **kwargs) >> > File >> > >> "C:\Python27\lib\site-packages\zmq\eventloop\minitornado\stack_context.py", >> > line 241, in wrapped >> > callback(*args, **kwargs) >> > File >> > >> "C:\Python27\lib\site-packages\ipython-2.0.0_dev-py2.7.egg\IPython\kernel\channels.py", >> > line 170, in _handle_recv >> > self.call_handlers(self.session.unserialize(smsg)) >> > File >> > >> "C:\Python27\lib\site-packages\ipython-2.0.0_dev-py2.7.egg\IPython\kernel\zmq\session.py", >> > line 822, in unserialize >> > message['header'] = extract_dates(header) >> > File >> > >> "C:\Python27\lib\site-packages\ipython-2.0.0_dev-py2.7.egg\IPython\utils\jsonutil.py", >> > line 87, in extract_dates >> > new_obj[k] = extract_dates(v) >> > File >> > >> "C:\Python27\lib\site-packages\ipython-2.0.0_dev-py2.7.egg\IPython\utils\jsonutil.py", >> > line 92, in extract_dates >> > obj = parse_date(obj) >> > File >> > >> "C:\Python27\lib\site-packages\ipython-2.0.0_dev-py2.7.egg\IPython\utils\jsonutil.py", >> > line 79, in parse_date >> > return datetime.strptime(notz, ISO8601) >> > AttributeError: _strptime >> > >> > >> > _______________________________________________ >> > 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/20140225/511ab25f/attachment.html> From fperez.net at gmail.com Mon Feb 24 19:58:27 2014 From: fperez.net at gmail.com (Fernando Perez) Date: Mon, 24 Feb 2014 16:58:27 -0800 Subject: [IPython-dev] [ANN] IPython 1.2.1 In-Reply-To: <CAHNn8BX8NJK+OvSkvjZ0BL=69_V21gBGJP8Lf9NDY-MW9VpBvA@mail.gmail.com> References: <CAHNn8BX8NJK+OvSkvjZ0BL=69_V21gBGJP8Lf9NDY-MW9VpBvA@mail.gmail.com> Message-ID: <CAHAreOoXo6WqC-O6POUqe8cQGi9d0Qf5DAa-=_56EbBcXT7FaQ@mail.gmail.com> Thanks guys, for keeping a solid backport release process. This is really important for users on stable/controlled environments who may not want to, or be allowed to, upgrade directly to the latest master or new version. Cheers f On Mon, Feb 24, 2014 at 2:22 PM, MinRK <benjaminrk at gmail.com> wrote: > Minor bugfix release, with fixes mainly for compatibility with Python 2.6 > and 3.4. > > http://archive.ipython.org/release/1.2.1/ > > > http://ipython.org/ipython-doc/1/whatsnew/github-stats-1.0.html#issues-closed-in-1-2 > > -MinRK > > _______________________________________________ > 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/20140224/d47a0303/attachment.html> From asmeurer at gmail.com Mon Feb 24 20:25:05 2014 From: asmeurer at gmail.com (Aaron Meurer) Date: Mon, 24 Feb 2014 19:25:05 -0600 Subject: [IPython-dev] [Anaconda Support] Re: What's the easiest way to open an IPython Notebook server in a particular directory on Windows? In-Reply-To: <CAP7f1Ah8Qqk1iGbedE4bUfDeYTjPsgHP8afYSyX_meQgcQcj0g@mail.gmail.com> References: <CAP7f1AiiqJOCdb8HVreask9dOEPMtWBmq4M7CzLSdYvOk+WmUg@mail.gmail.com> <CAPhiW4juhCDZHvqfX8KnEhTe44qohY_WmxXEhLmMBVxr3aN5ig@mail.gmail.com> <CAP7f1AgwmCTvLBF+OtBp=aFMYNnSLN1ivAfvYOtKe8C8UYZbDg@mail.gmail.com> <CAOORUGKFN5bFQFGVtGQx0N3jmvJccZjjWzJOSp9ScaoXcMW2QA@mail.gmail.com> <CAPhiW4i7s+RhsTz9V_y+AUk-vT4+25xmbh3HaEMgBedg3wrcGw@mail.gmail.com> <CAJQnXJddPbrMnsZ2GZO60X34fmF5Cao-PsMFP9bGNSzkYamF5w@mail.gmail.com> <CAOORUG+W0MT=KXpgKMbmZO8_cCTWXMc_nktqMCTNEoDPdUYFjA@mail.gmail.com> <CAP7f1Ah8Qqk1iGbedE4bUfDeYTjPsgHP8afYSyX_meQgcQcj0g@mail.gmail.com> Message-ID: <CAKgW=6L2_bG23RL5c-KZriSi0J3gPDPjwHKSQ-NT8UsPF57Ekw@mail.gmail.com> Regarding Anaconda, my understanding was that implementing this functionality was put on the back burner because the new file chooser in IPython 2.0 would render it unnecessary. The IPython devs might comment if that's really the case. Aaron Meurer On Mon, Feb 24, 2014 at 5:20 PM, Jason Moore <moorepants at gmail.com> wrote: > Thanks for all the great suggestions. I'll try out the `.bat` method as soon > as I get back to a Windows machine. > > > Jason > moorepants.info > +01 530-601-9791 > > > On Mon, Feb 24, 2014 at 4:55 PM, Matt Merrifield > <rmatthewmerrifield at gmail.com> wrote: >> >> Clever! Very simple and useful. I like it! >> >> Personally, I set up .ipynb files to be opened by nbconvert when clicked >> (done with another registry key). So when I double-click on any .ipynb file, >> it generates a fresh .html render that I can e-mail to the rest of my team, >> even the ones who don't use IPython. >> >> The contents of the key to associate nbconvert with .ipynb : >> >> Windows Registry Editor Version 5.00 >> >> [HKEY_CLASSES_ROOT\.ipynb\shell\nbconvert\command] >> @="C:\\Windows\\system32\\cmd.exe /K ipython nbconvert \"%1\"" >> >> >> This one took some trial-and-error to get right -- windows shell scripting >> is not my strong suit -- so somebody may have a better way to do this. >> Regardless, I've found the nbconvert functionality to be really useful. >> >> Perhaps the anaconda team could add a few things to the .ipynb >> file-extension context menu? Ideally the default behavior would be something >> like Ian's solution, to open the notebook. Ideally, it would open in the >> current kernel (to avoid the multitude of command prompt windows). A >> secondary option available through a right-click to run nbconvert on the >> notebook would be really useful too. >> >> >> On Mon, Feb 24, 2014 at 1:02 PM, Ian Bell <ian.h.bell at gmail.com> wrote: >>> >>> Another even simpler possibility, one I use myself, is to make a batch >>> file called ipython_nb.bat (or whatever you want), with contents "ipython >>> notebook %1" (without the quotes). Then right click a .ipynb file and set >>> the ipython_nb.bat file as the default file opener for ipynb files. Works a >>> treat. You could add other command line parameter as well. Only mildly >>> negative thing is that you can get quite a few command prompts scattered >>> around from all the servers if you use this method regularly. >>> >>> Ian >>> >>> >>> >>> >>> On Mon, Feb 24, 2014 at 9:51 PM, Aron Ahmadia <aron at ahmadia.net> wrote: >>>> >>>> Awesome! Both of those are comprehensive solutions to the "not able to >>>> launch IPython in the right folder" problems. I think the first solution is >>>> actually a good candidate for inclusion in the Software Carpentry >>>> "Configuration Problems and Solutions" wiki page being maintained by Justin >>>> Kitzes over here: >>>> https://github.com/swcarpentry/bc/wiki/Configuration-Problems-and-Solutions >>>> >>>> Feel free to add your solution, and perhaps a link back to this >>>> discussion for how to set up registry keys. I'd even propose that the >>>> Anaconda developers add a context menu option for launching IPython >>>> Notebooks in Windows based on your advice. >>>> >>>> Cheers, >>>> Aron >>>> >>>> >>>> On Mon, Feb 24, 2014 at 3:04 PM, Matt Merrifield >>>> <rmatthewmerrifield at gmail.com> wrote: >>>>> >>>>> I had this exact problem. I found two solutions that I liked: >>>>> >>>>> Batch Files >>>>> ----------- >>>>> >>>>> Use batch file scripts! A batch file is, after all, just a terminal >>>>> command that you run by double clicking it. My co-workers liked this method >>>>> a lot better than opening a new command prompt, navigating to where they >>>>> wanted to work, and then running the ipython notebook command. >>>>> >>>>> To make a batch file script that opens an ipython notebook in whatever >>>>> directory it's run from: >>>>> >>>>> 1. Create a simple .txt file: Right Click -> New -> Text Document >>>>> 2. Re-name it "Start IPython Notebook Here.bat" (don't forget to change >>>>> the extension!) >>>>> 3. Open it with notepad: Right Click on it -> Edit >>>>> 4. Add the text "ipython notebook" to the file -- it should look just >>>>> like you would type it in a command prompt. >>>>> 5. Save & close. >>>>> >>>>> Now when you double click on the .bat file, a notebook server will >>>>> spawn in that directory. You can move the .bat file to wherever you want >>>>> your IPython notebook's working directory to be. You can make copies of the >>>>> .bat file, and stash one in all the directories you frequently use. You can >>>>> give a copy of the file to people that you're training, and they can just >>>>> double-click and go. No need to teach them the command prompt. >>>>> >>>>> >>>>> Registry Keys >>>>> ------------- >>>>> >>>>> I work with the IPython notebooks daily in different directories all >>>>> over my filesystem, so I got tired of copying the .bat script to every >>>>> directory I worked in. I added an option to start a notebook in a directory >>>>> to my right-click context menu by adding a few registry keys. >>>>> >>>>> This option is good for anyone who uses IPython frequently, doesn't >>>>> mind an extra option in their right-click menu, and is comfortable editing >>>>> their windows registry. >>>>> >>>>> You should be able to create a text document, copy in the text above, >>>>> change the extension to .reg, and then run it(just once) to add the context >>>>> menu entry. Put the following 5 lines in the file: >>>>> >>>>> >>>>> Windows Registry Editor Version 5.00 >>>>> >>>>> [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shell\ipynb] >>>>> @="Open IPython Notebook" >>>>> >>>>> >>>>> [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shell\ipynb\command] >>>>> @="C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe >>>>> ipython notebook" >>>>> >>>>> >>>>> Once the registry key has been added, whenever you right-click in a >>>>> folder (or on your desktop) you'll have the option to "Open IPython >>>>> Notebook". Selecting that option will spawn a powershell instance, and call >>>>> "ipython notebook" as if you'd typed it on the command line -- just like the >>>>> batch file method, but without the extra file in the directory. >>>>> >>>>> Note: if you ever want to remove the registry keys, you'll have to open >>>>> up regedit.exe and delete them manually. Some users might become frustrated >>>>> with the extra option if they rarely use the notebook, and they might have >>>>> trouble getting rid of it, so I wouldn't offer this option unless you know >>>>> they will use it all the time. >>>>> >>>>> Another Note: Neither of these methods starts the notebook with the >>>>> "--pylab inline" flag. You can get similar functionality with the "%pylab" >>>>> or "%matplotlib inline" magics. >>>>> >>>>> Let me know if you have any questions. I'll do what I can to answer. >>>>> >>>>> -Matt >>>>> >>>>> >>>>> On Sun, Feb 23, 2014 at 3:09 PM, Jason Moore <moorepants at gmail.com> >>>>> wrote: >>>>>> >>>>>> Thanks, I already have asked the Anaconda mailing list too. Just >>>>>> haven't gotten a response yet. >>>>>> >>>>>> Maybe I should just include the Windows shortcut in the directory full >>>>>> of notebooks. That would work. >>>>>> >>>>>> >>>>>> Jason >>>>>> moorepants.info >>>>>> +01 530-601-9791 >>>>>> >>>>>> >>>>>> On Sun, Feb 23, 2014 at 6:06 PM, Aron Ahmadia <aron at ahmadia.net> >>>>>> wrote: >>>>>>> >>>>>>> It might be better to direct this question to the Anaconda mailing >>>>>>> list (cc'd). >>>>>>> >>>>>>> You could distribute a shortcut for them that does the right thing >>>>>>> when you're packaging your repository. If you come up with something better >>>>>>> or that works for you, please add it to the Software Carpentry >>>>>>> "configuration problems" Wiki >>>>>>> https://github.com/swcarpentry/bc/wiki/Configuration-Problems-and-Solutions >>>>>>> >>>>>>> Right now Software Carpentry instructors usually get around this by >>>>>>> teaching the command line *before* Git :) >>>>>>> >>>>>>> A >>>>>>> >>>>>>> >>>>>>> On Sun, Feb 23, 2014 at 6:00 PM, Jason Moore <moorepants at gmail.com> >>>>>>> wrote: >>>>>>>> >>>>>>>> The IPython Notebook shortcut installed by Anaconda defaults to >>>>>>>> opening in the "IPython Notebooks" directory. Is there an easier (point and >>>>>>>> click?) method to opening the server in another directory besides (1) open a >>>>>>>> CMD prompt and cd'ing to the directory or (2) changing the "start in" >>>>>>>> properties of the shortcut? >>>>>>>> >>>>>>>> I'm giving a tutorial to command line novices and was hoping for >>>>>>>> something very simple for them to open up the notebook server in the correct >>>>>>>> directory. >>>>>>>> >>>>>>>> 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 >>>>> >>>>> -- >>>>> Anaconda Community Support Group Brought to you by Continuum Analytics >>>>> --- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "Anaconda - Public" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to anaconda+unsubscribe at continuum.io. >>>>> To post to this group, send email to anaconda at continuum.io. >>>>> Visit this group at >>>>> http://groups.google.com/a/continuum.io/group/anaconda/. >>>> >>>> >>>> >>>> _______________________________________________ >>>> 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 srinath.vadlamani at gmail.com Mon Feb 24 23:42:47 2014 From: srinath.vadlamani at gmail.com (srinath22) Date: Mon, 24 Feb 2014 20:42:47 -0800 (PST) Subject: [IPython-dev] Want to do ssh connection to multiple remote machines from ipython notebook Message-ID: <1393303367206-5048610.post@n6.nabble.com> I have seen this functionality where a local ipython notebook uses an ssh tunnel to connect to a selection of remote machines via a dropdown menu like <http://python.6.x6.nabble.com/file/n5048610/Screen_Shot_2014-02-24_at_9.41.01_PM.png> hopefully using ssh keys. Can someone point me in the right direction? I think paramiko is involved. -- View this message in context: http://python.6.x6.nabble.com/Want-to-do-ssh-connection-to-multiple-remote-machines-from-ipython-notebook-tp5048610.html Sent from the IPython - Development mailing list archive at Nabble.com. From petef4+usenet at gmail.com Tue Feb 25 03:55:57 2014 From: petef4+usenet at gmail.com (Pete Forman) Date: Tue, 25 Feb 2014 08:55:57 +0000 Subject: [IPython-dev] [ANN] IPython 1.2.1 References: <CAHNn8BX8NJK+OvSkvjZ0BL=69_V21gBGJP8Lf9NDY-MW9VpBvA@mail.gmail.com> Message-ID: <86r46rwoyq.fsf@gmail.com> MinRK <benjaminrk at gmail.com> writes: > Minor bugfix release, with fixes mainly for compatibility with Python 2.6 > and 3.4. > > http://archive.ipython.org/release/1.2.1/ > > http://ipython.org/ipython-doc/1/whatsnew/github-stats-1.0.html#issues-closed-in-1-2 > It's been a while since IPython releases were announced on python-announce-list.python.org. -- Pete Forman From claresloggett at gmail.com Tue Feb 25 07:35:15 2014 From: claresloggett at gmail.com (Clare Sloggett) Date: Tue, 25 Feb 2014 23:35:15 +1100 Subject: [IPython-dev] Using the IPython API to configure profiles Message-ID: <CAETqNqFQcPKm_98j7P8tZ1-tg0B5qNRpXG1oXsQEgPj9s9YsJw@mail.gmail.com> Hi all, I'm new to this list so please let me know if it's not a good right place for this question, etc. I'm wondering if it's possible to use the IPython API to generate ipython profile configuration files, and if so, where I can find some guidance on doing this. The motivation is: I'm using python to automate some setup of ipython notebook. I can use python to call the shell with "ipython profile create nbserver" and then to edit the resulting ipython_config.py file. However since I'm in python already, this seems roundabout - is it possible to just use the IPython API directly to do these things? I've found the API reference at http://ipython.org/ipython-doc/stable/api/index.html . I haven't found any tutorials or guides on using the IPython API, so I'm just hunting through the reference, and maybe this is why I'm having trouble working out the right way to approach this task. Is creating an ipython profile, and configuring it, a sensible thing to do using the API, and if so, can anyone give me some pointers? So far I have found a way (maybe not the best way?) to create a new profile directory using IPython.core.profiledir.ProfileDir.create_profile_dir_by_name(), but I haven't discovered any good way to handle configuration. Thanks in advance! Clare -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140225/4b9f37b4/attachment.html> From doug.blank at gmail.com Tue Feb 25 07:55:01 2014 From: doug.blank at gmail.com (Doug Blank) Date: Tue, 25 Feb 2014 07:55:01 -0500 Subject: [IPython-dev] Using the IPython API to configure profiles In-Reply-To: <CAETqNqFQcPKm_98j7P8tZ1-tg0B5qNRpXG1oXsQEgPj9s9YsJw@mail.gmail.com> References: <CAETqNqFQcPKm_98j7P8tZ1-tg0B5qNRpXG1oXsQEgPj9s9YsJw@mail.gmail.com> Message-ID: <CAAusYCjqpdA7kxZTy5xJB_2DzPjUn_3=kLhw6R3JbXPUuEu0jw@mail.gmail.com> On Tue, Feb 25, 2014 at 7:35 AM, Clare Sloggett <claresloggett at gmail.com>wrote: > Hi all, > > I'm new to this list so please let me know if it's not a good right place > for this question, etc. > > I'm wondering if it's possible to use the IPython API to generate ipython > profile configuration files, and if so, where I can find some guidance on > doing this. > > The motivation is: I'm using python to automate some setup of ipython > notebook. I can use python to call the shell with "ipython profile create > nbserver" and then to edit the resulting ipython_config.py file. However > since I'm in python already, this seems roundabout - is it possible to just > use the IPython API directly to do these things? > > I've found the API reference at > http://ipython.org/ipython-doc/stable/api/index.html . > > I haven't found any tutorials or guides on using the IPython API, so I'm > just hunting through the reference, and maybe this is why I'm having > trouble working out the right way to approach this task. Is creating an > ipython profile, and configuring it, a sensible thing to do using the API, > and if so, can anyone give me some pointers? > > So far I have found a way (maybe not the best way?) to create a new > profile directory > using IPython.core.profiledir.ProfileDir.create_profile_dir_by_name(), but > I haven't discovered any good way to handle configuration. > > Thanks in advance! > As a new user of IPython, I can't answer your question. But we just did this same task with our non-Python, external kernel. Here is what we are doing: we added a flag to our program (calico --create-profile) that will create an IPython profile. The main iprofile_config.py only needed a couple of options (c.KernelManager.kernel_cmd) and so we create that file directly. We also recursively copy from a setup directory to the ($ipython locate)/profile_calico/ directory, so that if we ever want to have custom files, we can just drop them into our setup directory, and they'll get copied over when you --create-profile. -Doug > > Clare > > > > _______________________________________________ > 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/20140225/6c7fb368/attachment.html> From bussonniermatthias at gmail.com Tue Feb 25 08:27:23 2014 From: bussonniermatthias at gmail.com (Matthias BUSSONNIER) Date: Tue, 25 Feb 2014 14:27:23 +0100 Subject: [IPython-dev] Using the IPython API to configure profiles In-Reply-To: <CAAusYCjqpdA7kxZTy5xJB_2DzPjUn_3=kLhw6R3JbXPUuEu0jw@mail.gmail.com> References: <CAETqNqFQcPKm_98j7P8tZ1-tg0B5qNRpXG1oXsQEgPj9s9YsJw@mail.gmail.com> <CAAusYCjqpdA7kxZTy5xJB_2DzPjUn_3=kLhw6R3JbXPUuEu0jw@mail.gmail.com> Message-ID: <E5EA67A1-C0FA-4925-8796-CB22F4575E4E@gmail.com> Hi, Le 25 f?vr. 2014 ? 13:55, Doug Blank a ?crit : > On Tue, Feb 25, 2014 at 7:35 AM, Clare Sloggett <claresloggett at gmail.com> wrote: > Hi all, > > I'm new to this list so please let me know if it's not a good right place for this question, etc. > > I'm wondering if it's possible to use the IPython API to generate ipython profile configuration files, and if so, where I can find some guidance on doing this. > > The motivation is: I'm using python to automate some setup of ipython notebook. I can use python to call the shell with "ipython profile create nbserver" and then to edit the resulting ipython_config.py file. However since I'm in python already, this seems roundabout - is it possible to just use the IPython API directly to do these things? > > I've found the API reference at http://ipython.org/ipython-doc/stable/api/index.html . > > I haven't found any tutorials or guides on using the IPython API, so I'm just hunting through the reference, and maybe this is why I'm having trouble working out the right way to approach this task. Is creating an ipython profile, and configuring it, a sensible thing to do using the API, and if so, can anyone give me some pointers? > > So far I have found a way (maybe not the best way?) to create a new profile directory using IPython.core.profiledir.ProfileDir.create_profile_dir_by_name(), but I haven't discovered any good way to handle configuration. > > Thanks in advance! > > As a new user of IPython, I can't answer your question. But we just did this same task with our non-Python, external kernel. Here is what we are doing: we added a flag to our program (calico --create-profile) that will create an IPython profile. The main iprofile_config.py only needed a couple of options (c.KernelManager.kernel_cmd) and so we create that file directly. We also recursively copy from a setup directory to the ($ipython locate)/profile_calico/ directory, so that if we ever want to have custom files, we can just drop them into our setup directory, and they'll get copied over when you --create-profile. We are working on that. IPython 2.0 will allow you to create config file in json which will be easier to modify for non-python app and/or to automatize. Right now the logic loop through all the possible configurable is not pretty and use print in lots of places (like for --help-all). So we could refactor it, but this will most-likely be for 3.0 or later. We plan on having a API to edit config at some point, but it is not in motion yet. -- M -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140225/973bcbc2/attachment.html> From doug.blank at gmail.com Tue Feb 25 08:45:09 2014 From: doug.blank at gmail.com (Doug Blank) Date: Tue, 25 Feb 2014 08:45:09 -0500 Subject: [IPython-dev] Python code to Notebook? Message-ID: <CAAusYChWs_iMyo3Ki-NMM67PbCTcdOF0R6y8KrRLg9PbmQGhyw@mail.gmail.com> Is there a project that converts python code to a notebook? I have some simple code [1] that just wraps the code in a cell, and signs it, but I could image lots of useful options: breaking up into cells (based on indentation), turning comment blocks into markdown sells, special conversion commands in comments, etc. I have a large number of example files that it would be handy to automate the conversion and end up with useful notebooks for further editing and demonstrations. This could also be handy for a generic "Save as Notebook" option in Python editors. It could even allow .py files (or other languages) to appear in the notebook file listings, and allow automatic conversion to a notebook on selection (at least when talking to a kernel server). Thanks for any pointers, -Doug [1] - https://bitbucket.org/ipre/calico/src/master/notebooks/code2notebook.py -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140225/a6285618/attachment.html> From bussonniermatthias at gmail.com Tue Feb 25 09:30:05 2014 From: bussonniermatthias at gmail.com (Matthias BUSSONNIER) Date: Tue, 25 Feb 2014 15:30:05 +0100 Subject: [IPython-dev] Python code to Notebook? In-Reply-To: <CAAusYChWs_iMyo3Ki-NMM67PbCTcdOF0R6y8KrRLg9PbmQGhyw@mail.gmail.com> References: <CAAusYChWs_iMyo3Ki-NMM67PbCTcdOF0R6y8KrRLg9PbmQGhyw@mail.gmail.com> Message-ID: <F4579D19-426E-4EF4-AFF5-8C8220C4EE67@gmail.com> Le 25 f?vr. 2014 ? 14:45, Doug Blank a ?crit : > Is there a project that converts python code to a notebook? I have some simple code [1] that just wraps the code in a cell, and signs it, but I could image lots of useful options: breaking up into cells (based on indentation), turning comment blocks into markdown sells, special conversion commands in comments, etc. https://github.com/mattpap/scala_school_notebooks/blob/master/xipynb and you can already drop .py file on python dashboard. -- M > > I have a large number of example files that it would be handy to automate the conversion and end up with useful notebooks for further editing and demonstrations. This could also be handy for a generic "Save as Notebook" option in Python editors. > > It could even allow .py files (or other languages) to appear in the notebook file listings, and allow automatic conversion to a notebook on selection (at least when talking to a kernel server). > > Thanks for any pointers, > > -Doug > > [1] - https://bitbucket.org/ipre/calico/src/master/notebooks/code2notebook.py > _______________________________________________ > 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/20140225/7719dcdf/attachment.html> From doug.blank at gmail.com Tue Feb 25 09:40:41 2014 From: doug.blank at gmail.com (Doug Blank) Date: Tue, 25 Feb 2014 09:40:41 -0500 Subject: [IPython-dev] Python code to Notebook? In-Reply-To: <F4579D19-426E-4EF4-AFF5-8C8220C4EE67@gmail.com> References: <CAAusYChWs_iMyo3Ki-NMM67PbCTcdOF0R6y8KrRLg9PbmQGhyw@mail.gmail.com> <F4579D19-426E-4EF4-AFF5-8C8220C4EE67@gmail.com> Message-ID: <CAAusYCgxgiaGMwfWxdz1cK_r1w-V7+ENjn8yPb77PJLdn4r=ig@mail.gmail.com> On Tue, Feb 25, 2014 at 9:30 AM, Matthias BUSSONNIER < bussonniermatthias at gmail.com> wrote: > > Le 25 f?vr. 2014 ? 14:45, Doug Blank a ?crit : > > Is there a project that converts python code to a notebook? I have some > simple code [1] that just wraps the code in a cell, and signs it, but I > could image lots of useful options: breaking up into cells (based on > indentation), turning comment blocks into markdown sells, special > conversion commands in comments, etc. > > > https://github.com/mattpap/scala_school_notebooks/blob/master/xipynb > Thanks; that has a couple of interesting ideas. > > and you can already drop .py file on python dashboard. > Ah, you mean that you can drop .py into a cell? I did not know that, and is useful! But looking for some automation. Thanks! -Doug > > -- > M > > > I have a large number of example files that it would be handy to automate > the conversion and end up with useful notebooks for further editing and > demonstrations. This could also be handy for a generic "Save as Notebook" > option in Python editors. > > It could even allow .py files (or other languages) to appear in the > notebook file listings, and allow automatic conversion to a notebook on > selection (at least when talking to a kernel server). > > Thanks for any pointers, > > -Doug > > [1] - > https://bitbucket.org/ipre/calico/src/master/notebooks/code2notebook.py > _______________________________________________ > 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/20140225/680170dd/attachment.html> From bussonniermatthias at gmail.com Tue Feb 25 10:44:03 2014 From: bussonniermatthias at gmail.com (Matthias BUSSONNIER) Date: Tue, 25 Feb 2014 16:44:03 +0100 Subject: [IPython-dev] Python code to Notebook? In-Reply-To: <CAAusYCgxgiaGMwfWxdz1cK_r1w-V7+ENjn8yPb77PJLdn4r=ig@mail.gmail.com> References: <CAAusYChWs_iMyo3Ki-NMM67PbCTcdOF0R6y8KrRLg9PbmQGhyw@mail.gmail.com> <F4579D19-426E-4EF4-AFF5-8C8220C4EE67@gmail.com> <CAAusYCgxgiaGMwfWxdz1cK_r1w-V7+ENjn8yPb77PJLdn4r=ig@mail.gmail.com> Message-ID: <CC26F3B7-2BB2-4B08-BD2E-1FA17A578233@gmail.com> Le 25 f?vr. 2014 ? 15:40, Doug Blank a ?crit : > On Tue, Feb 25, 2014 at 9:30 AM, Matthias BUSSONNIER <bussonniermatthias at gmail.com> wrote: > > Le 25 f?vr. 2014 ? 14:45, Doug Blank a ?crit : > >> Is there a project that converts python code to a notebook? I have some simple code [1] that just wraps the code in a cell, and signs it, but I could image lots of useful options: breaking up into cells (based on indentation), turning comment blocks into markdown sells, special conversion commands in comments, etc. > > https://github.com/mattpap/scala_school_notebooks/blob/master/xipynb > > Thanks; that has a couple of interesting ideas. > > > and you can already drop .py file on python dashboard. > > Ah, you mean that you can drop .py into a cell? I did not know that, and is useful! But looking for some automation. > > Thanks! No, I was meaning dashboard, but apparently the functionality was removed. -- M -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140225/f0eabe78/attachment.html> From damianavila at gmail.com Tue Feb 25 11:45:39 2014 From: damianavila at gmail.com (=?ISO-8859-1?Q?Dami=E1n_Avila?=) Date: Tue, 25 Feb 2014 13:45:39 -0300 Subject: [IPython-dev] Python code to Notebook? In-Reply-To: <CC26F3B7-2BB2-4B08-BD2E-1FA17A578233@gmail.com> References: <CAAusYChWs_iMyo3Ki-NMM67PbCTcdOF0R6y8KrRLg9PbmQGhyw@mail.gmail.com> <F4579D19-426E-4EF4-AFF5-8C8220C4EE67@gmail.com> <CAAusYCgxgiaGMwfWxdz1cK_r1w-V7+ENjn8yPb77PJLdn4r=ig@mail.gmail.com> <CC26F3B7-2BB2-4B08-BD2E-1FA17A578233@gmail.com> Message-ID: <CAH+mRR2wvvSyvLScmFH_jQG3-WXvEzx-O9soq1a_hjgQ3g=5Rw@mail.gmail.com> Yep, https://github.com/ipython/ipython/commit/bb3f39dbb9dd17a21338a06572dfdee8a8adc619 2014-02-25 12:44 GMT-03:00 Matthias BUSSONNIER <bussonniermatthias at gmail.com >: > > Le 25 f?vr. 2014 ? 15:40, Doug Blank a ?crit : > > On Tue, Feb 25, 2014 at 9:30 AM, Matthias BUSSONNIER < > bussonniermatthias at gmail.com> wrote: > >> >> Le 25 f?vr. 2014 ? 14:45, Doug Blank a ?crit : >> >> Is there a project that converts python code to a notebook? I have some >> simple code [1] that just wraps the code in a cell, and signs it, but I >> could image lots of useful options: breaking up into cells (based on >> indentation), turning comment blocks into markdown sells, special >> conversion commands in comments, etc. >> >> >> https://github.com/mattpap/scala_school_notebooks/blob/master/xipynb >> > > Thanks; that has a couple of interesting ideas. > > >> >> and you can already drop .py file on python dashboard. >> > > Ah, you mean that you can drop .py into a cell? I did not know that, and > is useful! But looking for some automation. > > Thanks! > > > > No, I was meaning dashboard, but apparently the functionality was removed. > > -- > M > > > > _______________________________________________ > 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/20140225/ca89c250/attachment.html> From jason-sage at creativetrax.com Tue Feb 25 13:30:33 2014 From: jason-sage at creativetrax.com (Jason Grout) Date: Tue, 25 Feb 2014 12:30:33 -0600 Subject: [IPython-dev] Camera widget Message-ID: <530CE149.5000502@creativetrax.com> For your enjoyment, here's a basic camera widget that allows you to snap pictures and then process them. The user-level part of the code is: c=Camera() display(c) # snap picture %matplotlib inline from skimage import io, filter, color io.imshow(filter.roberts(color.rgb2gray(c.image))) It could easily be extended to grab video and audio as well: http://nbviewer.ipython.org/gist/jasongrout/9210458 You can also see a tweaked version here: http://sagecell.sagemath.org/?q=htlcsf (you'll probably have to allow the browser to use your camera...) Thanks, Jason From ellisonbg at gmail.com Tue Feb 25 13:59:40 2014 From: ellisonbg at gmail.com (Brian Granger) Date: Tue, 25 Feb 2014 10:59:40 -0800 Subject: [IPython-dev] Camera widget In-Reply-To: <530CE149.5000502@creativetrax.com> References: <530CE149.5000502@creativetrax.com> Message-ID: <CAH4pYpRqYo5t10JEA61w_u=DPEyWs5mb8HQa669c731-USiHNw@mail.gmail.com> :) On Tue, Feb 25, 2014 at 10:30 AM, Jason Grout <jason-sage at creativetrax.com> wrote: > For your enjoyment, here's a basic camera widget that allows you to snap > pictures and then process them. > > The user-level part of the code is: > > c=Camera() > display(c) > > # snap picture > > %matplotlib inline > from skimage import io, filter, color > io.imshow(filter.roberts(color.rgb2gray(c.image))) > > > It could easily be extended to grab video and audio as well: > > http://nbviewer.ipython.org/gist/jasongrout/9210458 > > You can also see a tweaked version here: > > http://sagecell.sagemath.org/?q=htlcsf > > (you'll probably have to allow the browser to use your camera...) > > 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 fperez.net at gmail.com Tue Feb 25 13:59:53 2014 From: fperez.net at gmail.com (Fernando Perez) Date: Tue, 25 Feb 2014 10:59:53 -0800 Subject: [IPython-dev] [ANN] IPython 1.2.1 In-Reply-To: <86r46rwoyq.fsf@gmail.com> References: <CAHNn8BX8NJK+OvSkvjZ0BL=69_V21gBGJP8Lf9NDY-MW9VpBvA@mail.gmail.com> <86r46rwoyq.fsf@gmail.com> Message-ID: <CAHAreOrQ9ZM125rfXhmTC5c8w80wOb5GjzachS-g2BBzrG9oZA@mail.gmail.com> On Tue, Feb 25, 2014 at 12:55 AM, Pete Forman <petef4+usenet at gmail.com>wrote: > > It's been a while since IPython releases were announced on > python-announce-list.python.org True! If anyone (you?) is willing to help us with that role, we'd greatly appreciate it! f -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140225/3a70fe77/attachment.html> From fperez.net at gmail.com Tue Feb 25 13:59:53 2014 From: fperez.net at gmail.com (Fernando Perez) Date: Tue, 25 Feb 2014 10:59:53 -0800 Subject: [IPython-dev] [ANN] IPython 1.2.1 In-Reply-To: <86r46rwoyq.fsf@gmail.com> References: <CAHNn8BX8NJK+OvSkvjZ0BL=69_V21gBGJP8Lf9NDY-MW9VpBvA@mail.gmail.com> <86r46rwoyq.fsf@gmail.com> Message-ID: <CAHAreOrQ9ZM125rfXhmTC5c8w80wOb5GjzachS-g2BBzrG9oZA@mail.gmail.com> On Tue, Feb 25, 2014 at 12:55 AM, Pete Forman <petef4+usenet at gmail.com>wrote: > > It's been a while since IPython releases were announced on > python-announce-list.python.org True! If anyone (you?) is willing to help us with that role, we'd greatly appreciate it! f -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140225/3a70fe77/attachment-0001.html> From fperez.net at gmail.com Tue Feb 25 15:05:41 2014 From: fperez.net at gmail.com (Fernando Perez) Date: Tue, 25 Feb 2014 12:05:41 -0800 Subject: [IPython-dev] Camera widget In-Reply-To: <530CE149.5000502@creativetrax.com> References: <530CE149.5000502@creativetrax.com> Message-ID: <CAHAreOrmwYRFSxH2JF+iv=TKm2RFk3OhA0HbH4YeoFfizwKXsw@mail.gmail.com> Very cool. I know you watched Wolfram's video, great job ;) I was actually wondering how much code it would take to do it in IPython. Thanks for reading my mind and acting on it!! f On Tue, Feb 25, 2014 at 10:30 AM, Jason Grout <jason-sage at creativetrax.com>wrote: > For your enjoyment, here's a basic camera widget that allows you to snap > pictures and then process them. > > The user-level part of the code is: > > c=Camera() > display(c) > > # snap picture > > %matplotlib inline > from skimage import io, filter, color > io.imshow(filter.roberts(color.rgb2gray(c.image))) > > > It could easily be extended to grab video and audio as well: > > http://nbviewer.ipython.org/gist/jasongrout/9210458 > > You can also see a tweaked version here: > > http://sagecell.sagemath.org/?q=htlcsf > > (you'll probably have to allow the browser to use your camera...) > > Thanks, > > Jason > _______________________________________________ > 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/20140225/a5d71968/attachment.html> From takowl at gmail.com Tue Feb 25 16:45:41 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Tue, 25 Feb 2014 13:45:41 -0800 Subject: [IPython-dev] running notebook from command line In-Reply-To: <CAHzsXVVUBBfQUa-pjwVJH+CmmsN_SoHbQrZ7zbeNWXg1VKHpww@mail.gmail.com> References: <CAHzsXVVUBBfQUa-pjwVJH+CmmsN_SoHbQrZ7zbeNWXg1VKHpww@mail.gmail.com> Message-ID: <CAOvn4qgnMUxM5fz-7R_0cDGJqKCy6MQbPHCz6xy8DE+GQBi6rA@mail.gmail.com> >From within IPython, you can now run a notebook with: %run foo.ipynb I don't believe there's any neat way of doing it from a system shell, though. Thomas On 21 February 2014 05:58, Aaron O'Leary <aaron.oleary at gmail.com> wrote: > Hi, > > Is it possible to run the notebook non interactively? > > This was asked on StackOverflow a few months ago: > > http://stackoverflow.com/questions/17905350/ > > Outside of ipython there is [runipy], which does what I need, > but some switch on ipython itself would be nice. > > [runipy]: https://github.com/paulgb/runipy > > Cheers, > Aaron > _______________________________________________ > 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/20140225/6f9797ec/attachment.html> From fperez.net at gmail.com Tue Feb 25 16:49:10 2014 From: fperez.net at gmail.com (Fernando Perez) Date: Tue, 25 Feb 2014 13:49:10 -0800 Subject: [IPython-dev] running notebook from command line In-Reply-To: <CAOvn4qgnMUxM5fz-7R_0cDGJqKCy6MQbPHCz6xy8DE+GQBi6rA@mail.gmail.com> References: <CAHzsXVVUBBfQUa-pjwVJH+CmmsN_SoHbQrZ7zbeNWXg1VKHpww@mail.gmail.com> <CAOvn4qgnMUxM5fz-7R_0cDGJqKCy6MQbPHCz6xy8DE+GQBi6rA@mail.gmail.com> Message-ID: <CAHAreOpe1ZgCjJ7DEyQ-KrbG7fxgL2NhjTJ0upbdhAdj31wg1A@mail.gmail.com> On Tue, Feb 25, 2014 at 1:45 PM, Thomas Kluyver <takowl at gmail.com> wrote: > From within IPython, you can now run a notebook with: %run foo.ipynb > > I don't believe there's any neat way of doing it from a system shell, > though. > There is: alpamayo[~]> ipython -c "%run foo.ipynb" this is a notebook! ['/home/fperez/usr/bin/ipython', '-c', '%run foo.ipynb'] Cheers f -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140225/0165788a/attachment.html> From damianavila at gmail.com Tue Feb 25 16:49:46 2014 From: damianavila at gmail.com (=?ISO-8859-1?Q?Dami=E1n_Avila?=) Date: Tue, 25 Feb 2014 18:49:46 -0300 Subject: [IPython-dev] running notebook from command line In-Reply-To: <CAOvn4qgnMUxM5fz-7R_0cDGJqKCy6MQbPHCz6xy8DE+GQBi6rA@mail.gmail.com> References: <CAHzsXVVUBBfQUa-pjwVJH+CmmsN_SoHbQrZ7zbeNWXg1VKHpww@mail.gmail.com> <CAOvn4qgnMUxM5fz-7R_0cDGJqKCy6MQbPHCz6xy8DE+GQBi6rA@mail.gmail.com> Message-ID: <CAH+mRR0GmmD2Nw_rWj3WxcBGNuLDc-ExrgPsM-9=Jx7+4us9nw@mail.gmail.com> Use IPython as a system shell!!! And then: %run foo.ipynb ;-) btw, it is a not a joke... 2014-02-25 18:45 GMT-03:00 Thomas Kluyver <takowl at gmail.com>: > From within IPython, you can now run a notebook with: %run foo.ipynb > > I don't believe there's any neat way of doing it from a system shell, > though. > > Thomas > > > On 21 February 2014 05:58, Aaron O'Leary <aaron.oleary at gmail.com> wrote: > >> Hi, >> >> Is it possible to run the notebook non interactively? >> >> This was asked on StackOverflow a few months ago: >> >> http://stackoverflow.com/questions/17905350/ >> >> Outside of ipython there is [runipy], which does what I need, >> but some switch on ipython itself would be nice. >> >> [runipy]: https://github.com/paulgb/runipy >> >> Cheers, >> Aaron >> _______________________________________________ >> 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 > > -- 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/20140225/9fb4ef3d/attachment.html> From bussonniermatthias at gmail.com Tue Feb 25 16:57:49 2014 From: bussonniermatthias at gmail.com (Matthias BUSSONNIER) Date: Tue, 25 Feb 2014 22:57:49 +0100 Subject: [IPython-dev] running notebook from command line In-Reply-To: <CAH+mRR0GmmD2Nw_rWj3WxcBGNuLDc-ExrgPsM-9=Jx7+4us9nw@mail.gmail.com> References: <CAHzsXVVUBBfQUa-pjwVJH+CmmsN_SoHbQrZ7zbeNWXg1VKHpww@mail.gmail.com> <CAOvn4qgnMUxM5fz-7R_0cDGJqKCy6MQbPHCz6xy8DE+GQBi6rA@mail.gmail.com> <CAH+mRR0GmmD2Nw_rWj3WxcBGNuLDc-ExrgPsM-9=Jx7+4us9nw@mail.gmail.com> Message-ID: <B7AE7B1F-4B5C-4F8A-B959-196BD71CE277@gmail.com> https://pypi.python.org/pypi/BatchNotebook/0.0.1 https://pypi.python.org/pypi/runipy https://pypi.python.org/pypi/run_ipynbs/1.2 Authors should probably collaborate... -- M Le 25 f?vr. 2014 ? 22:49, Dami?n Avila a ?crit : > Use IPython as a system shell!!! > And then: %run foo.ipynb > ;-) btw, it is a not a joke... > > > 2014-02-25 18:45 GMT-03:00 Thomas Kluyver <takowl at gmail.com>: > From within IPython, you can now run a notebook with: %run foo.ipynb > > I don't believe there's any neat way of doing it from a system shell, though. > > Thomas > > > On 21 February 2014 05:58, Aaron O'Leary <aaron.oleary at gmail.com> wrote: > Hi, > > Is it possible to run the notebook non interactively? > > This was asked on StackOverflow a few months ago: > > http://stackoverflow.com/questions/17905350/ > > Outside of ipython there is [runipy], which does what I need, > but some switch on ipython itself would be nice. > > [runipy]: https://github.com/paulgb/runipy > > Cheers, > Aaron > _______________________________________________ > 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 > > > > > -- > 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 carl.input at gmail.com Tue Feb 25 17:14:49 2014 From: carl.input at gmail.com (Carl Smith) Date: Tue, 25 Feb 2014 22:14:49 +0000 Subject: [IPython-dev] Camera widget In-Reply-To: <CAHAreOrmwYRFSxH2JF+iv=TKm2RFk3OhA0HbH4YeoFfizwKXsw@mail.gmail.com> References: <530CE149.5000502@creativetrax.com> <CAHAreOrmwYRFSxH2JF+iv=TKm2RFk3OhA0HbH4YeoFfizwKXsw@mail.gmail.com> Message-ID: <81830375-6F49-42F0-A01C-88806AC7F88C@gmail.com> Very cute. From aaron.oleary at gmail.com Tue Feb 25 18:13:56 2014 From: aaron.oleary at gmail.com (Aaron O'Leary) Date: Tue, 25 Feb 2014 23:13:56 +0000 Subject: [IPython-dev] running notebook from command line In-Reply-To: <CAHAreOpe1ZgCjJ7DEyQ-KrbG7fxgL2NhjTJ0upbdhAdj31wg1A@mail.gmail.com> References: <CAHzsXVVUBBfQUa-pjwVJH+CmmsN_SoHbQrZ7zbeNWXg1VKHpww@mail.gmail.com> <CAOvn4qgnMUxM5fz-7R_0cDGJqKCy6MQbPHCz6xy8DE+GQBi6rA@mail.gmail.com> <CAHAreOpe1ZgCjJ7DEyQ-KrbG7fxgL2NhjTJ0upbdhAdj31wg1A@mail.gmail.com> Message-ID: <CAHzsXVWrbpx2uOckGJeDps0YYY2_KvEgtKOE=sKtODuZ_tSozA@mail.gmail.com> `ipython -c "%run blah.ipynb"` Thanks! seems obvious now I think about it. Only in version 2.0 On 25 February 2014 21:49, Fernando Perez <fperez.net at gmail.com> wrote: > On Tue, Feb 25, 2014 at 1:45 PM, Thomas Kluyver <takowl at gmail.com> wrote: >> >> From within IPython, you can now run a notebook with: %run foo.ipynb >> >> I don't believe there's any neat way of doing it from a system shell, >> though. > > > There is: > > alpamayo[~]> ipython -c "%run foo.ipynb" > this is a notebook! > ['/home/fperez/usr/bin/ipython', '-c', '%run foo.ipynb'] > > Cheers > > f > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > From j.davidgriffiths at gmail.com Wed Feb 26 05:31:15 2014 From: j.davidgriffiths at gmail.com (JGrif) Date: Wed, 26 Feb 2014 02:31:15 -0800 (PST) Subject: [IPython-dev] output toggle for slideviewer Message-ID: <1393410675380-5048766.post@n6.nabble.com> Hi all. Quick thought on a possibly-easy feature request: Have an option to use the nbconvert 'hide input' functionality for the herokuapp slideviewer. (as e.g. described nicely on Damian's blog http://www.damian.oquanta.info/posts/hide-the-input-cells-from-your-ipython-slides.html ) I understand the the slideviewer is not intended to do anything exotic with nbconvert, and that it is a quick nbconvert job to remove the input cells if one knows how. But the usefulness of the hide input option really stands out imho. It makes it feasible to use ipynbs for talks and presentations of all kinds. Whilst I personally am ok with nbconvert-ing and serving slides from gh-pages, this is a bit niche. And it needs to be re-run for every modification in the notebook. The majority of users will most likely not be doing this kind of thing any time soon. So I'm thinking maybe a flag, or a separate slideviewer url bar or even separate website for input-removed slides, would be a really great addition to this tool. Cheers, john -- View this message in context: http://python.6.x6.nabble.com/output-toggle-for-slideviewer-tp5048766.html Sent from the IPython - Development mailing list archive at Nabble.com. From claresloggett at gmail.com Wed Feb 26 07:39:02 2014 From: claresloggett at gmail.com (Clare Sloggett) Date: Wed, 26 Feb 2014 23:39:02 +1100 Subject: [IPython-dev] Using the IPython API to configure profiles In-Reply-To: <E5EA67A1-C0FA-4925-8796-CB22F4575E4E@gmail.com> References: <CAETqNqFQcPKm_98j7P8tZ1-tg0B5qNRpXG1oXsQEgPj9s9YsJw@mail.gmail.com> <CAAusYCjqpdA7kxZTy5xJB_2DzPjUn_3=kLhw6R3JbXPUuEu0jw@mail.gmail.com> <E5EA67A1-C0FA-4925-8796-CB22F4575E4E@gmail.com> Message-ID: <CAETqNqE5YYVW6gMKVhpjrrNXAi=JgQupr=sSMrLR5q1XzBwx_w@mail.gmail.com> Hi Doug and Matthias, Thanks! This helped - I mostly wanted to know that I wasn't missing a nicer way to do it. Clare On 26 February 2014 00:27, Matthias BUSSONNIER <bussonniermatthias at gmail.com > wrote: > Hi, > > Le 25 f?vr. 2014 ? 13:55, Doug Blank a ?crit : > > On Tue, Feb 25, 2014 at 7:35 AM, Clare Sloggett <claresloggett at gmail.com>wrote: > >> Hi all, >> >> I'm new to this list so please let me know if it's not a good right place >> for this question, etc. >> >> I'm wondering if it's possible to use the IPython API to generate ipython >> profile configuration files, and if so, where I can find some guidance on >> doing this. >> >> The motivation is: I'm using python to automate some setup of ipython >> notebook. I can use python to call the shell with "ipython profile create >> nbserver" and then to edit the resulting ipython_config.py file. However >> since I'm in python already, this seems roundabout - is it possible to just >> use the IPython API directly to do these things? >> >> I've found the API reference at >> http://ipython.org/ipython-doc/stable/api/index.html . >> >> I haven't found any tutorials or guides on using the IPython API, so I'm >> just hunting through the reference, and maybe this is why I'm having >> trouble working out the right way to approach this task. Is creating an >> ipython profile, and configuring it, a sensible thing to do using the API, >> and if so, can anyone give me some pointers? >> >> So far I have found a way (maybe not the best way?) to create a new >> profile directory >> using IPython.core.profiledir.ProfileDir.create_profile_dir_by_name(), but >> I haven't discovered any good way to handle configuration. >> >> Thanks in advance! >> > > As a new user of IPython, I can't answer your question. But we just did > this same task with our non-Python, external kernel. Here is what we are > doing: we added a flag to our program (calico --create-profile) that will > create an IPython profile. The main iprofile_config.py only needed a couple > of options (c.KernelManager.kernel_cmd) and so we create that file > directly. We also recursively copy from a setup directory to the ($ipython > locate)/profile_calico/ directory, so that if we ever want to have custom > files, we can just drop them into our setup directory, and they'll get > copied over when you --create-profile. > > > > We are working on that. > > IPython 2.0 will allow you to create config file in json which will be > easier to modify for non-python app and/or to automatize. > Right now the logic loop through all the possible configurable is not > pretty and use print in lots of places (like for --help-all). > So we could refactor it, but this will most-likely be for 3.0 or later. > > We plan on having a API to edit config at some point, but it is not in > motion yet. > -- > M > > > > > _______________________________________________ > 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/20140226/08dee2e7/attachment.html> From aaron.oleary at gmail.com Wed Feb 26 10:45:57 2014 From: aaron.oleary at gmail.com (Aaron O'Leary) Date: Wed, 26 Feb 2014 15:45:57 +0000 Subject: [IPython-dev] notedown - convert markdown to ipython notebook Message-ID: <CAHzsXVW5WVy3MmPEJ9x=i7FFcRGJ23mXCPfR95vUk0wE6zzszA@mail.gmail.com> I recently made [notedown], a tool to convert markdown into an ipython notebook. [notedown]: https://github.com/aaren/notedown You use it like this: notedown your_markdown.md > your_notebook.ipynb It doesn't store figures or do much fancy stuff, but it does let me stay in Vim for writing :) Let me know your thoughts / ideas for improvement! aaron From konrad.hinsen at fastmail.net Wed Feb 26 12:35:05 2014 From: konrad.hinsen at fastmail.net (Konrad Hinsen) Date: Wed, 26 Feb 2014 18:35:05 +0100 Subject: [IPython-dev] How to get the notebook name/path in the kernel? Message-ID: <21262.9673.594236.921890@Konrad-Hinsens-MacBook-Pro-2.local> Hi everyone, I am writing my own kernel (a thin wrapper around IPython.kernel.zmq.ipkernel.Kernel), which is started through the standard KernelApp and KernelManager by reconfiguring KernelManager.kernel_cmd. During initialization, my kernel needs to know the name and path of the notebook that it is attached to. I don't see an obvious way to get this information. It looks like the KernelManager is the class that has the information, but I can't communicate with it from the kernel. Any help would be appreciated! Konrad From takowl at gmail.com Wed Feb 26 13:11:03 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Wed, 26 Feb 2014 10:11:03 -0800 Subject: [IPython-dev] How to get the notebook name/path in the kernel? In-Reply-To: <21262.9673.594236.921890@Konrad-Hinsens-MacBook-Pro-2.local> References: <21262.9673.594236.921890@Konrad-Hinsens-MacBook-Pro-2.local> Message-ID: <CAOvn4qhyt9KL5oP+ZzreZ8KHK-eMJZvEgimJDsosXNiFYCVZ+w@mail.gmail.com> On 26 February 2014 09:35, Konrad Hinsen <konrad.hinsen at fastmail.net> wrote: > During initialization, my kernel needs to know the name and path of > the notebook that it is attached to. I don't see an obvious way to > get this information. I don't think there is a good way to get that: the design is specifically that the kernel is an engine to run code, and should not know where that code is coming from. Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140226/60608279/attachment.html> From fperez.net at gmail.com Wed Feb 26 16:07:24 2014 From: fperez.net at gmail.com (Fernando Perez) Date: Wed, 26 Feb 2014 13:07:24 -0800 Subject: [IPython-dev] How to get the notebook name/path in the kernel? In-Reply-To: <CAOvn4qhyt9KL5oP+ZzreZ8KHK-eMJZvEgimJDsosXNiFYCVZ+w@mail.gmail.com> References: <21262.9673.594236.921890@Konrad-Hinsens-MacBook-Pro-2.local> <CAOvn4qhyt9KL5oP+ZzreZ8KHK-eMJZvEgimJDsosXNiFYCVZ+w@mail.gmail.com> Message-ID: <CAHAreOrpmo=e9ksvMN4c_nFCHGWbAVkESEZkoAfvp6pbTAQnqA@mail.gmail.com> Konrad, Matthias' recent description is a great one: it's like asking a book about the color of the eyes of its reader. That question is fundamentally ill-posed, as multiple people may simultaneously read a book. In IPython's case, the same applies: a kernel may be attached to a notebook, but simultaneously to a terminal and a qtconsole. While we hold fast on the idea that a notebook should only have *one* kernel, we've even wondered if it could make sense to have multiple notebooks connected to an single kernel (to operate on the same namespace while breaking up the narrative into subdocuments more conveniently). So I'm afraid that, by design, that question will remain one without a well-defined answer... You can probably write a magic that will call back out from the kernel to the client JS and fetch the notebook path and would store it in a variable in the user namespace, but my JS-fu isn't up to snuff to write that right away. And you'd have to accept that it's a hack with potentially ambiguous results (if for example we later allow multiple notebooks to connect to the same kernel). Cheers, f On Wed, Feb 26, 2014 at 10:11 AM, Thomas Kluyver <takowl at gmail.com> wrote: > On 26 February 2014 09:35, Konrad Hinsen <konrad.hinsen at fastmail.net>wrote: > >> During initialization, my kernel needs to know the name and path of >> the notebook that it is attached to. I don't see an obvious way to >> get this information. > > > I don't think there is a good way to get that: the design is specifically > that the kernel is an engine to run code, and should not know where that > code is coming from. > > Thomas > > _______________________________________________ > 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/20140226/a0079305/attachment.html> From doug.blank at gmail.com Wed Feb 26 17:25:47 2014 From: doug.blank at gmail.com (Doug Blank) Date: Wed, 26 Feb 2014 17:25:47 -0500 Subject: [IPython-dev] Camera widget In-Reply-To: <530CE149.5000502@creativetrax.com> References: <530CE149.5000502@creativetrax.com> Message-ID: <CAAusYChaXO0hMe6GXL+EvfWutkTd68SacsOV0uJ-v+94mAAsXw@mail.gmail.com> Jason, thank you very much for sharing this! So, I am testing this with IPython 2.0.0-dev master, and after three clicks, it no longer updates the imageurl field. The picture continues to be updated in the view, both live, and when the picture is taken. But it appears that the data is no longer being sent to the kernel. I have a feeling that this is because the frontend is not receiving a proper message back from the kernel (because auto throttling kicks in). This is my guess, anyway. Can you verify that you are also having this issue, and perhaps suggest what could be the matter. Thanks again! -Doug On Tue, Feb 25, 2014 at 1:30 PM, Jason Grout <jason-sage at creativetrax.com>wrote: > For your enjoyment, here's a basic camera widget that allows you to snap > pictures and then process them. > > The user-level part of the code is: > > c=Camera() > display(c) > > # snap picture > > %matplotlib inline > from skimage import io, filter, color > io.imshow(filter.roberts(color.rgb2gray(c.image))) > > > It could easily be extended to grab video and audio as well: > > http://nbviewer.ipython.org/gist/jasongrout/9210458 > > You can also see a tweaked version here: > > http://sagecell.sagemath.org/?q=htlcsf > > (you'll probably have to allow the browser to use your camera...) > > 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/20140226/78db5047/attachment.html> From jason-sage at creativetrax.com Wed Feb 26 18:13:35 2014 From: jason-sage at creativetrax.com (Jason Grout) Date: Wed, 26 Feb 2014 17:13:35 -0600 Subject: [IPython-dev] Camera widget In-Reply-To: <CAAusYChaXO0hMe6GXL+EvfWutkTd68SacsOV0uJ-v+94mAAsXw@mail.gmail.com> References: <530CE149.5000502@creativetrax.com> <CAAusYChaXO0hMe6GXL+EvfWutkTd68SacsOV0uJ-v+94mAAsXw@mail.gmail.com> Message-ID: <530E751F.4030208@creativetrax.com> On 2/26/14 4:25 PM, Doug Blank wrote: > Jason, thank you very much for sharing this! > > So, I am testing this with IPython 2.0.0-dev master, and after three > clicks, it no longer updates the imageurl field. The picture continues > to be updated in the view, both live, and when the picture is taken. But > it appears that the data is no longer being sent to the kernel. > > I have a feeling that this is because the frontend is not receiving a > proper message back from the kernel (because auto throttling kicks in). > This is my guess, anyway. > > Can you verify that you are also having this issue, and perhaps suggest > what could be the matter. I'm running pretty close to master, and don't see it with this updated version: http://nbviewer.ipython.org/gist/jasongrout/9210458 (I didn't double-check the version I sent out earlier just now...it's possible that one of the changes I made in the sagecell tweaks included in the above version fixed the issue you are having) Thanks, Jason From ian.h.bell at gmail.com Wed Feb 26 18:58:20 2014 From: ian.h.bell at gmail.com (Ian Bell) Date: Thu, 27 Feb 2014 00:58:20 +0100 Subject: [IPython-dev] Ipython notebook + nbipy + sphinx = aweome documentation Message-ID: <CAJQnXJfSKhm=W34yFJjzPg3RMRQFvwjHGdWbWzMrg_o1bw3z_Q@mail.gmail.com> Hello everyone, I've been hacking away with the documentation of an open-source thermophysical property library that I am the primary developer of, CoolProp<http://coolprop.sf.net> In short, what I am trying to do is to build run-time documentation that shows deviations between my package and the reference (proprietary) package REFPROP. Embedding iPython notebooks directly in webpages is pretty ugly (more work could be done here). One of my biggest complaints is the showing of the input cells in the output. I understand the use case here - It's quite clear. But sometimes you don't want that behavior. So what I did was to develop a template for nbconvert based on the input hiding template, but modified it for my purposes. The basic workflow is this: * Start with a IPython notebook template file Fluidtemplate.ipynb<https://github.com/ibell/coolprop/blob/master/Web/FluidTemplate.ipynb> * In a batch file, inject the fluid name into the template (seems this is also possible using runipy, though I haven't played with this) and convert to HTML. We use this nbconvert template<https://github.com/ibell/coolprop/blob/master/Web/output_toggle.tpl>file to view the inputs when you click on the figures generated. This script generates html files using runipy that are then raw imported into the RST files for sphinx. * Then if you pick one of the fluids, lets say water<http://coolprop.sourceforge.net/Fluids/Water.html>, you can see the output of the conversion. It works pretty much great. But there are a couple of issues. When running runipy, I found I had to comment out like in def parse_date(s): """parse an ISO8601 date string If it is None or not a valid ISO8601 timestamp, it will be returned unmodified. Otherwise, it will return a datetime object. """ if s is None: return s m = ISO8601_PAT.match(s) # if m: # # FIXME: add actual timezone support # # this just drops the timezone info # notz = m.groups()[0] # return datetime.strptime(notz, ISO8601) return s in order to avoid errors like File "C:\Python27\lib\site- packages\ipython-2.0.0_dev-py2.7.egg\IPython\utils\jsonutil.py", line 79, in parse_date return datetime.strptime(notz, ISO8601) AttributeError: _strptime This is a weird error since the call is to datetime.strptime not datetime._strptime. Anyway... Also, I can't figure out how to make the paragraph marker not be always visible, rather visible on hover-over like in normal sphinx. In any case, I'm pretty pleased, though I would be happy for any thoughts/recommendations. Ian -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140227/6d213586/attachment.html> From doug.blank at gmail.com Wed Feb 26 20:02:47 2014 From: doug.blank at gmail.com (Doug Blank) Date: Wed, 26 Feb 2014 20:02:47 -0500 Subject: [IPython-dev] Camera widget In-Reply-To: <530E751F.4030208@creativetrax.com> References: <530CE149.5000502@creativetrax.com> <CAAusYChaXO0hMe6GXL+EvfWutkTd68SacsOV0uJ-v+94mAAsXw@mail.gmail.com> <530E751F.4030208@creativetrax.com> Message-ID: <CAAusYCiz1yRattwdJ+e08F+P6Ytqr5=S7bsUQPuoSvazaoSGpQ@mail.gmail.com> On Wed, Feb 26, 2014 at 6:13 PM, Jason Grout <jason-sage at creativetrax.com>wrote: > On 2/26/14 4:25 PM, Doug Blank wrote: > > Jason, thank you very much for sharing this! > > > > So, I am testing this with IPython 2.0.0-dev master, and after three > > clicks, it no longer updates the imageurl field. The picture continues > > to be updated in the view, both live, and when the picture is taken. But > > it appears that the data is no longer being sent to the kernel. > > > > I have a feeling that this is because the frontend is not receiving a > > proper message back from the kernel (because auto throttling kicks in). > > This is my guess, anyway. > > > > Can you verify that you are also having this issue, and perhaps suggest > > what could be the matter. > > I'm running pretty close to master, and don't see it with this updated > version: > > http://nbviewer.ipython.org/gist/jasongrout/9210458 > > (I didn't double-check the version I sent out earlier just now...it's > possible that one of the changes I made in the sagecell tweaks included > in the above version fixed the issue you are having) > > I'm seeing strange behavior in the latest pull (from today's changes in master) with all of the custom widgets. For example, the widgets in "Part 6 Custom Widgets" in the examples are not rendering anymore. Any one else seeing that? Perhaps I need to recreate my profiles? The Camera widget no longer shows as well. -Doug > 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/20140226/140ee161/attachment.html> From nathan12343 at gmail.com Wed Feb 26 20:13:25 2014 From: nathan12343 at gmail.com (Nathan Goldbaum) Date: Wed, 26 Feb 2014 17:13:25 -0800 Subject: [IPython-dev] Ipython notebook + nbipy + sphinx = aweome documentation In-Reply-To: <CAJQnXJfSKhm=W34yFJjzPg3RMRQFvwjHGdWbWzMrg_o1bw3z_Q@mail.gmail.com> References: <CAJQnXJfSKhm=W34yFJjzPg3RMRQFvwjHGdWbWzMrg_o1bw3z_Q@mail.gmail.com> Message-ID: <CAJXewOmja4rabzMtCa0k35u=rFO6s+vaS=8+JOP8N=Bj8EgRvA@mail.gmail.com> Hi Ian, I've spent a bit of time thinking about how to include the output from nbconvert into a sphinx document. My problem was a little bit different. I wanted to include the notebook as a unit, including input cells, so that contributors could write documentation inside of the notebook and have it be included in more or less the same format in our final docs build. An example of the results is here: http://ngoldbaum.net/docs_build/analyzing/units/index.html Click through to the subsections to see the converted notebooks. The extension that makes this possible is here: https://bitbucket.org/ngoldbaum/yt-mattfork/src/1923fae835fe1d1bf8145c46b6062ca9e9523f44/doc/extensions/notebook_sphinxext.py?at=yt-3.0 With this approach the notebook is stored inside the docs repository in an unevaluated state. As part of the build, the notebook is evaluated by runipy and then converted to HTML with nbconvert. The HTML/CSS is then sanitized to not conflict with styles defined by the sphinx theme (in an ad-hoc totally not nice way). Not sure if this is where you're going with what you're describing, but you may find some of the code I've come up with useful. Cheers, Nathan On Wed, Feb 26, 2014 at 3:58 PM, Ian Bell <ian.h.bell at gmail.com> wrote: > Hello everyone, > > I've been hacking away with the documentation of an open-source > thermophysical property library that I am the primary developer of, CoolProp > > In short, what I am trying to do is to build run-time documentation that > shows deviations between my package and the reference (proprietary) package > REFPROP. Embedding iPython notebooks directly in webpages is pretty ugly > (more work could be done here). One of my biggest complaints is the showing > of the input cells in the output. I understand the use case here - It's > quite clear. But sometimes you don't want that behavior. So what I did was > to develop a template for nbconvert based on the input hiding template, but > modified it for my purposes. > > The basic workflow is this: > * Start with a IPython notebook template file Fluidtemplate.ipynb > * In a batch file, inject the fluid name into the template (seems this is > also possible using runipy, though I haven't played with this) and convert > to HTML. We use this nbconvert template file to view the inputs when you > click on the figures generated. This script generates html files using > runipy that are then raw imported into the RST files for sphinx. > * Then if you pick one of the fluids, lets say water, you can see the output > of the conversion. > > It works pretty much great. But there are a couple of issues. When running > runipy, I found I had to comment out like in > > def parse_date(s): > """parse an ISO8601 date string > > If it is None or not a valid ISO8601 timestamp, > it will be returned unmodified. > Otherwise, it will return a datetime object. > """ > if s is None: > return s > m = ISO8601_PAT.match(s) > # if m: > # # FIXME: add actual timezone support > # # this just drops the timezone info > # notz = m.groups()[0] > # return datetime.strptime(notz, ISO8601) > return s > > in order to avoid errors like > > File "C:\Python27\lib\site- > packages\ipython-2.0.0_dev-py2.7.egg\IPython\utils\jsonutil.py", line 79, in > parse_date > return datetime.strptime(notz, ISO8601) > AttributeError: _strptime > > This is a weird error since the call is to datetime.strptime not > datetime._strptime. Anyway... > > Also, I can't figure out how to make the paragraph marker not be always > visible, rather visible on hover-over like in normal sphinx. > > In any case, I'm pretty pleased, though I would be happy for any > thoughts/recommendations. > > Ian > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > From scopatz at gmail.com Wed Feb 26 20:17:25 2014 From: scopatz at gmail.com (Anthony Scopatz) Date: Wed, 26 Feb 2014 19:17:25 -0600 Subject: [IPython-dev] Ipython notebook + nbipy + sphinx = aweome documentation In-Reply-To: <CAJXewOmja4rabzMtCa0k35u=rFO6s+vaS=8+JOP8N=Bj8EgRvA@mail.gmail.com> References: <CAJQnXJfSKhm=W34yFJjzPg3RMRQFvwjHGdWbWzMrg_o1bw3z_Q@mail.gmail.com> <CAJXewOmja4rabzMtCa0k35u=rFO6s+vaS=8+JOP8N=Bj8EgRvA@mail.gmail.com> Message-ID: <CAPk-6T56yk4WvjR8+YAxhJ2VHbCQKZwoBdur4X-jmYYn4oCdtA@mail.gmail.com> My problem is basically the same as Nathan's :) I'd love to see an official solution to it. Be Well Anthony On Wed, Feb 26, 2014 at 7:13 PM, Nathan Goldbaum <nathan12343 at gmail.com>wrote: > Hi Ian, > > I've spent a bit of time thinking about how to include the output from > nbconvert into a sphinx document. > > My problem was a little bit different. I wanted to include the > notebook as a unit, including input cells, so that contributors could > write documentation inside of the notebook and have it be included in > more or less the same format in our final docs build. > > An example of the results is here: > http://ngoldbaum.net/docs_build/analyzing/units/index.html > > Click through to the subsections to see the converted notebooks. > > The extension that makes this possible is here: > > https://bitbucket.org/ngoldbaum/yt-mattfork/src/1923fae835fe1d1bf8145c46b6062ca9e9523f44/doc/extensions/notebook_sphinxext.py?at=yt-3.0 > > With this approach the notebook is stored inside the docs repository > in an unevaluated state. As part of the build, the notebook is > evaluated by runipy and then converted to HTML with nbconvert. The > HTML/CSS is then sanitized to not conflict with styles defined by the > sphinx theme (in an ad-hoc totally not nice way). > > Not sure if this is where you're going with what you're describing, > but you may find some of the code I've come up with useful. > > Cheers, > > Nathan > > On Wed, Feb 26, 2014 at 3:58 PM, Ian Bell <ian.h.bell at gmail.com> wrote: > > Hello everyone, > > > > I've been hacking away with the documentation of an open-source > > thermophysical property library that I am the primary developer of, > CoolProp > > > > In short, what I am trying to do is to build run-time documentation that > > shows deviations between my package and the reference (proprietary) > package > > REFPROP. Embedding iPython notebooks directly in webpages is pretty ugly > > (more work could be done here). One of my biggest complaints is the > showing > > of the input cells in the output. I understand the use case here - It's > > quite clear. But sometimes you don't want that behavior. So what I did > was > > to develop a template for nbconvert based on the input hiding template, > but > > modified it for my purposes. > > > > The basic workflow is this: > > * Start with a IPython notebook template file Fluidtemplate.ipynb > > * In a batch file, inject the fluid name into the template (seems this is > > also possible using runipy, though I haven't played with this) and > convert > > to HTML. We use this nbconvert template file to view the inputs when you > > click on the figures generated. This script generates html files using > > runipy that are then raw imported into the RST files for sphinx. > > * Then if you pick one of the fluids, lets say water, you can see the > output > > of the conversion. > > > > It works pretty much great. But there are a couple of issues. When > running > > runipy, I found I had to comment out like in > > > > def parse_date(s): > > """parse an ISO8601 date string > > > > If it is None or not a valid ISO8601 timestamp, > > it will be returned unmodified. > > Otherwise, it will return a datetime object. > > """ > > if s is None: > > return s > > m = ISO8601_PAT.match(s) > > # if m: > > # # FIXME: add actual timezone support > > # # this just drops the timezone info > > # notz = m.groups()[0] > > # return datetime.strptime(notz, ISO8601) > > return s > > > > in order to avoid errors like > > > > File "C:\Python27\lib\site- > > packages\ipython-2.0.0_dev-py2.7.egg\IPython\utils\jsonutil.py", line > 79, in > > parse_date > > return datetime.strptime(notz, ISO8601) > > AttributeError: _strptime > > > > This is a weird error since the call is to datetime.strptime not > > datetime._strptime. Anyway... > > > > Also, I can't figure out how to make the paragraph marker not be always > > visible, rather visible on hover-over like in normal sphinx. > > > > In any case, I'm pretty pleased, though I would be happy for any > > thoughts/recommendations. > > > > Ian > > > > _______________________________________________ > > 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/20140226/023eed89/attachment.html> From sylvain.corlay at gmail.com Wed Feb 26 20:32:29 2014 From: sylvain.corlay at gmail.com (Sylvain Corlay) Date: Wed, 26 Feb 2014 20:32:29 -0500 Subject: [IPython-dev] Camera widget In-Reply-To: <CAAusYCiz1yRattwdJ+e08F+P6Ytqr5=S7bsUQPuoSvazaoSGpQ@mail.gmail.com> References: <530CE149.5000502@creativetrax.com> <CAAusYChaXO0hMe6GXL+EvfWutkTd68SacsOV0uJ-v+94mAAsXw@mail.gmail.com> <530E751F.4030208@creativetrax.com> <CAAusYCiz1yRattwdJ+e08F+P6Ytqr5=S7bsUQPuoSvazaoSGpQ@mail.gmail.com> Message-ID: <CAK=Phk69VMfL37wB8ErZtSO+NtGjBCEYki-MuoXXGwLiZzHisw@mail.gmail.com> Hi Doug, I have experienced this kind of problems with widgets not being rendered because of caching issues of Chrome. Even after deleting the cache, some javascript files are still not updated to the last version. The fix for me is to -open the developer tools (Crtl + Shift + J) -right-click on the reload button of the page -choose *"Empty Cache and Hard Reload*". Another solution which only works when the developer tools are kept open is to check "*Disable cache (while DevTools is open)*" in the developer tools options. Best, Sylvain On Wed, Feb 26, 2014 at 8:02 PM, Doug Blank <doug.blank at gmail.com> wrote: > On Wed, Feb 26, 2014 at 6:13 PM, Jason Grout <jason-sage at creativetrax.com>wrote: > >> On 2/26/14 4:25 PM, Doug Blank wrote: >> > Jason, thank you very much for sharing this! >> > >> > So, I am testing this with IPython 2.0.0-dev master, and after three >> > clicks, it no longer updates the imageurl field. The picture continues >> > to be updated in the view, both live, and when the picture is taken. But >> > it appears that the data is no longer being sent to the kernel. >> > >> > I have a feeling that this is because the frontend is not receiving a >> > proper message back from the kernel (because auto throttling kicks in). >> > This is my guess, anyway. >> > >> > Can you verify that you are also having this issue, and perhaps suggest >> > what could be the matter. >> >> I'm running pretty close to master, and don't see it with this updated >> version: >> >> http://nbviewer.ipython.org/gist/jasongrout/9210458 >> >> (I didn't double-check the version I sent out earlier just now...it's >> possible that one of the changes I made in the sagecell tweaks included >> in the above version fixed the issue you are having) >> >> > I'm seeing strange behavior in the latest pull (from today's changes in > master) with all of the custom widgets. For example, the widgets in "Part 6 > Custom Widgets" in the examples are not rendering anymore. > > Any one else seeing that? Perhaps I need to recreate my profiles? The > Camera widget no longer shows as well. > > -Doug > > >> 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140226/57d10de7/attachment.html> From takowl at gmail.com Wed Feb 26 20:40:26 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Wed, 26 Feb 2014 17:40:26 -0800 Subject: [IPython-dev] cell-to-function extension Message-ID: <CAOvn4qhgbZydeQo6aZowF776QRXp2KSFg67Puk_3tiQG9_gnsw@mail.gmail.com> Several people have mentioned that it's awkward when you want to reuse exploratory code written in a notebook, first by moving it into a function for other cells in the same notebook, and then by moving it into a module to use from other notebooks and other modules. At lunch today, we came up with the idea of a tool to transform a cell into a function, to address the first of those steps. Indenting and adding 'def foo()' by hand is easy enough, but in large cells it's easy to overlook a critical variable. So the tool scans the code in the cell, and creates function parameters for any variables referenced before they're defined, along with a return statement including any variables defined in the cell. That will usually be more than you want, but deleting code is easier than writing it. Using the extension is as simple as putting a "%%cell2function" at the top of cells you want to turn into a function. Please give the extension a try and let me know whether it's useful in your workflow, and any annoyances you find using it. Install command: %install_ext https://raw.github.com/takluyver/cell2function/master/cell2function.py Github project: https://github.com/takluyver/cell2function Example notebook: http://nbviewer.ipython.org/github/takluyver/cell2function/blob/master/Cell2function%20demo.ipynb Thanks, Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140226/b198c8ad/attachment.html> From jason-sage at creativetrax.com Wed Feb 26 20:49:33 2014 From: jason-sage at creativetrax.com (Jason Grout) Date: Wed, 26 Feb 2014 19:49:33 -0600 Subject: [IPython-dev] Camera widget In-Reply-To: <CAK=Phk69VMfL37wB8ErZtSO+NtGjBCEYki-MuoXXGwLiZzHisw@mail.gmail.com> References: <530CE149.5000502@creativetrax.com> <CAAusYChaXO0hMe6GXL+EvfWutkTd68SacsOV0uJ-v+94mAAsXw@mail.gmail.com> <530E751F.4030208@creativetrax.com> <CAAusYCiz1yRattwdJ+e08F+P6Ytqr5=S7bsUQPuoSvazaoSGpQ@mail.gmail.com> <CAK=Phk69VMfL37wB8ErZtSO+NtGjBCEYki-MuoXXGwLiZzHisw@mail.gmail.com> Message-ID: <530E99AD.2050805@creativetrax.com> On 2/26/14 7:32 PM, Sylvain Corlay wrote: > Hi Doug, > I have experienced this kind of problems with widgets not being rendered > because of caching issues of Chrome. Even after deleting the cache, some > javascript files are still not updated to the last version. > The fix for me is to > -open the developer tools (Crtl + Shift + J) > -right-click on the reload button of the page > -choose _"Empty Cache and Hard Reload_". > Another solution which only works when the developer tools are kept open > is to check "_Disable cache (while DevTools is open)_" in the developer > tools options. A couple of related questions for an interested person to investigate: * Is this really a problem of stale javascript files not being updated? (it sounds like it) * If so, are we taking advantage of things like tornado's etag support to validate a browser's cache? Thanks, Jason From doug.blank at gmail.com Wed Feb 26 21:00:22 2014 From: doug.blank at gmail.com (Doug Blank) Date: Wed, 26 Feb 2014 21:00:22 -0500 Subject: [IPython-dev] Camera widget In-Reply-To: <CAK=Phk69VMfL37wB8ErZtSO+NtGjBCEYki-MuoXXGwLiZzHisw@mail.gmail.com> References: <530CE149.5000502@creativetrax.com> <CAAusYChaXO0hMe6GXL+EvfWutkTd68SacsOV0uJ-v+94mAAsXw@mail.gmail.com> <530E751F.4030208@creativetrax.com> <CAAusYCiz1yRattwdJ+e08F+P6Ytqr5=S7bsUQPuoSvazaoSGpQ@mail.gmail.com> <CAK=Phk69VMfL37wB8ErZtSO+NtGjBCEYki-MuoXXGwLiZzHisw@mail.gmail.com> Message-ID: <CAAusYCi0=M589KZR5JbqrW+LnFYNuWB9-jTMOajs2spSupJkfQ@mail.gmail.com> Thanks for the hint... I did not know about that hard reset. However, this is looking like an error. After a reset, in the console: View creation failed Backbone.Model.extend.constructor {widget_manager: WidgetManager, _buffered_state_diff: Object, pending_msgs: 0, msg_buffer: null, key_value_lock: null?} manager.js:83 Exception in Comm callback TypeError {stack: "TypeError: Cannot read property '$el' of null? ?min.js?v=ccd0edd113b78697e04fb5c1b519a5cd:4:5488)", message: "Cannot read property '$el' of null"} message: "Cannot read property '$el' of null" stack: "TypeError: Cannot read property '$el' of null? at WidgetManager._handle_display_view ( http://127.0.0.1:8888/static/widgets/js/manager.js:97:58)? at WidgetManager.display_view ( http://127.0.0.1:8888/static/widgets/js/manager.js:87:26)? at Backbone.Model.extend._handle_comm_msg ( http://127.0.0.1:8888/static/widgets/js/widget.js:85:41)? at x.isFunction.i ( http://127.0.0.1:8888/static/components/jquery/jquery.min.js?v=ccd0edd113b78697e04fb5c1b519a5cd:4:5488)? at Comm._maybe_callback ( http://127.0.0.1:8888/static/services/kernels/js/comm.js?v=f6acfac4110c05a2d4985876fb49765a:177:17)? at Comm.handle_msg ( http://127.0.0.1:8888/static/services/kernels/js/comm.js?v=f6acfac4110c05a2d4985876fb49765a:185:14)? at CommManager.comm_msg ( http://127.0.0.1:8888/static/services/kernels/js/comm.js?v=f6acfac4110c05a2d4985876fb49765a:116:18)? at x.isFunction.i ( http://127.0.0.1:8888/static/components/jquery/jquery.min.js?v=ccd0edd113b78697e04fb5c1b519a5cd:4:5488)? at Kernel._handle_iopub_message ( http://127.0.0.1:8888/static/services/kernels/js/kernel.js?v=6af87c42924701bcbf66ba75f4975cec:573:13)? at WebSocket.x.isFunction.i ( http://127.0.0.1:8888/static/components/jquery/jquery.min.js?v=ccd0edd113b78697e04fb5c1b519a5cd:4:5488 )" __proto__: Error -Doug On Wed, Feb 26, 2014 at 8:32 PM, Sylvain Corlay <sylvain.corlay at gmail.com>wrote: > Hi Doug, > I have experienced this kind of problems with widgets not being rendered > because of caching issues of Chrome. Even after deleting the cache, some > javascript files are still not updated to the last version. > The fix for me is to > -open the developer tools (Crtl + Shift + J) > -right-click on the reload button of the page > -choose *"Empty Cache and Hard Reload*". > Another solution which only works when the developer tools are kept open > is to check "*Disable cache (while DevTools is open)*" in the developer > tools options. > Best, > Sylvain > > > On Wed, Feb 26, 2014 at 8:02 PM, Doug Blank <doug.blank at gmail.com> wrote: > >> On Wed, Feb 26, 2014 at 6:13 PM, Jason Grout <jason-sage at creativetrax.com >> > wrote: >> >>> On 2/26/14 4:25 PM, Doug Blank wrote: >>> > Jason, thank you very much for sharing this! >>> > >>> > So, I am testing this with IPython 2.0.0-dev master, and after three >>> > clicks, it no longer updates the imageurl field. The picture continues >>> > to be updated in the view, both live, and when the picture is taken. >>> But >>> > it appears that the data is no longer being sent to the kernel. >>> > >>> > I have a feeling that this is because the frontend is not receiving a >>> > proper message back from the kernel (because auto throttling kicks in). >>> > This is my guess, anyway. >>> > >>> > Can you verify that you are also having this issue, and perhaps suggest >>> > what could be the matter. >>> >>> I'm running pretty close to master, and don't see it with this updated >>> version: >>> >>> http://nbviewer.ipython.org/gist/jasongrout/9210458 >>> >>> (I didn't double-check the version I sent out earlier just now...it's >>> possible that one of the changes I made in the sagecell tweaks included >>> in the above version fixed the issue you are having) >>> >>> >> I'm seeing strange behavior in the latest pull (from today's changes in >> master) with all of the custom widgets. For example, the widgets in "Part 6 >> Custom Widgets" in the examples are not rendering anymore. >> >> Any one else seeing that? Perhaps I need to recreate my profiles? The >> Camera widget no longer shows as well. >> >> -Doug >> >> >>> 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 >> >> > > _______________________________________________ > 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/20140226/a21342ec/attachment.html> From fperez.net at gmail.com Wed Feb 26 21:10:23 2014 From: fperez.net at gmail.com (Fernando Perez) Date: Wed, 26 Feb 2014 18:10:23 -0800 Subject: [IPython-dev] cell-to-function extension In-Reply-To: <CAOvn4qhgbZydeQo6aZowF776QRXp2KSFg67Puk_3tiQG9_gnsw@mail.gmail.com> References: <CAOvn4qhgbZydeQo6aZowF776QRXp2KSFg67Puk_3tiQG9_gnsw@mail.gmail.com> Message-ID: <CAHAreOrZL3nhCPnj+dOB+=CB=1-4x0RVeqXwfx4M1brxF09Lww@mail.gmail.com> Thomas, many thanks! When the history of IPython is written, we'll have to have a chapter about Lucky House Thai ;) On Wed, Feb 26, 2014 at 5:40 PM, Thomas Kluyver <takowl at gmail.com> wrote: > Several people have mentioned that it's awkward when you want to reuse > exploratory code written in a notebook, first by moving it into a function > for other cells in the same notebook, and then by moving it into a module > to use from other notebooks and other modules. > > At lunch today, we came up with the idea of a tool to transform a cell > into a function, to address the first of those steps. Indenting and adding > 'def foo()' by hand is easy enough, but in large cells it's easy to > overlook a critical variable. So the tool scans the code in the cell, and > creates function parameters for any variables referenced before they're > defined, along with a return statement including any variables defined in > the cell. That will usually be more than you want, but deleting code is > easier than writing it. > > Using the extension is as simple as putting a "%%cell2function" at the top > of cells you want to turn into a function. Please give the extension a try > and let me know whether it's useful in your workflow, and any annoyances > you find using it. > > Install command: > > %install_ext https://raw.github.com/takluyver/cell2function/master/cell2function.py > > Github project: https://github.com/takluyver/cell2function > Example notebook: > http://nbviewer.ipython.org/github/takluyver/cell2function/blob/master/Cell2function%20demo.ipynb > > Thanks, > Thomas > > _______________________________________________ > 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/20140226/644dd17d/attachment.html> From pi at berkeley.edu Wed Feb 26 21:41:03 2014 From: pi at berkeley.edu (Paul Ivanov) Date: Wed, 26 Feb 2014 18:41:03 -0800 Subject: [IPython-dev] cell-to-function extension In-Reply-To: <CAHAreOrZL3nhCPnj+dOB+=CB=1-4x0RVeqXwfx4M1brxF09Lww@mail.gmail.com> References: <CAOvn4qhgbZydeQo6aZowF776QRXp2KSFg67Puk_3tiQG9_gnsw@mail.gmail.com> <CAHAreOrZL3nhCPnj+dOB+=CB=1-4x0RVeqXwfx4M1brxF09Lww@mail.gmail.com> Message-ID: <20140227024103.GA32154@HbI-OTOH.berkeley.edu> Fernando Perez, on 2014-02-26 18:10, wrote: > Thomas, many thanks! When the history of IPython is written, we'll have to > have a chapter about Lucky House Thai ;) Probability theory has their Chinese restaurant process[1] and their Indian Buffet Process[2], and we have our Thai Restaurant Development Process. 1. http://en.wikipedia.org/wiki/Chinese_restaurant_process 2. http://jmlr.org/papers/v12/griffiths11a.html -- _ / \ A* \^ - ,./ _.`\\ / \ / ,--.S \/ \ / `"~,_ \ \ __o ? _ \<,_ /:\ --(_)/-(_)----.../ | \ --------------.......J Paul Ivanov http://pirsquared.org From jason-sage at creativetrax.com Wed Feb 26 21:56:40 2014 From: jason-sage at creativetrax.com (Jason Grout) Date: Wed, 26 Feb 2014 20:56:40 -0600 Subject: [IPython-dev] cell-to-function extension In-Reply-To: <CAOvn4qhgbZydeQo6aZowF776QRXp2KSFg67Puk_3tiQG9_gnsw@mail.gmail.com> References: <CAOvn4qhgbZydeQo6aZowF776QRXp2KSFg67Puk_3tiQG9_gnsw@mail.gmail.com> Message-ID: <530EA968.5040603@creativetrax.com> On 2/26/14 7:40 PM, Thomas Kluyver wrote: > Several people have mentioned that it's awkward when you want to reuse > exploratory code written in a notebook, first by moving it into a > function for other cells in the same notebook, and then by moving it > into a module to use from other notebooks and other modules. Nice. Thus is the start of the IPython refactoring tools. We're slowly reinventing a proper IDE here... Thanks! Jason From jason-sage at creativetrax.com Wed Feb 26 21:59:15 2014 From: jason-sage at creativetrax.com (Jason Grout) Date: Wed, 26 Feb 2014 20:59:15 -0600 Subject: [IPython-dev] Camera widget In-Reply-To: <CAAusYCi0=M589KZR5JbqrW+LnFYNuWB9-jTMOajs2spSupJkfQ@mail.gmail.com> References: <530CE149.5000502@creativetrax.com> <CAAusYChaXO0hMe6GXL+EvfWutkTd68SacsOV0uJ-v+94mAAsXw@mail.gmail.com> <530E751F.4030208@creativetrax.com> <CAAusYCiz1yRattwdJ+e08F+P6Ytqr5=S7bsUQPuoSvazaoSGpQ@mail.gmail.com> <CAK=Phk69VMfL37wB8ErZtSO+NtGjBCEYki-MuoXXGwLiZzHisw@mail.gmail.com> <CAAusYCi0=M589KZR5JbqrW+LnFYNuWB9-jTMOajs2spSupJkfQ@mail.gmail.com> Message-ID: <530EAA03.30604@creativetrax.com> It's a bit difficult to debug these sorts of errors since the comm infrastructure catches them, so it's hard to stop on them. But here's how I do it: * open up the dev tools (in Chrome) * Open up the Sources tab * On the right, click the stop sign until it's blue (i.e., pause on all exceptions; see http://stackoverflow.com/questions/2233339/javascript-is-there-a-way-to-get-chrome-to-break-on-all-errors/17324511#17324511) * run the code. It should break where the exception is thrown and open up the appropriate file and line. You can then poke around on the console and/or hover over variables to try to narrow down the problem. I'm updating to the current master to see if I can see the problem. Thanks, Jason On 2/26/14 8:00 PM, Doug Blank wrote: > Thanks for the hint... I did not know about that hard reset. However, > this is looking like an error. After a reset, in the console: > > View creation failed > Backbone.Model.extend.constructor {widget_manager: WidgetManager, > _buffered_state_diff: Object, pending_msgs: 0, msg_buffer: null, > key_value_lock: null?} > manager.js:83 > > Exception in Comm callback > TypeError {stack: "TypeError: Cannot read property '$el' of null? > ?min.js?v=ccd0edd113b78697e04fb5c1b519a5cd:4:5488)", message: "Cannot > read property '$el' of null"} > > message: "Cannot read property '$el' of null" > stack: "TypeError: Cannot read property '$el' of null? at > WidgetManager._handle_display_view > (http://127.0.0.1:8888/static/widgets/js/manager.js:97:58)? at > WidgetManager.display_view > (http://127.0.0.1:8888/static/widgets/js/manager.js:87:26)? at > Backbone.Model.extend._handle_comm_msg > (http://127.0.0.1:8888/static/widgets/js/widget.js:85:41)? at > x.isFunction.i > (http://127.0.0.1:8888/static/components/jquery/jquery.min.js?v=ccd0edd113b78697e04fb5c1b519a5cd:4:5488)? > at Comm._maybe_callback > (http://127.0.0.1:8888/static/services/kernels/js/comm.js?v=f6acfac4110c05a2d4985876fb49765a:177:17)? > at Comm.handle_msg > (http://127.0.0.1:8888/static/services/kernels/js/comm.js?v=f6acfac4110c05a2d4985876fb49765a:185:14)? > at CommManager.comm_msg > (http://127.0.0.1:8888/static/services/kernels/js/comm.js?v=f6acfac4110c05a2d4985876fb49765a:116:18)? > at x.isFunction.i > (http://127.0.0.1:8888/static/components/jquery/jquery.min.js?v=ccd0edd113b78697e04fb5c1b519a5cd:4:5488)? > at Kernel._handle_iopub_message > (http://127.0.0.1:8888/static/services/kernels/js/kernel.js?v=6af87c42924701bcbf66ba75f4975cec:573:13)? > at WebSocket.x.isFunction.i > (http://127.0.0.1:8888/static/components/jquery/jquery.min.js?v=ccd0edd113b78697e04fb5c1b519a5cd:4:5488)" > __proto__: Error > > -Doug > > On Wed, Feb 26, 2014 at 8:32 PM, Sylvain Corlay > <sylvain.corlay at gmail.com <mailto:sylvain.corlay at gmail.com>> wrote: > > Hi Doug, > I have experienced this kind of problems with widgets not being > rendered because of caching issues of Chrome. Even after deleting > the cache, some javascript files are still not updated to the last > version. > The fix for me is to > -open the developer tools (Crtl + Shift + J) > -right-click on the reload button of the page > -choose _"Empty Cache and Hard Reload_". > Another solution which only works when the developer tools are kept > open is to check "_Disable cache (while DevTools is open)_" in the > developer tools options. > Best, > Sylvain > > > On Wed, Feb 26, 2014 at 8:02 PM, Doug Blank <doug.blank at gmail.com > <mailto:doug.blank at gmail.com>> wrote: > > On Wed, Feb 26, 2014 at 6:13 PM, Jason Grout > <jason-sage at creativetrax.com > <mailto:jason-sage at creativetrax.com>> wrote: > > On 2/26/14 4:25 PM, Doug Blank wrote: > > Jason, thank you very much for sharing this! > > > > So, I am testing this with IPython 2.0.0-dev master, and > after three > > clicks, it no longer updates the imageurl field. The > picture continues > > to be updated in the view, both live, and when the > picture is taken. But > > it appears that the data is no longer being sent to the > kernel. > > > > I have a feeling that this is because the frontend is not > receiving a > > proper message back from the kernel (because auto > throttling kicks in). > > This is my guess, anyway. > > > > Can you verify that you are also having this issue, and > perhaps suggest > > what could be the matter. > > I'm running pretty close to master, and don't see it with > this updated > version: > > http://nbviewer.ipython.org/gist/jasongrout/9210458 > > (I didn't double-check the version I sent out earlier just > now...it's > possible that one of the changes I made in the sagecell > tweaks included > in the above version fixed the issue you are having) > > > I'm seeing strange behavior in the latest pull (from today's > changes in master) with all of the custom widgets. For example, > the widgets in "Part 6 Custom Widgets" in the examples are not > rendering anymore. > > Any one else seeing that? Perhaps I need to recreate my > profiles? The Camera widget no longer shows as well. > > -Doug > > Thanks, > > Jason > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org <mailto:IPython-dev at scipy.org> > 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 > > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org <mailto: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 jason-sage at creativetrax.com Wed Feb 26 22:06:19 2014 From: jason-sage at creativetrax.com (Jason Grout) Date: Wed, 26 Feb 2014 21:06:19 -0600 Subject: [IPython-dev] Camera widget In-Reply-To: <530EAA03.30604@creativetrax.com> References: <530CE149.5000502@creativetrax.com> <CAAusYChaXO0hMe6GXL+EvfWutkTd68SacsOV0uJ-v+94mAAsXw@mail.gmail.com> <530E751F.4030208@creativetrax.com> <CAAusYCiz1yRattwdJ+e08F+P6Ytqr5=S7bsUQPuoSvazaoSGpQ@mail.gmail.com> <CAK=Phk69VMfL37wB8ErZtSO+NtGjBCEYki-MuoXXGwLiZzHisw@mail.gmail.com> <CAAusYCi0=M589KZR5JbqrW+LnFYNuWB9-jTMOajs2spSupJkfQ@mail.gmail.com> <530EAA03.30604@creativetrax.com> Message-ID: <530EABAB.9070009@creativetrax.com> On 2/26/14 8:59 PM, Jason Grout wrote: > I'm updating to the current master to see if I can see the problem. Okay, the problem was the recent PR that changed all the paths for widget javascript files. It's a one-line fix in the require statement (https://gist.github.com/jasongrout/9210458/revisions). See the updated gist now. Thanks, Jason From doug.blank at gmail.com Wed Feb 26 22:43:13 2014 From: doug.blank at gmail.com (Doug Blank) Date: Wed, 26 Feb 2014 22:43:13 -0500 Subject: [IPython-dev] Camera widget In-Reply-To: <530EABAB.9070009@creativetrax.com> References: <530CE149.5000502@creativetrax.com> <CAAusYChaXO0hMe6GXL+EvfWutkTd68SacsOV0uJ-v+94mAAsXw@mail.gmail.com> <530E751F.4030208@creativetrax.com> <CAAusYCiz1yRattwdJ+e08F+P6Ytqr5=S7bsUQPuoSvazaoSGpQ@mail.gmail.com> <CAK=Phk69VMfL37wB8ErZtSO+NtGjBCEYki-MuoXXGwLiZzHisw@mail.gmail.com> <CAAusYCi0=M589KZR5JbqrW+LnFYNuWB9-jTMOajs2spSupJkfQ@mail.gmail.com> <530EAA03.30604@creativetrax.com> <530EABAB.9070009@creativetrax.com> Message-ID: <CAAusYCjwnyywCkNqOAZ0WG2n6jd6FGfGBGVRSXLk16Kguj92Hw@mail.gmail.com> On Wed, Feb 26, 2014 at 10:06 PM, Jason Grout <jason-sage at creativetrax.com>wrote: > On 2/26/14 8:59 PM, Jason Grout wrote: > > I'm updating to the current master to see if I can see the problem. > > Okay, the problem was the recent PR that changed all the paths for > widget javascript files. It's a one-line fix in the require statement > (https://gist.github.com/jasongrout/9210458/revisions). > > See the updated gist now. > > Thanks, > > Jason > Thanks Jason; good catch! That explains (and solves) all of the issues we were having. The JavaScript paths are wrong in "Part 6 - Custom Widgets" in the examples. I have thought that having unittests based on notebooks would be a good thing [1]... don't want your docs getting out of sync with the code... the docs are as important as the rest of the project. Now, back to the real work... -Doug [1] - https://github.com/paulgb/runipy/issues/14 > > _______________________________________________ > 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/20140226/a0e72a3d/attachment.html> From doug.blank at gmail.com Thu Feb 27 00:00:18 2014 From: doug.blank at gmail.com (Doug Blank) Date: Thu, 27 Feb 2014 00:00:18 -0500 Subject: [IPython-dev] Camera widget In-Reply-To: <CAAusYCjwnyywCkNqOAZ0WG2n6jd6FGfGBGVRSXLk16Kguj92Hw@mail.gmail.com> References: <530CE149.5000502@creativetrax.com> <CAAusYChaXO0hMe6GXL+EvfWutkTd68SacsOV0uJ-v+94mAAsXw@mail.gmail.com> <530E751F.4030208@creativetrax.com> <CAAusYCiz1yRattwdJ+e08F+P6Ytqr5=S7bsUQPuoSvazaoSGpQ@mail.gmail.com> <CAK=Phk69VMfL37wB8ErZtSO+NtGjBCEYki-MuoXXGwLiZzHisw@mail.gmail.com> <CAAusYCi0=M589KZR5JbqrW+LnFYNuWB9-jTMOajs2spSupJkfQ@mail.gmail.com> <530EAA03.30604@creativetrax.com> <530EABAB.9070009@creativetrax.com> <CAAusYCjwnyywCkNqOAZ0WG2n6jd6FGfGBGVRSXLk16Kguj92Hw@mail.gmail.com> Message-ID: <CAAusYCi1SKr2gw5kMciR7NwSbtyP7+aLTfYV9Ej36na7ZCnVrw@mail.gmail.com> BTW, if you give the button an id, <button id = picture_button>, then you can: def click(self): display(Javascript("document.getElementById('picture_button').click();")); which will programmatically take a picture. Here is a puzzle: can you make a kernel-side script that will take a picture, *and* return it? It seems like you can't because the kernel can't handle receiving the image while at the same time run your code waiting for the message to come it. I guess you could do it with a non-blocking kernel? Yep, just tried it by putting our kernel in non-blocking mode. -Doug On Wed, Feb 26, 2014 at 10:43 PM, Doug Blank <doug.blank at gmail.com> wrote: > On Wed, Feb 26, 2014 at 10:06 PM, Jason Grout <jason-sage at creativetrax.com > > wrote: > >> On 2/26/14 8:59 PM, Jason Grout wrote: >> > I'm updating to the current master to see if I can see the problem. >> >> Okay, the problem was the recent PR that changed all the paths for >> widget javascript files. It's a one-line fix in the require statement >> (https://gist.github.com/jasongrout/9210458/revisions). >> >> See the updated gist now. >> >> Thanks, >> >> Jason >> > > Thanks Jason; good catch! That explains (and solves) all of the issues we > were having. > > The JavaScript paths are wrong in "Part 6 - Custom Widgets" in the > examples. I have thought that having unittests based on notebooks would be > a good thing [1]... don't want your docs getting out of sync with the > code... the docs are as important as the rest of the project. Now, back to > the real work... > > -Doug > > [1] - https://github.com/paulgb/runipy/issues/14 > > > >> >> _______________________________________________ >> 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/20140227/ff39ab4f/attachment.html> From jason-sage at creativetrax.com Thu Feb 27 00:39:20 2014 From: jason-sage at creativetrax.com (Jason Grout) Date: Wed, 26 Feb 2014 23:39:20 -0600 Subject: [IPython-dev] Camera widget In-Reply-To: <CAAusYCi1SKr2gw5kMciR7NwSbtyP7+aLTfYV9Ej36na7ZCnVrw@mail.gmail.com> References: <530CE149.5000502@creativetrax.com> <CAAusYChaXO0hMe6GXL+EvfWutkTd68SacsOV0uJ-v+94mAAsXw@mail.gmail.com> <530E751F.4030208@creativetrax.com> <CAAusYCiz1yRattwdJ+e08F+P6Ytqr5=S7bsUQPuoSvazaoSGpQ@mail.gmail.com> <CAK=Phk69VMfL37wB8ErZtSO+NtGjBCEYki-MuoXXGwLiZzHisw@mail.gmail.com> <CAAusYCi0=M589KZR5JbqrW+LnFYNuWB9-jTMOajs2spSupJkfQ@mail.gmail.com> <530EAA03.30604@creativetrax.com> <530EABAB.9070009@creativetrax.com> <CAAusYCjwnyywCkNqOAZ0WG2n6jd6FGfGBGVRSXLk16Kguj92Hw@mail.gmail.com> <CAAusYCi1SKr2gw5kMciR7NwSbtyP7+aLTfYV9Ej36na7ZCnVrw@mail.gmail.com> Message-ID: <530ECF88.4020404@creativetrax.com> On 2/26/14 11:00 PM, Doug Blank wrote: > Here is a puzzle: can you make a kernel-side script that will take a > picture, *and* return it? It seems like you can't because the kernel > can't handle receiving the image while at the same time run your code > waiting for the message to come it. I guess you could do it with a > non-blocking kernel? Yep, just tried it by putting our kernel in > non-blocking mode. Can you elaborate on putting your kernel in non-blocking mode? I suppose what you bring up a is more general problem---I probably can't adjust a slider while some user code is executing and see the result in the code, for example. On the other hand, if the comm infrastructure supported a blocking mode, where a message could be sent and then we block and wait for a reply, we could do your picture-taking example. Just ask the camera to take the picture, and then wait for the reply, just like asking for raw input and waiting for a reply. Thanks, Jason From konrad.hinsen at fastmail.net Thu Feb 27 04:17:59 2014 From: konrad.hinsen at fastmail.net (Konrad Hinsen) Date: Thu, 27 Feb 2014 10:17:59 +0100 Subject: [IPython-dev] How to get the notebook name/path in the kernel? In-Reply-To: <CAHAreOrpmo=e9ksvMN4c_nFCHGWbAVkESEZkoAfvp6pbTAQnqA@mail.gmail.com> References: <21262.9673.594236.921890@Konrad-Hinsens-MacBook-Pro-2.local> <CAOvn4qhyt9KL5oP+ZzreZ8KHK-eMJZvEgimJDsosXNiFYCVZ+w@mail.gmail.com> <CAHAreOrpmo=e9ksvMN4c_nFCHGWbAVkESEZkoAfvp6pbTAQnqA@mail.gmail.com> Message-ID: <21263.711.512920.378628@Ordinateur-de-Catherine-Konrad.local> Hi Thomas & Fernando, Thomas Kluyver writes: > I don't think there is a good way to get that: the design is > specifically that the kernel is an engine to run code, and should > not know where that code is coming from. Fernando Perez writes: > Konrad, Matthias' recent description is a great one: it's like > asking a book about the color of the eyes of its reader. That > question is fundamentally ill-posed, as multiple people may > simultaneously read a book. I see your point view, which is that the notebook is just one way of interacting with a kernel. Given the I in IPython, that point of view is understandable. My point of view is different because my priority is documenting computations. I see a notebook as a document that describes what was done and which results were obtained. In the ActivePapers framework, I need to know where every bit of executed code comes from, because that's an important element in provenance tracking. A compromise that is compatible with both points of view is putting the provenance information for the code in the execute request sent to the kernel. This could be a notebook name, but also the process id of a qtconsole. It could be different for each execute request, and nothing would prevent a single notebook from sending requests to multiple kernels. > In IPython's case, the same applies: a kernel may be attached to a > notebook, but simultaneously to a terminal and a qtconsole. While > we hold fast on the idea that a notebook should only have *one* > kernel, we've even wondered if it could make sense to have multiple > notebooks connected to an single kernel (to operate on the same > namespace while breaking up the narrative into subdocuments more > conveniently). >From the "documenting a computation" point of view, that would require some clear link between the notebooks that share a kernel. A link that remains visible in the resulting notebook files. > You can probably write a magic that will call back out from the > kernel to the client JS and fetch the notebook path and would store > it in a variable in the user namespace, but my JS-fu isn't up to > snuff to write that right away. And you'd have to accept that it's > a hack with potentially ambiguous results (if for example we later > allow multiple notebooks to connect to the same kernel). It looks like I'll need some hack anyway to proceed. If that hack needs to be modified in the future, well, that's life on the bleeding edge ;-) Unfortunately my JS-fu isn't great either, so I'd be grateful for suggestions from the JS wizards in the audience. Konrad. From damianavila at gmail.com Thu Feb 27 06:48:17 2014 From: damianavila at gmail.com (=?ISO-8859-1?Q?Dami=E1n_Avila?=) Date: Thu, 27 Feb 2014 08:48:17 -0300 Subject: [IPython-dev] output toggle for slideviewer In-Reply-To: <1393410675380-5048766.post@n6.nabble.com> References: <1393410675380-5048766.post@n6.nabble.com> Message-ID: <CAH+mRR2a+2g-HdbybN7uCh9afwd+eOMZ2yeCZ+MgYkrC035Q0g@mail.gmail.com> Hi John, > So I'm thinking maybe a flag, or a separate slideviewer url bar or even > separate website for input-removed slides, would be a really great addition > to this tool. > > Slideviewer needs an update... it is currently running a very old version in Heroku. You can see the discussion here: https://github.com/ipython/nbviewer/issues/52 BTW, I have an WIP experimental branch (beware, I have to rebase it), which implements slideviewer as a clone of the new nbviewer: https://github.com/ipython/nbviewer/pull/150 So use can use it locally (is a python package) to render your slides without using nbconvert nor gh-pages... I will try work on it a little more and deploy it to Heroku... Regarding your idea about the "hide input" functionality, it is interesting and I can provide a way to do it without too much effort. I will take it into account. My final goal is a sweet integration of slideviewer into the official nbviewer app, but we need some things to be done first in nbviewer to finally integrate it (if the devs consensus want to have slideviewer as a part of nbviewer ;-)). Cheers. -- 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/20140227/2f78ee8f/attachment.html> From patrick.surry at gmail.com Thu Feb 27 07:24:51 2014 From: patrick.surry at gmail.com (Patrick Surry) Date: Thu, 27 Feb 2014 07:24:51 -0500 Subject: [IPython-dev] Best collaborative multi-user, multi-project notebook workflow? Message-ID: <CAA-tCo50AWjJo4NpG=4anJWojB8tWn8G1smm25Mm6QOD-WRrVw@mail.gmail.com> To date I've mainly been using ipython notebook to do data analysis with pandas in a single-user mode: pull data to my local machine, set up a notebook, do some analysis, share some output. If anything, my main complaint has been lack of multi-directory support (eagerly awaiting its arrival!), leading me to store all my notebooks in a single folder, which is getting a bit unwieldy, but somehow feels easier/safer than trying to manage multiple notebook servers in a multitude of directories and keeping track of which notebooks/shells are still running etc. Anyway, I'm thinking about how to expand to a team > 1, and looking for recommendations about how to share, collaborate on, manage and archive multiple notebook projects. Should everyone run ipython on a shared server, or does each user keep local and use git or the like to share? In general can multiple user changes to a notebook be safely merged with git without breaking its structure? Is there a good way to experiment with multi-directory support yet, or is UI still a blocker? Any other best practice recommendations? Thanks, Patrick -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140227/5da08bc6/attachment.html> From doug.blank at gmail.com Thu Feb 27 07:53:39 2014 From: doug.blank at gmail.com (Doug Blank) Date: Thu, 27 Feb 2014 07:53:39 -0500 Subject: [IPython-dev] Camera widget In-Reply-To: <530ECF88.4020404@creativetrax.com> References: <530CE149.5000502@creativetrax.com> <CAAusYChaXO0hMe6GXL+EvfWutkTd68SacsOV0uJ-v+94mAAsXw@mail.gmail.com> <530E751F.4030208@creativetrax.com> <CAAusYCiz1yRattwdJ+e08F+P6Ytqr5=S7bsUQPuoSvazaoSGpQ@mail.gmail.com> <CAK=Phk69VMfL37wB8ErZtSO+NtGjBCEYki-MuoXXGwLiZzHisw@mail.gmail.com> <CAAusYCi0=M589KZR5JbqrW+LnFYNuWB9-jTMOajs2spSupJkfQ@mail.gmail.com> <530EAA03.30604@creativetrax.com> <530EABAB.9070009@creativetrax.com> <CAAusYCjwnyywCkNqOAZ0WG2n6jd6FGfGBGVRSXLk16Kguj92Hw@mail.gmail.com> <CAAusYCi1SKr2gw5kMciR7NwSbtyP7+aLTfYV9Ej36na7ZCnVrw@mail.gmail.com> <530ECF88.4020404@creativetrax.com> Message-ID: <CAAusYCgA+4GQF_f-M9rvM0zO8gmJqK1PdQ=0s+9cJGMwmi=M+A@mail.gmail.com> On Thu, Feb 27, 2014 at 12:39 AM, Jason Grout <jason-sage at creativetrax.com>wrote: > On 2/26/14 11:00 PM, Doug Blank wrote: > > Here is a puzzle: can you make a kernel-side script that will take a > > picture, *and* return it? It seems like you can't because the kernel > > can't handle receiving the image while at the same time run your code > > waiting for the message to come it. I guess you could do it with a > > non-blocking kernel? Yep, just tried it by putting our kernel in > > non-blocking mode. > > Can you elaborate on putting your kernel in non-blocking mode? > So in our kernel (ICalico), currently the only difference between blocking and unblocking is whether the server waits for the thread running the computation to finish (blocking) or not (non-blocking) before sending an kernel idle message. In fact, I just exposed this setting, so the user can control this. As a new user of IPython, I'm not sure how this maps onto the IPython Python kernel's usage of blocking/non-blocking. > > I suppose what you bring up a is more general problem---I probably can't > adjust a slider while some user code is executing and see the result in > the code, for example. > That is what it looks like to me. > > On the other hand, if the comm infrastructure supported a blocking mode, > where a message could be sent and then we block and wait for a reply, we > could do your picture-taking example. Just ask the camera to take the > picture, and then wait for the reply, just like asking for raw input and > waiting for a reply. > That sounds generally useful! In that manner, we can *programmatically* press the "Take Pic" button, wait for an variable update (or some message), handle the message, and then return the results. I'm not sure exactly how to implement it, but it sounds useful :) -Doug > > 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/20140227/fa18c0e2/attachment.html> From damianavila at gmail.com Thu Feb 27 07:54:22 2014 From: damianavila at gmail.com (=?ISO-8859-1?Q?Dami=E1n_Avila?=) Date: Thu, 27 Feb 2014 09:54:22 -0300 Subject: [IPython-dev] Best collaborative multi-user, multi-project notebook workflow? In-Reply-To: <CAA-tCo50AWjJo4NpG=4anJWojB8tWn8G1smm25Mm6QOD-WRrVw@mail.gmail.com> References: <CAA-tCo50AWjJo4NpG=4anJWojB8tWn8G1smm25Mm6QOD-WRrVw@mail.gmail.com> Message-ID: <CAH+mRR0mCjaLTUfMo--mxgh9a+wDkC=7p6L8Bik4RrZ3M5dDVQ@mail.gmail.com> Some quick answer... but essentially, a lot of the thinks you are asking are planned to be developed during this year... > Anyway, I'm thinking about how to expand to a team > 1, and looking for > recommendations about how to share, collaborate on, manage and archive > multiple notebook projects. Should everyone run ipython on a shared > server, or does each user keep local and use git or the like to share? > A first version of multi-user notebook is planned to begin the development after the release of 2.0. and it is probably the main feature for the next 6 month cycle. But, right now, the multi-user capabilities are non-existing and you have share your notebooks with others if you want to collaborate with them. > In general can multiple user changes to a notebook be safely merged with > git without breaking its structure? > No, there will be some problems, but it is planned to support some sort of diff and merge function inside IPython. > Is there a good way to experiment with multi-directory support yet, or is > UI still a blocker? > In master, and in the next upcoming release, you have the capability to navigate directories from the dashboard. > Any other best practice recommendations? > > Probably all your needs will be covered in a couple of months ;-) > Thanks, > Patrick > > > > _______________________________________________ > 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/20140227/b1962e90/attachment.html> From moorepants at gmail.com Thu Feb 27 07:58:29 2014 From: moorepants at gmail.com (Jason Moore) Date: Thu, 27 Feb 2014 07:58:29 -0500 Subject: [IPython-dev] Best collaborative multi-user, multi-project notebook workflow? In-Reply-To: <CAH+mRR0mCjaLTUfMo--mxgh9a+wDkC=7p6L8Bik4RrZ3M5dDVQ@mail.gmail.com> References: <CAA-tCo50AWjJo4NpG=4anJWojB8tWn8G1smm25Mm6QOD-WRrVw@mail.gmail.com> <CAH+mRR0mCjaLTUfMo--mxgh9a+wDkC=7p6L8Bik4RrZ3M5dDVQ@mail.gmail.com> Message-ID: <CAP7f1AhpiMVHwzB2h15=9RnPNHFhKssy+iwn_rnYyEu5ycxmEQ@mail.gmail.com> You could try sagemathcloud which has support for IPython notebooks and real time collaborative editing of them. Jason moorepants.info +01 530-601-9791 On Thu, Feb 27, 2014 at 7:54 AM, Dami?n Avila <damianavila at gmail.com> wrote: > Some quick answer... but essentially, a lot of the thinks you are asking > are planned to be developed during this year... > > >> Anyway, I'm thinking about how to expand to a team > 1, and looking for >> recommendations about how to share, collaborate on, manage and archive >> multiple notebook projects. Should everyone run ipython on a shared >> server, or does each user keep local and use git or the like to share? >> > > A first version of multi-user notebook is planned to begin the development > after the release of 2.0. and it is probably the main feature for the next > 6 month cycle. But, right now, the multi-user capabilities are non-existing > and you have share your notebooks with others if you want to collaborate > with them. > > > >> In general can multiple user changes to a notebook be safely merged with >> git without breaking its structure? >> > > No, there will be some problems, but it is planned to support some sort of > diff and merge function inside IPython. > > >> Is there a good way to experiment with multi-directory support yet, or is >> UI still a blocker? >> > > In master, and in the next upcoming release, you have the capability to > navigate directories from the dashboard. > > >> Any other best practice recommendations? >> >> > Probably all your needs will be covered in a couple of months ;-) > > >> Thanks, >> Patrick >> >> >> >> _______________________________________________ >> 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/20140227/22f73d28/attachment.html> From doug.blank at gmail.com Thu Feb 27 07:59:07 2014 From: doug.blank at gmail.com (Doug Blank) Date: Thu, 27 Feb 2014 07:59:07 -0500 Subject: [IPython-dev] Best collaborative multi-user, multi-project notebook workflow? In-Reply-To: <CAA-tCo50AWjJo4NpG=4anJWojB8tWn8G1smm25Mm6QOD-WRrVw@mail.gmail.com> References: <CAA-tCo50AWjJo4NpG=4anJWojB8tWn8G1smm25Mm6QOD-WRrVw@mail.gmail.com> Message-ID: <CAAusYCgEyaUwYj2i9MNCChjCfj_MB9EaAGYoNhSA9x7Po7Bh2w@mail.gmail.com> On Thu, Feb 27, 2014 at 7:24 AM, Patrick Surry <patrick.surry at gmail.com>wrote: > To date I've mainly been using ipython notebook to do data analysis with > pandas in a single-user mode: pull data to my local machine, set up a > notebook, do some analysis, share some output. If anything, my main > complaint has been lack of multi-directory support (eagerly awaiting its > arrival!), leading me to store all my notebooks in a single folder, which > is getting a bit unwieldy, but somehow feels easier/safer than trying to > manage multiple notebook servers in a multitude of directories and keeping > track of which notebooks/shells are still running etc. > > Anyway, I'm thinking about how to expand to a team > 1, and looking for > recommendations about how to share, collaborate on, manage and archive > multiple notebook projects. Should everyone run ipython on a shared > server, or does each user keep local and use git or the like to share? In > general can multiple user changes to a notebook be safely merged with git > without breaking its structure? Is there a good way to experiment with > multi-directory support yet, or is UI still a blocker? Any other best > practice recommendations? > > Have you looked at Sage's recent IPython interface? The recent changes [1] are very interesting, allowing multi-users to edit the same document simultaneously. I think it serves as a nice prototype of what an IPython server can do. [1] - http://sagemath.blogspot.com/2013/09/ipython-notebooks-in-cloud-with.html -Doug > Thanks, > 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/20140227/a6446634/attachment.html> From damianavila at gmail.com Thu Feb 27 08:03:07 2014 From: damianavila at gmail.com (=?ISO-8859-1?Q?Dami=E1n_Avila?=) Date: Thu, 27 Feb 2014 10:03:07 -0300 Subject: [IPython-dev] Best collaborative multi-user, multi-project notebook workflow? In-Reply-To: <CAP7f1AhpiMVHwzB2h15=9RnPNHFhKssy+iwn_rnYyEu5ycxmEQ@mail.gmail.com> References: <CAA-tCo50AWjJo4NpG=4anJWojB8tWn8G1smm25Mm6QOD-WRrVw@mail.gmail.com> <CAH+mRR0mCjaLTUfMo--mxgh9a+wDkC=7p6L8Bik4RrZ3M5dDVQ@mail.gmail.com> <CAP7f1AhpiMVHwzB2h15=9RnPNHFhKssy+iwn_rnYyEu5ycxmEQ@mail.gmail.com> Message-ID: <CAH+mRR17=AfR5GqdnUagoc+5WQai-9w7MSNM9D2HjKpP8jFqag@mail.gmail.com> Very good suggestion I forgot to add... I was just thinking from the IPython perspective ;-) Thanks. 2014-02-27 9:58 GMT-03:00 Jason Moore <moorepants at gmail.com>: > You could try sagemathcloud which has support for IPython notebooks and > real time collaborative editing of them. > > > Jason > moorepants.info > +01 530-601-9791 > > > On Thu, Feb 27, 2014 at 7:54 AM, Dami?n Avila <damianavila at gmail.com>wrote: > >> Some quick answer... but essentially, a lot of the thinks you are asking >> are planned to be developed during this year... >> >> >>> Anyway, I'm thinking about how to expand to a team > 1, and looking for >>> recommendations about how to share, collaborate on, manage and archive >>> multiple notebook projects. Should everyone run ipython on a shared >>> server, or does each user keep local and use git or the like to share? >>> >> >> A first version of multi-user notebook is planned to begin the >> development after the release of 2.0. and it is probably the main feature >> for the next 6 month cycle. But, right now, the multi-user capabilities are >> non-existing and you have share your notebooks with others if you want to >> collaborate with them. >> >> >> >>> In general can multiple user changes to a notebook be safely merged with >>> git without breaking its structure? >>> >> >> No, there will be some problems, but it is planned to support some sort >> of diff and merge function inside IPython. >> >> >>> Is there a good way to experiment with multi-directory support yet, or >>> is UI still a blocker? >>> >> >> In master, and in the next upcoming release, you have the capability to >> navigate directories from the dashboard. >> >> >>> Any other best practice recommendations? >>> >>> >> Probably all your needs will be covered in a couple of months ;-) >> >> >>> Thanks, >>> Patrick >>> >>> >>> >>> _______________________________________________ >>> 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 > > -- 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/20140227/44bbdd27/attachment.html> From j.davidgriffiths at gmail.com Thu Feb 27 08:54:34 2014 From: j.davidgriffiths at gmail.com (JGrif) Date: Thu, 27 Feb 2014 05:54:34 -0800 (PST) Subject: [IPython-dev] output toggle for slideviewer In-Reply-To: <CAH+mRR2a+2g-HdbybN7uCh9afwd+eOMZ2yeCZ+MgYkrC035Q0g@mail.gmail.com> References: <1393410675380-5048766.post@n6.nabble.com> <CAH+mRR2a+2g-HdbybN7uCh9afwd+eOMZ2yeCZ+MgYkrC035Q0g@mail.gmail.com> Message-ID: <CACcz1g3T2M53=M2Vadv_YBg0V_gZeVR_Q9Xmvwn94Muw=M6kFg@mail.gmail.com> Cool, thanks for the info. The new nbviewer stuff looks really handy. ...Although - and apologies for labouring the point - imho one of the best things about nbviewer and slideviewer is the fact that they are in the cloud, and so make it easy to share content with non-python people. Who are (still..) in the majority. So just saying, cloud stuff would get my vote for priority over local stuff in that area. They broaden scope of the 'ecosystem'* considerably. Anywayz, keep up the good work :) *(sorry for the heinous commercial jarg..) On 27 February 2014 11:48, Dami?n Avila [via Python] < ml-node+s6n5048897h3 at n6.nabble.com> wrote: > Hi John, > > >> So I'm thinking maybe a flag, or a separate slideviewer url bar or even >> separate website for input-removed slides, would be a really great >> addition >> to this tool. >> >> > Slideviewer needs an update... it is currently running a very old version > in Heroku. > You can see the discussion here: > https://github.com/ipython/nbviewer/issues/52 > > BTW, I have an WIP experimental branch (beware, I have to rebase it), > which implements slideviewer as a clone of the new nbviewer: > https://github.com/ipython/nbviewer/pull/150 > So use can use it locally (is a python package) to render your slides > without using nbconvert nor gh-pages... > > I will try work on it a little more and deploy it to Heroku... > > Regarding your idea about the "hide input" functionality, it is > interesting and I can provide a way to do it without too much effort. I > will take it into account. > > My final goal is a sweet integration of slideviewer into the official > nbviewer app, but we need some things to be done first in nbviewer to > finally integrate it (if the devs consensus want to have slideviewer as a > part of nbviewer ;-)). > > Cheers. > > -- > Dami?n Avila > Scientific Python Developer > Quantitative Finance Analyst > Statistics, Biostatistics and Econometrics Consultant > Biochemist > > _______________________________________________ > IPython-dev mailing list > [hidden email] <http://user/SendEmail.jtp?type=node&node=5048897&i=0> > http://mail.scipy.org/mailman/listinfo/ipython-dev > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://python.6.x6.nabble.com/output-toggle-for-slideviewer-tp5048766p5048897.html > To unsubscribe from output toggle for slideviewer, click here<http://python.6.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5048766&code=ai5kYXZpZGdyaWZmaXRoc0BnbWFpbC5jb218NTA0ODc2NnwtNTkxODE0MjAx> > . > NAML<http://python.6.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > -- Mr. John Griffiths, MSc PhD Candidate Centre for Speech, Language, and the Brain Department of Experimental Psychology University of Cambridge, UK -- View this message in context: http://python.6.x6.nabble.com/output-toggle-for-slideviewer-tp5048766p5048918.html Sent from the IPython - Development mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140227/154fdd59/attachment.html> From damianavila at gmail.com Thu Feb 27 09:33:44 2014 From: damianavila at gmail.com (=?ISO-8859-1?Q?Dami=E1n_Avila?=) Date: Thu, 27 Feb 2014 11:33:44 -0300 Subject: [IPython-dev] output toggle for slideviewer In-Reply-To: <CACcz1g3T2M53=M2Vadv_YBg0V_gZeVR_Q9Xmvwn94Muw=M6kFg@mail.gmail.com> References: <1393410675380-5048766.post@n6.nabble.com> <CAH+mRR2a+2g-HdbybN7uCh9afwd+eOMZ2yeCZ+MgYkrC035Q0g@mail.gmail.com> <CACcz1g3T2M53=M2Vadv_YBg0V_gZeVR_Q9Xmvwn94Muw=M6kFg@mail.gmail.com> Message-ID: <CAH+mRR1rWxBCkMNKf+5ZUEh0qZTW7oPbnyKkRzAMrznxh_kvxQ@mail.gmail.com> I agree with you, this is the cause, I have deployed to Heroku in the past. And I will deploy the updated version too ;-) , at least until I figured out the a way to integrate it to nbviewer... Cheers. 2014-02-27 10:54 GMT-03:00 JGrif <j.davidgriffiths at gmail.com>: > > Cool, thanks for the info. > > The new nbviewer stuff looks really handy. > > ...Although - and apologies for labouring the point - imho one of the best > things about nbviewer and slideviewer is the fact that they are in the > cloud, and so make it easy to share content with non-python people. Who are > (still..) in the majority. So just saying, cloud stuff would get my vote > for priority over local stuff in that area. They broaden scope of the > 'ecosystem'* considerably. > > Anywayz, keep up the good work :) > > > > *(sorry for the heinous commercial jarg..) > > > > > > On 27 February 2014 11:48, Dami?n Avila [via Python] <[hidden email]<http://user/SendEmail.jtp?type=node&node=5048918&i=0> > > wrote: > >> Hi John, >> >> >>> So I'm thinking maybe a flag, or a separate slideviewer url bar or even >>> separate website for input-removed slides, would be a really great >>> addition >>> to this tool. >>> >>> >> Slideviewer needs an update... it is currently running a very old version >> in Heroku. >> You can see the discussion here: >> https://github.com/ipython/nbviewer/issues/52 >> >> BTW, I have an WIP experimental branch (beware, I have to rebase it), >> which implements slideviewer as a clone of the new nbviewer: >> https://github.com/ipython/nbviewer/pull/150 >> So use can use it locally (is a python package) to render your slides >> without using nbconvert nor gh-pages... >> >> I will try work on it a little more and deploy it to Heroku... >> >> Regarding your idea about the "hide input" functionality, it is >> interesting and I can provide a way to do it without too much effort. I >> will take it into account. >> >> My final goal is a sweet integration of slideviewer into the official >> nbviewer app, but we need some things to be done first in nbviewer to >> finally integrate it (if the devs consensus want to have slideviewer as a >> part of nbviewer ;-)). >> >> Cheers. >> >> -- >> Dami?n Avila >> Scientific Python Developer >> Quantitative Finance Analyst >> Statistics, Biostatistics and Econometrics Consultant >> Biochemist >> >> _______________________________________________ >> IPython-dev mailing list >> [hidden email] <http://user/SendEmail.jtp?type=node&node=5048897&i=0> >> http://mail.scipy.org/mailman/listinfo/ipython-dev >> >> >> ------------------------------ >> If you reply to this email, your message will be added to the >> discussion below: >> >> http://python.6.x6.nabble.com/output-toggle-for-slideviewer-tp5048766p5048897.html >> To unsubscribe from output toggle for slideviewer, click here. >> NAML<http://python.6.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> >> > > > > -- > > Mr. John Griffiths, MSc > > PhD Candidate > > Centre for Speech, Language, and the Brain > > Department of Experimental Psychology > > University of Cambridge, UK > > ------------------------------ > View this message in context: Re: output toggle for slideviewer<http://python.6.x6.nabble.com/output-toggle-for-slideviewer-tp5048766p5048918.html> > > Sent from the IPython - Development mailing list archive<http://python.6.x6.nabble.com/IPython-Development-f1646922.html>at Nabble.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/20140227/924e3f33/attachment.html> From jason-sage at creativetrax.com Thu Feb 27 09:34:47 2014 From: jason-sage at creativetrax.com (Jason Grout) Date: Thu, 27 Feb 2014 08:34:47 -0600 Subject: [IPython-dev] Camera widget In-Reply-To: <CAAusYCgA+4GQF_f-M9rvM0zO8gmJqK1PdQ=0s+9cJGMwmi=M+A@mail.gmail.com> References: <530CE149.5000502@creativetrax.com> <CAAusYChaXO0hMe6GXL+EvfWutkTd68SacsOV0uJ-v+94mAAsXw@mail.gmail.com> <530E751F.4030208@creativetrax.com> <CAAusYCiz1yRattwdJ+e08F+P6Ytqr5=S7bsUQPuoSvazaoSGpQ@mail.gmail.com> <CAK=Phk69VMfL37wB8ErZtSO+NtGjBCEYki-MuoXXGwLiZzHisw@mail.gmail.com> <CAAusYCi0=M589KZR5JbqrW+LnFYNuWB9-jTMOajs2spSupJkfQ@mail.gmail.com> <530EAA03.30604@creativetrax.com> <530EABAB.9070009@creativetrax.com> <CAAusYCjwnyywCkNqOAZ0WG2n6jd6FGfGBGVRSXLk16Kguj92Hw@mail.gmail.com> <CAAusYCi1SKr2gw5kMciR7NwSbtyP7+aLTfYV9Ej36na7ZCnVrw@mail.gmail.com> <530ECF88.4020404@creativetrax.com> <CAAusYCgA+4GQF_f-M9rvM0zO8gmJqK1PdQ=0s+9cJGMwmi=M+A@mail.gmail.com> Message-ID: <530F4D07.6090603@creativetrax.com> On 2/27/14 6:53 AM, Doug Blank wrote: > On Thu, Feb 27, 2014 at 12:39 AM, Jason Grout > <jason-sage at creativetrax.com <mailto:jason-sage at creativetrax.com>> wrote: > > On 2/26/14 11:00 PM, Doug Blank wrote: > > Here is a puzzle: can you make a kernel-side script that will take a > > picture, *and* return it? It seems like you can't because the kernel > > can't handle receiving the image while at the same time run your code > > waiting for the message to come it. I guess you could do it with a > > non-blocking kernel? Yep, just tried it by putting our kernel in > > non-blocking mode. > > Can you elaborate on putting your kernel in non-blocking mode? > > > So in our kernel (ICalico), currently the only difference between > blocking and unblocking is whether the server waits for the thread > running the computation to finish (blocking) or not (non-blocking) > before sending an kernel idle message. In fact, I just exposed this > setting, so the user can control this. As a new user of IPython, I'm not > sure how this maps onto the IPython Python kernel's usage of > blocking/non-blocking. > Do you run each computation in a separate thread? Who manages the communication channels---do you send separately from each thread, or do you have a main thread coordinating all communication? I think it would be interesting to explore non-blocking computation threads. I've explored this in the past with Sage in interacting with widgets (trying to get it so that I could move a slider to update a value in an ongoing computation in real time), and my experiments gave reason to hope it might work out. In the current IPython model, I think you have to write non-blocking stuff in a callback-oriented manner: You do a short computation and then set up callbacks to respond to events. I essentially do this in my sagecell camera widget demo (http://sagecell.sagemath.org/?q=htlcsf) > > I suppose what you bring up a is more general problem---I probably can't > adjust a slider while some user code is executing and see the result in > the code, for example. > > > That is what it looks like to me. > > > On the other hand, if the comm infrastructure supported a blocking mode, > where a message could be sent and then we block and wait for a reply, we > could do your picture-taking example. Just ask the camera to take the > picture, and then wait for the reply, just like asking for raw input and > waiting for a reply. > > > That sounds generally useful! In that manner, we can *programmatically* > press the "Take Pic" button, wait for an variable update (or some > message), handle the message, and then return the results. I'm not sure > exactly how to implement it, but it sounds useful :) Again, I essentially do this in my sagecell link, but it has to be callback-driven. It would be nice if it could be written in coroutine style using yield, for example: c=CameraWidget() pic = yield c.take_pic() display(pic) Jason From doug.blank at gmail.com Thu Feb 27 10:09:49 2014 From: doug.blank at gmail.com (Doug Blank) Date: Thu, 27 Feb 2014 10:09:49 -0500 Subject: [IPython-dev] Camera widget In-Reply-To: <530F4D07.6090603@creativetrax.com> References: <530CE149.5000502@creativetrax.com> <CAAusYChaXO0hMe6GXL+EvfWutkTd68SacsOV0uJ-v+94mAAsXw@mail.gmail.com> <530E751F.4030208@creativetrax.com> <CAAusYCiz1yRattwdJ+e08F+P6Ytqr5=S7bsUQPuoSvazaoSGpQ@mail.gmail.com> <CAK=Phk69VMfL37wB8ErZtSO+NtGjBCEYki-MuoXXGwLiZzHisw@mail.gmail.com> <CAAusYCi0=M589KZR5JbqrW+LnFYNuWB9-jTMOajs2spSupJkfQ@mail.gmail.com> <530EAA03.30604@creativetrax.com> <530EABAB.9070009@creativetrax.com> <CAAusYCjwnyywCkNqOAZ0WG2n6jd6FGfGBGVRSXLk16Kguj92Hw@mail.gmail.com> <CAAusYCi1SKr2gw5kMciR7NwSbtyP7+aLTfYV9Ej36na7ZCnVrw@mail.gmail.com> <530ECF88.4020404@creativetrax.com> <CAAusYCgA+4GQF_f-M9rvM0zO8gmJqK1PdQ=0s+9cJGMwmi=M+A@mail.gmail.com> <530F4D07.6090603@creativetrax.com> Message-ID: <CAAusYCjLsutR6tC3Jv=U6yaKdeZ6m=Zzt7i9BvgBWiyEH30CgQ@mail.gmail.com> On Thu, Feb 27, 2014 at 9:34 AM, Jason Grout <jason-sage at creativetrax.com>wrote: > On 2/27/14 6:53 AM, Doug Blank wrote: > > On Thu, Feb 27, 2014 at 12:39 AM, Jason Grout > > <jason-sage at creativetrax.com <mailto:jason-sage at creativetrax.com>> > wrote: > > > > On 2/26/14 11:00 PM, Doug Blank wrote: > > > Here is a puzzle: can you make a kernel-side script that will > take a > > > picture, *and* return it? It seems like you can't because the > kernel > > > can't handle receiving the image while at the same time run your > code > > > waiting for the message to come it. I guess you could do it with a > > > non-blocking kernel? Yep, just tried it by putting our kernel in > > > non-blocking mode. > > > > Can you elaborate on putting your kernel in non-blocking mode? > > > > > > So in our kernel (ICalico), currently the only difference between > > blocking and unblocking is whether the server waits for the thread > > running the computation to finish (blocking) or not (non-blocking) > > before sending an kernel idle message. In fact, I just exposed this > > setting, so the user can control this. As a new user of IPython, I'm not > > sure how this maps onto the IPython Python kernel's usage of > > blocking/non-blocking. > > > > > Do you run each computation in a separate thread? Who manages the > communication channels---do you send separately from each thread, or do > you have a main thread coordinating all communication? > Yes, each bit of computation runs in a (currently singleton) thread. That way, if we receive an interrupt (control+c) we just kill that thread. Usually, we .Join() on that thread to make it blocking. If you don't issue a .Join() then the kernel can receive another command. What we do not have yet is a way of *managing* multiple threads of computation running simultaneously. So, you'd want to keep the outputs going to the right place (maybe not possible in our kernel), and be able to interrupt all running threads (possible). Maybe that is all that is needed? (I just realized that we could have some magics that handle these cases... run cell in a thread, return the thread id, cancel a thread, etc. You would effectively say: run this cell in the background. I could think of some use cases for that (we program a lot of robots). I guess you could do this in the IPython Python kernel too by just manually creating threads). > > I think it would be interesting to explore non-blocking computation > threads. I've explored this in the past with Sage in interacting with > widgets (trying to get it so that I could move a slider to update a > value in an ongoing computation in real time), and my experiments gave > reason to hope it might work out. > Oh, right. I was thinking about doing that demo today (we have a tone generator that sends the wave data to the sound system). But you are right that that wouldn't work (without running it in a thread). > > In the current IPython model, I think you have to write non-blocking > stuff in a callback-oriented manner: You do a short computation and then > set up callbacks to respond to events. I essentially do this in my > sagecell camera widget demo (http://sagecell.sagemath.org/?q=htlcsf) > Yep. We stole your code :) and made a built-in CameraWidget in Calico. http://nbviewer.ipython.org/urls/bitbucket.org/ipre/calico/raw/master/notebooks/Camera%20with%20Calico.ipynb Our system is still wildly under development and code is rough; here is the relevant thread code: https://bitbucket.org/ipre/calico/src/master/Source/Calico/ZMQServer.cs?at=master#cl-878 It would be cool someday to have Calico as a viable kernel in Sage. (Of course, there are a lot of good kernels under development. We just got F# working as one of our languages, and some people might be interested in that reason alone.) -Doug > > > > > > > > > > > I suppose what you bring up a is more general problem---I probably > can't > > adjust a slider while some user code is executing and see the result > in > > the code, for example. > > > > > > That is what it looks like to me. > > > > > > On the other hand, if the comm infrastructure supported a blocking > mode, > > where a message could be sent and then we block and wait for a > reply, we > > could do your picture-taking example. Just ask the camera to take > the > > picture, and then wait for the reply, just like asking for raw input > and > > waiting for a reply. > > > > > > That sounds generally useful! In that manner, we can *programmatically* > > press the "Take Pic" button, wait for an variable update (or some > > message), handle the message, and then return the results. I'm not sure > > exactly how to implement it, but it sounds useful :) > > Again, I essentially do this in my sagecell link, but it has to be > callback-driven. It would be nice if it could be written in coroutine > style using yield, for example: > > c=CameraWidget() > pic = yield c.take_pic() > display(pic) > > 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/20140227/3d2c243e/attachment.html> From jason-sage at creativetrax.com Thu Feb 27 11:24:07 2014 From: jason-sage at creativetrax.com (Jason Grout) Date: Thu, 27 Feb 2014 10:24:07 -0600 Subject: [IPython-dev] Camera widget In-Reply-To: <CAAusYCi1SKr2gw5kMciR7NwSbtyP7+aLTfYV9Ej36na7ZCnVrw@mail.gmail.com> References: <530CE149.5000502@creativetrax.com> <CAAusYChaXO0hMe6GXL+EvfWutkTd68SacsOV0uJ-v+94mAAsXw@mail.gmail.com> <530E751F.4030208@creativetrax.com> <CAAusYCiz1yRattwdJ+e08F+P6Ytqr5=S7bsUQPuoSvazaoSGpQ@mail.gmail.com> <CAK=Phk69VMfL37wB8ErZtSO+NtGjBCEYki-MuoXXGwLiZzHisw@mail.gmail.com> <CAAusYCi0=M589KZR5JbqrW+LnFYNuWB9-jTMOajs2spSupJkfQ@mail.gmail.com> <530EAA03.30604@creativetrax.com> <530EABAB.9070009@creativetrax.com> <CAAusYCjwnyywCkNqOAZ0WG2n6jd6FGfGBGVRSXLk16Kguj92Hw@mail.gmail.com> <CAAusYCi1SKr2gw5kMciR7NwSbtyP7+aLTfYV9Ej36na7ZCnVrw@mail.gmail.com> Message-ID: <530F66A7.20502@creativetrax.com> On 2/26/14 11:00 PM, Doug Blank wrote: > BTW, if you give the button an id, <button id = picture_button>, then > you can: > > def click(self): > > display(Javascript("document.getElementById('picture_button').click();")); > > which will programmatically take a picture. But giving the button a specific single html id makes it so you can only have one such button on a page. Jason From jason-sage at creativetrax.com Thu Feb 27 11:28:08 2014 From: jason-sage at creativetrax.com (Jason Grout) Date: Thu, 27 Feb 2014 10:28:08 -0600 Subject: [IPython-dev] Camera widget In-Reply-To: <CAAusYCjLsutR6tC3Jv=U6yaKdeZ6m=Zzt7i9BvgBWiyEH30CgQ@mail.gmail.com> References: <530CE149.5000502@creativetrax.com> <CAAusYChaXO0hMe6GXL+EvfWutkTd68SacsOV0uJ-v+94mAAsXw@mail.gmail.com> <530E751F.4030208@creativetrax.com> <CAAusYCiz1yRattwdJ+e08F+P6Ytqr5=S7bsUQPuoSvazaoSGpQ@mail.gmail.com> <CAK=Phk69VMfL37wB8ErZtSO+NtGjBCEYki-MuoXXGwLiZzHisw@mail.gmail.com> <CAAusYCi0=M589KZR5JbqrW+LnFYNuWB9-jTMOajs2spSupJkfQ@mail.gmail.com> <530EAA03.30604@creativetrax.com> <530EABAB.9070009@creativetrax.com> <CAAusYCjwnyywCkNqOAZ0WG2n6jd6FGfGBGVRSXLk16Kguj92Hw@mail.gmail.com> <CAAusYCi1SKr2gw5kMciR7NwSbtyP7+aLTfYV9Ej36na7ZCnVrw@mail.gmail.com> <530ECF88.4020404@creativetrax.com> <CAAusYCgA+4GQF_f-M9rvM0zO8gmJqK1PdQ=0s+9cJGMwmi=M+A@mail.gmail.com> <530F4D07.6090603@creativetrax.com> <CAAusYCjLsutR6tC3Jv=U6yaKdeZ6m=Zzt7i9BvgBWiyEH30CgQ@mail.gmail.com> Message-ID: <530F6798.3090702@creativetrax.com> On 2/27/14 9:09 AM, Doug Blank wrote: > (I just realized that we could have some magics that handle these > cases... run cell in a thread, return the thread id, cancel a thread, > etc. You would effectively say: run this cell in the background. I could > think of some use cases for that (we program a lot of robots). I guess > you could do this in the IPython Python kernel too by just manually > creating threads). > That would be interesting to explore doing this using magics. I don't know how the notebook handles multiple simultaneous kernel executions. It seems like you could make it work so that the message header on return messages was local to the thread, so different thread's messages would be routed to different handlers in the notebook. > It would be cool someday to have Calico as a viable kernel in Sage. (Of > course, there are a lot of good kernels under development. We just got > F# working as one of our languages, and some people might be interested > in that reason alone.) Does Calico work on unix (maybe via mono)? Sage doesn't work well on Windows natively because many of the component programs don't support Windows very well. Jason From takowl at gmail.com Thu Feb 27 11:46:48 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Thu, 27 Feb 2014 08:46:48 -0800 Subject: [IPython-dev] How to get the notebook name/path in the kernel? In-Reply-To: <21263.711.512920.378628@Ordinateur-de-Catherine-Konrad.local> References: <21262.9673.594236.921890@Konrad-Hinsens-MacBook-Pro-2.local> <CAOvn4qhyt9KL5oP+ZzreZ8KHK-eMJZvEgimJDsosXNiFYCVZ+w@mail.gmail.com> <CAHAreOrpmo=e9ksvMN4c_nFCHGWbAVkESEZkoAfvp6pbTAQnqA@mail.gmail.com> <21263.711.512920.378628@Ordinateur-de-Catherine-Konrad.local> Message-ID: <CAOvn4qh1sMJ5XHQSqscBEJVvbH4vE1g1LkHPqhcB2a2aieiD8Q@mail.gmail.com> On 27 Feb 2014 01:18, "Konrad Hinsen" <konrad.hinsen at fastmail.net> wrote: > > I see your point view, which is that the notebook is just one way of > interacting with a kernel. Given the I in IPython, that point of view > is understandable. > > My point of view is different because my priority is documenting > computations. I see a notebook as a document that describes what was > done and which results were obtained. In the ActivePapers framework, I > need to know where every bit of executed code comes from, because > that's an important element in provenance tracking. > > A compromise that is compatible with both points of view is putting > the provenance information for the code in the execute request sent to > the kernel. This could be a notebook name, but also the process id of > a qtconsole. It could be different for each execute request, and > nothing would prevent a single notebook from sending requests to > multiple kernels. Why does the provenance tracking need to happen in the kernel? The notebook server would seem like the better place to do it. Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140227/83cfdcc6/attachment.html> From doug.blank at gmail.com Thu Feb 27 11:50:40 2014 From: doug.blank at gmail.com (Doug Blank) Date: Thu, 27 Feb 2014 11:50:40 -0500 Subject: [IPython-dev] Camera widget In-Reply-To: <530F66A7.20502@creativetrax.com> References: <530CE149.5000502@creativetrax.com> <CAAusYChaXO0hMe6GXL+EvfWutkTd68SacsOV0uJ-v+94mAAsXw@mail.gmail.com> <530E751F.4030208@creativetrax.com> <CAAusYCiz1yRattwdJ+e08F+P6Ytqr5=S7bsUQPuoSvazaoSGpQ@mail.gmail.com> <CAK=Phk69VMfL37wB8ErZtSO+NtGjBCEYki-MuoXXGwLiZzHisw@mail.gmail.com> <CAAusYCi0=M589KZR5JbqrW+LnFYNuWB9-jTMOajs2spSupJkfQ@mail.gmail.com> <530EAA03.30604@creativetrax.com> <530EABAB.9070009@creativetrax.com> <CAAusYCjwnyywCkNqOAZ0WG2n6jd6FGfGBGVRSXLk16Kguj92Hw@mail.gmail.com> <CAAusYCi1SKr2gw5kMciR7NwSbtyP7+aLTfYV9Ej36na7ZCnVrw@mail.gmail.com> <530F66A7.20502@creativetrax.com> Message-ID: <CAAusYChRKGJ=7-QYT-Z_ZXvWAFwtrqJ+_e0UAG_vxp_VttT-5w@mail.gmail.com> On Thu, Feb 27, 2014 at 11:24 AM, Jason Grout <jason-sage at creativetrax.com>wrote: > On 2/26/14 11:00 PM, Doug Blank wrote: > > BTW, if you give the button an id, <button id = picture_button>, then > > you can: > > > > def click(self): > > > > > display(Javascript("document.getElementById('picture_button').click();")); > > > > which will programmatically take a picture. > > But giving the button a specific single html id makes it so you can only > have one such button on a page. > True, but would it make sense to have multiple interfaces to a single Camera? If you could select between the laptop camera and a USB camera, then we would definitely need different names. Is there a better way to identify the button? My JavaScript woo is small. -Doug > > 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/20140227/bb12db25/attachment.html> From konrad.hinsen at fastmail.net Thu Feb 27 11:56:17 2014 From: konrad.hinsen at fastmail.net (Konrad Hinsen) Date: Thu, 27 Feb 2014 17:56:17 +0100 Subject: [IPython-dev] How to get the notebook name/path in the kernel? In-Reply-To: <CAOvn4qh1sMJ5XHQSqscBEJVvbH4vE1g1LkHPqhcB2a2aieiD8Q@mail.gmail.com> References: <21262.9673.594236.921890@Konrad-Hinsens-MacBook-Pro-2.local> <CAOvn4qhyt9KL5oP+ZzreZ8KHK-eMJZvEgimJDsosXNiFYCVZ+w@mail.gmail.com> <CAHAreOrpmo=e9ksvMN4c_nFCHGWbAVkESEZkoAfvp6pbTAQnqA@mail.gmail.com> <21263.711.512920.378628@Ordinateur-de-Catherine-Konrad.local> <CAOvn4qh1sMJ5XHQSqscBEJVvbH4vE1g1LkHPqhcB2a2aieiD8Q@mail.gmail.com> Message-ID: <21263.28209.807997.815717@Konrad-Hinsens-MacBook-Pro-2.local> Thomas Kluyver writes: > Why does the provenance tracking need to happen in the kernel? The notebook server would > seem like the better place to do it. Provenance tracking in ActivePapers is part of code execution. Every time a codelet (the equivalent of a script in an ActivePaper) creates a dataset, directly or through a call to library code, the ActivePapers infrastructure notes the name of the codelet as a dependency. Notebooks are just codelets with a user interface, so the same rules apply. There is no way to figure out which datasets a notebook creates just by scanning its code, because the dataset could well be created in a library function. The notebook manager has nothing but the static code, so it can't handle provenance tracking. Konrad. From jason-sage at creativetrax.com Thu Feb 27 11:59:21 2014 From: jason-sage at creativetrax.com (Jason Grout) Date: Thu, 27 Feb 2014 10:59:21 -0600 Subject: [IPython-dev] Camera widget In-Reply-To: <CAAusYChRKGJ=7-QYT-Z_ZXvWAFwtrqJ+_e0UAG_vxp_VttT-5w@mail.gmail.com> References: <530CE149.5000502@creativetrax.com> <CAAusYChaXO0hMe6GXL+EvfWutkTd68SacsOV0uJ-v+94mAAsXw@mail.gmail.com> <530E751F.4030208@creativetrax.com> <CAAusYCiz1yRattwdJ+e08F+P6Ytqr5=S7bsUQPuoSvazaoSGpQ@mail.gmail.com> <CAK=Phk69VMfL37wB8ErZtSO+NtGjBCEYki-MuoXXGwLiZzHisw@mail.gmail.com> <CAAusYCi0=M589KZR5JbqrW+LnFYNuWB9-jTMOajs2spSupJkfQ@mail.gmail.com> <530EAA03.30604@creativetrax.com> <530EABAB.9070009@creativetrax.com> <CAAusYCjwnyywCkNqOAZ0WG2n6jd6FGfGBGVRSXLk16Kguj92Hw@mail.gmail.com> <CAAusYCi1SKr2gw5kMciR7NwSbtyP7+aLTfYV9Ej36na7ZCnVrw@mail.gmail.com> <530F66A7.20502@creativetrax.com> <CAAusYChRKGJ=7-QYT-Z_ZXvWAFwtrqJ+_e0UAG_vxp_VttT-5w@mail.gmail.com> Message-ID: <530F6EE9.6050207@creativetrax.com> On 2/27/14 10:50 AM, Doug Blank wrote: > True, but would it make sense to have multiple interfaces to a single > Camera? If you could select between the laptop camera and a USB camera, > then we would definitely need different names. Good point. We don't have a way to have a singleton widget yet. I was looking for a usecase for one, though. I essentially implemented singleton widgets in a PR the other day. > > Is there a better way to identify the button? My JavaScript woo is small. I'd just make some method on the widget, and have the widget trigger the click (or maybe just call the appropriate function). The widget already has the button DOM element stored. Jason From doug.blank at gmail.com Thu Feb 27 12:08:44 2014 From: doug.blank at gmail.com (Doug Blank) Date: Thu, 27 Feb 2014 12:08:44 -0500 Subject: [IPython-dev] Camera widget In-Reply-To: <530F6798.3090702@creativetrax.com> References: <530CE149.5000502@creativetrax.com> <CAAusYChaXO0hMe6GXL+EvfWutkTd68SacsOV0uJ-v+94mAAsXw@mail.gmail.com> <530E751F.4030208@creativetrax.com> <CAAusYCiz1yRattwdJ+e08F+P6Ytqr5=S7bsUQPuoSvazaoSGpQ@mail.gmail.com> <CAK=Phk69VMfL37wB8ErZtSO+NtGjBCEYki-MuoXXGwLiZzHisw@mail.gmail.com> <CAAusYCi0=M589KZR5JbqrW+LnFYNuWB9-jTMOajs2spSupJkfQ@mail.gmail.com> <530EAA03.30604@creativetrax.com> <530EABAB.9070009@creativetrax.com> <CAAusYCjwnyywCkNqOAZ0WG2n6jd6FGfGBGVRSXLk16Kguj92Hw@mail.gmail.com> <CAAusYCi1SKr2gw5kMciR7NwSbtyP7+aLTfYV9Ej36na7ZCnVrw@mail.gmail.com> <530ECF88.4020404@creativetrax.com> <CAAusYCgA+4GQF_f-M9rvM0zO8gmJqK1PdQ=0s+9cJGMwmi=M+A@mail.gmail.com> <530F4D07.6090603@creativetrax.com> <CAAusYCjLsutR6tC3Jv=U6yaKdeZ6m=Zzt7i9BvgBWiyEH30CgQ@mail.gmail.com> <530F6798.3090702@creativetrax.com> Message-ID: <CAAusYChRAMtQX_JDry6rxhMgk8OpjfWVR3nOyGPb7Vk9sWB=qg@mail.gmail.com> On Thu, Feb 27, 2014 at 11:28 AM, Jason Grout <jason-sage at creativetrax.com>wrote: > On 2/27/14 9:09 AM, Doug Blank wrote: > > (I just realized that we could have some magics that handle these > > cases... run cell in a thread, return the thread id, cancel a thread, > > etc. You would effectively say: run this cell in the background. I could > > think of some use cases for that (we program a lot of robots). I guess > > you could do this in the IPython Python kernel too by just manually > > creating threads). > > > > That would be interesting to explore doing this using magics. I don't > know how the notebook handles multiple simultaneous kernel executions. > It seems like you could make it work so that the message header on > return messages was local to the thread, so different thread's messages > would be routed to different handlers in the notebook. > In order to route a language's standard output, we have redirected all output to whatever the current cell is. There may be some manner to associate output to its thread, and then route that to the proper cell. But I don't see a lot of use for the complexity just yet. > > It would be cool someday to have Calico as a viable kernel in Sage. (Of > > course, there are a lot of good kernels under development. We just got > > F# working as one of our languages, and some people might be interested > > in that reason alone.) > > Does Calico work on unix (maybe via mono)? > Yes :) In fact it works on Windows via mono. And OS X via mono. I smile because it is a common assumption if I mention something like C# or F# that we have some Windows bias. But ain't so. > Sage doesn't work well on Windows natively because many of the component > programs don't support Windows very well. > I, personally, do all of my development on Linux, but we make sure that whatever we create works on the major operating systems. It is quite a nice system in that we only have one set of "binaries" that work everywhere. Calico as a IPython kernel is interesting because it allows programming in Java, Ruby, F#, Scheme, assembly (and 15 other languages) as first class IPython languages (eg, not running via a process or shell). Thus, you should be able to use our CameraWidget directly in all of those languages. -Doug > > 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/20140227/ce482451/attachment.html> From jason-sage at creativetrax.com Thu Feb 27 12:11:55 2014 From: jason-sage at creativetrax.com (Jason Grout) Date: Thu, 27 Feb 2014 11:11:55 -0600 Subject: [IPython-dev] Camera widget In-Reply-To: <CAAusYChRAMtQX_JDry6rxhMgk8OpjfWVR3nOyGPb7Vk9sWB=qg@mail.gmail.com> References: <530CE149.5000502@creativetrax.com> <CAAusYChaXO0hMe6GXL+EvfWutkTd68SacsOV0uJ-v+94mAAsXw@mail.gmail.com> <530E751F.4030208@creativetrax.com> <CAAusYCiz1yRattwdJ+e08F+P6Ytqr5=S7bsUQPuoSvazaoSGpQ@mail.gmail.com> <CAK=Phk69VMfL37wB8ErZtSO+NtGjBCEYki-MuoXXGwLiZzHisw@mail.gmail.com> <CAAusYCi0=M589KZR5JbqrW+LnFYNuWB9-jTMOajs2spSupJkfQ@mail.gmail.com> <530EAA03.30604@creativetrax.com> <530EABAB.9070009@creativetrax.com> <CAAusYCjwnyywCkNqOAZ0WG2n6jd6FGfGBGVRSXLk16Kguj92Hw@mail.gmail.com> <CAAusYCi1SKr2gw5kMciR7NwSbtyP7+aLTfYV9Ej36na7ZCnVrw@mail.gmail.com> <530ECF88.4020404@creativetrax.com> <CAAusYCgA+4GQF_f-M9rvM0zO8gmJqK1PdQ=0s+9cJGMwmi=M+A@mail.gmail.com> <530F4D07.6090603@creativetrax.com> <CAAusYCjLsutR6tC3Jv=U6yaKdeZ6m=Zzt7i9BvgBWiyEH30CgQ@mail.gmail.com> <530F6798.3090702@creativetrax.com> <CAAusYChRAMtQX_JDry6rxhMgk8OpjfWVR3nOyGPb7Vk9sWB=qg@mail.gmail.com> Message-ID: <530F71DB.7060806@creativetrax.com> On 2/27/14 11:08 AM, Doug Blank wrote: > Yes :) In fact it works on Windows via mono. And OS X via mono. I smile > because it is a common assumption if I mention something like C# or F# > that we have some Windows bias. But ain't so. Cool. I've wanted to experiment with F# for a while now; this may be a convenient way to do it. Jason From sychan at lbl.gov Thu Feb 27 14:02:41 2014 From: sychan at lbl.gov (Stephen Chan) Date: Thu, 27 Feb 2014 11:02:41 -0800 Subject: [IPython-dev] How to get the notebook name/path in the kernel? In-Reply-To: <21263.711.512920.378628@Ordinateur-de-Catherine-Konrad.local> References: <21262.9673.594236.921890@Konrad-Hinsens-MacBook-Pro-2.local> <CAOvn4qhyt9KL5oP+ZzreZ8KHK-eMJZvEgimJDsosXNiFYCVZ+w@mail.gmail.com> <CAHAreOrpmo=e9ksvMN4c_nFCHGWbAVkESEZkoAfvp6pbTAQnqA@mail.gmail.com> <21263.711.512920.378628@Ordinateur-de-Catherine-Konrad.local> Message-ID: <CA+n9YfqNik7Z96bq8QyfzJBhXEr_L3rT859Vmx92s=7YQiTVQg@mail.gmail.com> We do provenance tracking in the KBase Narrative as well, or rather, we have an infrastructure to do provenance tracking, but only somewhat early stage integration with our IPython environment. It might be interesting to compare notes at some point. But back to your original question - the easiest way to do this might be to bind a front end JS handler to a kernel ready event, and have that push the notebook name into os.environ['notebook_name']. We do that for some front end data that needs to get back into the kernel. Depending on how you want to track your notebook, maybe you want something from the JS front end like the value of IPython.notebook.metadata.name So something like this: var initEnvironment = function(name,value) { try { var cmd = "import os\n" + "os.environ['" + name + "'] = '" + value + "'\n"; IPython.notebook.kernel.execute(cmd, {}, {'silent' : true}); } catch (error) { console.log("Doh! It didn't work!"); } }; $([IPython.events]).one('status_started.Kernel', function() { initEnvironment('notebook_name', IPython.notebook.metadata.name); }); I'm not really a JS guru myself, I got this working a few months ago and prompted swapped JS out of my context, so this might take a little massaging to make work entirely. Steve On Thu, Feb 27, 2014 at 1:17 AM, Konrad Hinsen <konrad.hinsen at fastmail.net>wrote: > Hi Thomas & Fernando, > > Thomas Kluyver writes: > > > I don't think there is a good way to get that: the design is > > specifically that the kernel is an engine to run code, and should > > not know where that code is coming from. > > Fernando Perez writes: > > > Konrad, Matthias' recent description is a great one: it's like > > asking a book about the color of the eyes of its reader. That > > question is fundamentally ill-posed, as multiple people may > > simultaneously read a book. > > I see your point view, which is that the notebook is just one way of > interacting with a kernel. Given the I in IPython, that point of view > is understandable. > > My point of view is different because my priority is documenting > computations. I see a notebook as a document that describes what was > done and which results were obtained. In the ActivePapers framework, I > need to know where every bit of executed code comes from, because > that's an important element in provenance tracking. > > A compromise that is compatible with both points of view is putting > the provenance information for the code in the execute request sent to > the kernel. This could be a notebook name, but also the process id of > a qtconsole. It could be different for each execute request, and > nothing would prevent a single notebook from sending requests to > multiple kernels. > > > In IPython's case, the same applies: a kernel may be attached to a > > notebook, but simultaneously to a terminal and a qtconsole. While > > we hold fast on the idea that a notebook should only have *one* > > kernel, we've even wondered if it could make sense to have multiple > > notebooks connected to an single kernel (to operate on the same > > namespace while breaking up the narrative into subdocuments more > > conveniently). > > >From the "documenting a computation" point of view, that would require > some clear link between the notebooks that share a kernel. A link that > remains visible in the resulting notebook files. > > > You can probably write a magic that will call back out from the > > kernel to the client JS and fetch the notebook path and would store > > it in a variable in the user namespace, but my JS-fu isn't up to > > snuff to write that right away. And you'd have to accept that it's > > a hack with potentially ambiguous results (if for example we later > > allow multiple notebooks to connect to the same kernel). > > It looks like I'll need some hack anyway to proceed. If that hack needs > to be modified in the future, well, that's life on the bleeding edge ;-) > > Unfortunately my JS-fu isn't great either, so I'd be grateful for > suggestions > from the JS wizards in the audience. > > 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/20140227/2d8ddbc7/attachment.html> From dsdale24 at gmail.com Thu Feb 27 14:37:06 2014 From: dsdale24 at gmail.com (Darren Dale) Date: Thu, 27 Feb 2014 14:37:06 -0500 Subject: [IPython-dev] widget value persistence Message-ID: <CAK6O52kLjPHaz-_8C-swHyX1pGcx0ML0Mhs7qLWJZ0RnAT9FHQ@mail.gmail.com> I just discovered some of the incredible stuff you ipython devs have been working on for 2.0. I have a question about the new widgets. We support many different kinds of experiments at my lab (which is a national user facility), some of which require extensive routines for data reduction and analysis. Much of this work occurs in GUI-based applications. It would be *brilliant* to be able to use the ipython notebook, where we could distribute ipynb templates that specify the whole analysis workflow and provide a transparent record of processing steps. However, I have a question about portions of the analysis that would require user interaction via a widget. Suppose I start from an ipynb template which includes a slider that defaults to 25. My particular dataset requires the slider to be set to 30. Is it possible for an ipynb widget to save its most recent value as the new default value for the next time the notebook is run? This would be a game-changer for developing user interfaces for scientific applications. Thanks, Darren -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140227/2487897e/attachment.html> From takowl at gmail.com Thu Feb 27 14:52:23 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Thu, 27 Feb 2014 11:52:23 -0800 Subject: [IPython-dev] How to get the notebook name/path in the kernel? In-Reply-To: <21263.28209.807997.815717@Konrad-Hinsens-MacBook-Pro-2.local> References: <21262.9673.594236.921890@Konrad-Hinsens-MacBook-Pro-2.local> <CAOvn4qhyt9KL5oP+ZzreZ8KHK-eMJZvEgimJDsosXNiFYCVZ+w@mail.gmail.com> <CAHAreOrpmo=e9ksvMN4c_nFCHGWbAVkESEZkoAfvp6pbTAQnqA@mail.gmail.com> <21263.711.512920.378628@Ordinateur-de-Catherine-Konrad.local> <CAOvn4qh1sMJ5XHQSqscBEJVvbH4vE1g1LkHPqhcB2a2aieiD8Q@mail.gmail.com> <21263.28209.807997.815717@Konrad-Hinsens-MacBook-Pro-2.local> Message-ID: <CAOvn4qhELcSNfG8+6uQpRLObvW6Eu+0Hm5pxG-ALvca0GaXD0Q@mail.gmail.com> On 27 February 2014 08:56, Konrad Hinsen <konrad.hinsen at fastmail.net> wrote: > Provenance tracking in ActivePapers is part of code execution. Every > time a codelet (the equivalent of a script in an ActivePaper) creates > a dataset, directly or through a call to library code, the > ActivePapers infrastructure notes the name of the codelet as a > dependency. Notebooks are just codelets with a user interface, > so the same rules apply. > > There is no way to figure out which datasets a notebook creates just > by scanning its code, because the datasnotes downet could well be created > in a > library function. The notebook manager has nothing but the static > code, so it can't handle provenance tracking. > I think I see - you're tracking both code and datasets. Only the kernel knows about the provenance and use of data, while only the notebook server knows about the provenance of code. Is that right? I think I'd still be inclined to deal with provenance in the notebook server. I think it should be possible to make the kernel record the data used by a cell its sent to run, and then send that information to the server in the execute_reply message, perhaps in the metadata field. It seems like the notebook server is the part that should actually know about the relationships between different pieces of code and between code and data. Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140227/64dcfe7e/attachment.html> From takowl at gmail.com Thu Feb 27 14:57:10 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Thu, 27 Feb 2014 11:57:10 -0800 Subject: [IPython-dev] widget value persistence In-Reply-To: <CAK6O52kLjPHaz-_8C-swHyX1pGcx0ML0Mhs7qLWJZ0RnAT9FHQ@mail.gmail.com> References: <CAK6O52kLjPHaz-_8C-swHyX1pGcx0ML0Mhs7qLWJZ0RnAT9FHQ@mail.gmail.com> Message-ID: <CAOvn4qin588Og1uhkfCTpk1+MgrNhyZh1GkWKECz6+o2Nei_ow@mail.gmail.com> Hi Darren, On 27 February 2014 11:37, Darren Dale <dsdale24 at gmail.com> wrote: > However, I have a question about portions of the analysis that would > require user interaction via a widget. Suppose I start from an ipynb > template which includes a slider that defaults to 25. My particular dataset > requires the slider to be set to 30. Is it possible for an ipynb widget to > save its most recent value as the new default value for the next time the > notebook is run? This would be a game-changer for developing user > interfaces for scientific applications. We haven't yet worked out how to save widgets, so they disappear entirely when you reload a notebook. We'll get to that for 3.0, and I imagine then that the latest value of a slider will be saved with the notebook. However, if you re-run the cell, I think it will (and should) always return the default to what the code specifies. I think it's important that running code has a predictable result. But I don't think this is a problem: if you want the default to be 30, just set it to 30 in your code. Best wishes, Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140227/ac87189c/attachment.html> From ellisonbg at gmail.com Thu Feb 27 15:45:59 2014 From: ellisonbg at gmail.com (Brian Granger) Date: Thu, 27 Feb 2014 12:45:59 -0800 Subject: [IPython-dev] widget value persistence In-Reply-To: <CAOvn4qin588Og1uhkfCTpk1+MgrNhyZh1GkWKECz6+o2Nei_ow@mail.gmail.com> References: <CAK6O52kLjPHaz-_8C-swHyX1pGcx0ML0Mhs7qLWJZ0RnAT9FHQ@mail.gmail.com> <CAOvn4qin588Og1uhkfCTpk1+MgrNhyZh1GkWKECz6+o2Nei_ow@mail.gmail.com> Message-ID: <CAH4pYpQbmJ4x4RAiqfJ088mGOTx32ouvGk=wds44DMLdMEiS0Q@mail.gmail.com> Yes, for now the right answer is to set the value attribute of the slider when you construct it. If you are using interact, you can change the default value for the widget by changing the keyword argument in the function def. On Thu, Feb 27, 2014 at 11:57 AM, Thomas Kluyver <takowl at gmail.com> wrote: > Hi Darren, > > On 27 February 2014 11:37, Darren Dale <dsdale24 at gmail.com> wrote: >> >> However, I have a question about portions of the analysis that would >> require user interaction via a widget. Suppose I start from an ipynb >> template which includes a slider that defaults to 25. My particular dataset >> requires the slider to be set to 30. Is it possible for an ipynb widget to >> save its most recent value as the new default value for the next time the >> notebook is run? This would be a game-changer for developing user interfaces >> for scientific applications. > > > We haven't yet worked out how to save widgets, so they disappear entirely > when you reload a notebook. We'll get to that for 3.0, and I imagine then > that the latest value of a slider will be saved with the notebook. > > However, if you re-run the cell, I think it will (and should) always return > the default to what the code specifies. I think it's important that running > code has a predictable result. But I don't think this is a problem: if you > want the default to be 30, just set it to 30 in your code. > > Best wishes, > Thomas > > _______________________________________________ > 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 dsdale24 at gmail.com Thu Feb 27 16:10:06 2014 From: dsdale24 at gmail.com (Darren Dale) Date: Thu, 27 Feb 2014 16:10:06 -0500 Subject: [IPython-dev] widget value persistence In-Reply-To: <CAOvn4qin588Og1uhkfCTpk1+MgrNhyZh1GkWKECz6+o2Nei_ow@mail.gmail.com> References: <CAK6O52kLjPHaz-_8C-swHyX1pGcx0ML0Mhs7qLWJZ0RnAT9FHQ@mail.gmail.com> <CAOvn4qin588Og1uhkfCTpk1+MgrNhyZh1GkWKECz6+o2Nei_ow@mail.gmail.com> Message-ID: <CAK6O52=emWZVe0oEHkXC8SQk+qgZU84fivCncqKvE_aM7kWEAg@mail.gmail.com> On Thu, Feb 27, 2014 at 2:57 PM, Thomas Kluyver <takowl at gmail.com> wrote: > Hi Darren, > > On 27 February 2014 11:37, Darren Dale <dsdale24 at gmail.com> wrote: > >> However, I have a question about portions of the analysis that would >> require user interaction via a widget. Suppose I start from an ipynb >> template which includes a slider that defaults to 25. My particular dataset >> requires the slider to be set to 30. Is it possible for an ipynb widget to >> save its most recent value as the new default value for the next time the >> notebook is run? This would be a game-changer for developing user >> interfaces for scientific applications. > > > We haven't yet worked out how to save widgets, so they disappear entirely > when you reload a notebook. We'll get to that for 3.0, and I imagine then > that the latest value of a slider will be saved with the notebook. > > However, if you re-run the cell, I think it will (and should) always > return the default to what the code specifies. I think it's important that > running code has a predictable result. But I don't think this is a problem: > if you want the default to be 30, just set it to 30 in your code. > I agree about the importance of re-running code and getting a predictable result. If I hand an ipynb to a student, they return with a result, and I want to know how they got that result, it want to open the notebook, see precisely how the widgets were set to yield the result, and rerun all the cells in the notebook to reproduce the result. I don't want the widgets to fall back to the defaults, because then I have to interact with every widget all over again to reproduce the result. Perhaps a global setting at the top of the notebook to enable/disable widget value persistence would be acceptable? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140227/9b898eb6/attachment.html> From dsdale24 at gmail.com Thu Feb 27 16:11:13 2014 From: dsdale24 at gmail.com (Darren Dale) Date: Thu, 27 Feb 2014 16:11:13 -0500 Subject: [IPython-dev] widget value persistence In-Reply-To: <CAH4pYpQbmJ4x4RAiqfJ088mGOTx32ouvGk=wds44DMLdMEiS0Q@mail.gmail.com> References: <CAK6O52kLjPHaz-_8C-swHyX1pGcx0ML0Mhs7qLWJZ0RnAT9FHQ@mail.gmail.com> <CAOvn4qin588Og1uhkfCTpk1+MgrNhyZh1GkWKECz6+o2Nei_ow@mail.gmail.com> <CAH4pYpQbmJ4x4RAiqfJ088mGOTx32ouvGk=wds44DMLdMEiS0Q@mail.gmail.com> Message-ID: <CAK6O52=F9WM7rhXCsLUDbC2kBd1eEOoea4mBnK2E+9jXv7FPfA@mail.gmail.com> Do you have an example of this? I tried in one of the widget example notebooks and couldn't figure out how to change the default value. On Thu, Feb 27, 2014 at 3:45 PM, Brian Granger <ellisonbg at gmail.com> wrote: > Yes, for now the right answer is to set the value attribute of the > slider when you construct it. If you are using interact, you can > change the default value for the widget by changing the keyword > argument in the function def. > > On Thu, Feb 27, 2014 at 11:57 AM, Thomas Kluyver <takowl at gmail.com> wrote: > > Hi Darren, > > > > On 27 February 2014 11:37, Darren Dale <dsdale24 at gmail.com> wrote: > >> > >> However, I have a question about portions of the analysis that would > >> require user interaction via a widget. Suppose I start from an ipynb > >> template which includes a slider that defaults to 25. My particular > dataset > >> requires the slider to be set to 30. Is it possible for an ipynb widget > to > >> save its most recent value as the new default value for the next time > the > >> notebook is run? This would be a game-changer for developing user > interfaces > >> for scientific applications. > > > > > > We haven't yet worked out how to save widgets, so they disappear entirely > > when you reload a notebook. We'll get to that for 3.0, and I imagine then > > that the latest value of a slider will be saved with the notebook. > > > > However, if you re-run the cell, I think it will (and should) always > return > > the default to what the code specifies. I think it's important that > running > > code has a predictable result. But I don't think this is a problem: if > you > > want the default to be 30, just set it to 30 in your code. > > > > Best wishes, > > Thomas > > > > _______________________________________________ > > 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/20140227/4f3a3ba9/attachment.html> From doug.blank at gmail.com Thu Feb 27 16:23:12 2014 From: doug.blank at gmail.com (Doug Blank) Date: Thu, 27 Feb 2014 16:23:12 -0500 Subject: [IPython-dev] widget value persistence In-Reply-To: <CAK6O52=F9WM7rhXCsLUDbC2kBd1eEOoea4mBnK2E+9jXv7FPfA@mail.gmail.com> References: <CAK6O52kLjPHaz-_8C-swHyX1pGcx0ML0Mhs7qLWJZ0RnAT9FHQ@mail.gmail.com> <CAOvn4qin588Og1uhkfCTpk1+MgrNhyZh1GkWKECz6+o2Nei_ow@mail.gmail.com> <CAH4pYpQbmJ4x4RAiqfJ088mGOTx32ouvGk=wds44DMLdMEiS0Q@mail.gmail.com> <CAK6O52=F9WM7rhXCsLUDbC2kBd1eEOoea4mBnK2E+9jXv7FPfA@mail.gmail.com> Message-ID: <CAAusYCj9ikppsgv_5mbZJg9FhfmMF-3dXMiJKwXto3Ye9Eq1Pw@mail.gmail.com> On Thu, Feb 27, 2014 at 4:11 PM, Darren Dale <dsdale24 at gmail.com> wrote: > Do you have an example of this? I tried in one of the widget example > notebooks and couldn't figure out how to change the default value. > You can just the value of the property [1], such as: mywidget.value = 25.0 and the widget will be set to that value. Hope that helps! -Doug [1] - http://nbviewer.ipython.org/github/ipython/ipython/blob/7eac82e16e9c0c9f8e232816560963a7a07d79d1/examples/widgets/Part%201%20-%20Basics.ipynb > > On Thu, Feb 27, 2014 at 3:45 PM, Brian Granger <ellisonbg at gmail.com>wrote: > >> Yes, for now the right answer is to set the value attribute of the >> slider when you construct it. If you are using interact, you can >> change the default value for the widget by changing the keyword >> argument in the function def. >> >> On Thu, Feb 27, 2014 at 11:57 AM, Thomas Kluyver <takowl at gmail.com> >> wrote: >> > Hi Darren, >> > >> > On 27 February 2014 11:37, Darren Dale <dsdale24 at gmail.com> wrote: >> >> >> >> However, I have a question about portions of the analysis that would >> >> require user interaction via a widget. Suppose I start from an ipynb >> >> template which includes a slider that defaults to 25. My particular >> dataset >> >> requires the slider to be set to 30. Is it possible for an ipynb >> widget to >> >> save its most recent value as the new default value for the next time >> the >> >> notebook is run? This would be a game-changer for developing user >> interfaces >> >> for scientific applications. >> > >> > >> > We haven't yet worked out how to save widgets, so they disappear >> entirely >> > when you reload a notebook. We'll get to that for 3.0, and I imagine >> then >> > that the latest value of a slider will be saved with the notebook. >> > >> > However, if you re-run the cell, I think it will (and should) always >> return >> > the default to what the code specifies. I think it's important that >> running >> > code has a predictable result. But I don't think this is a problem: if >> you >> > want the default to be 30, just set it to 30 in your code. >> > >> > Best wishes, >> > Thomas >> > >> > _______________________________________________ >> > 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140227/c690d8a0/attachment.html> From doug.blank at gmail.com Thu Feb 27 16:24:19 2014 From: doug.blank at gmail.com (Doug Blank) Date: Thu, 27 Feb 2014 16:24:19 -0500 Subject: [IPython-dev] widget value persistence In-Reply-To: <CAAusYCj9ikppsgv_5mbZJg9FhfmMF-3dXMiJKwXto3Ye9Eq1Pw@mail.gmail.com> References: <CAK6O52kLjPHaz-_8C-swHyX1pGcx0ML0Mhs7qLWJZ0RnAT9FHQ@mail.gmail.com> <CAOvn4qin588Og1uhkfCTpk1+MgrNhyZh1GkWKECz6+o2Nei_ow@mail.gmail.com> <CAH4pYpQbmJ4x4RAiqfJ088mGOTx32ouvGk=wds44DMLdMEiS0Q@mail.gmail.com> <CAK6O52=F9WM7rhXCsLUDbC2kBd1eEOoea4mBnK2E+9jXv7FPfA@mail.gmail.com> <CAAusYCj9ikppsgv_5mbZJg9FhfmMF-3dXMiJKwXto3Ye9Eq1Pw@mail.gmail.com> Message-ID: <CAAusYChmLcnAPyZtQPrL5Zmth-A8i0p6LhxwTPoBKyvtjHWbvQ@mail.gmail.com> On Thu, Feb 27, 2014 at 4:23 PM, Doug Blank <doug.blank at gmail.com> wrote: > On Thu, Feb 27, 2014 at 4:11 PM, Darren Dale <dsdale24 at gmail.com> wrote: > >> Do you have an example of this? I tried in one of the widget example >> notebooks and couldn't figure out how to change the default value. >> > > You can just the value of the property [1], such as: > > mywidget.value = 25.0 > > > and the widget will be set to that value. > > Or give it in the constructor, as in "Item A": mysecondwidget = widgets.RadioButtonsWidget(values=["Item A", "Item B", "Item C"], value="Item A") > Hope that helps! > > -Doug > > [1] - > http://nbviewer.ipython.org/github/ipython/ipython/blob/7eac82e16e9c0c9f8e232816560963a7a07d79d1/examples/widgets/Part%201%20-%20Basics.ipynb > > >> >> On Thu, Feb 27, 2014 at 3:45 PM, Brian Granger <ellisonbg at gmail.com>wrote: >> >>> Yes, for now the right answer is to set the value attribute of the >>> slider when you construct it. If you are using interact, you can >>> change the default value for the widget by changing the keyword >>> argument in the function def. >>> >>> On Thu, Feb 27, 2014 at 11:57 AM, Thomas Kluyver <takowl at gmail.com> >>> wrote: >>> > Hi Darren, >>> > >>> > On 27 February 2014 11:37, Darren Dale <dsdale24 at gmail.com> wrote: >>> >> >>> >> However, I have a question about portions of the analysis that would >>> >> require user interaction via a widget. Suppose I start from an ipynb >>> >> template which includes a slider that defaults to 25. My particular >>> dataset >>> >> requires the slider to be set to 30. Is it possible for an ipynb >>> widget to >>> >> save its most recent value as the new default value for the next time >>> the >>> >> notebook is run? This would be a game-changer for developing user >>> interfaces >>> >> for scientific applications. >>> > >>> > >>> > We haven't yet worked out how to save widgets, so they disappear >>> entirely >>> > when you reload a notebook. We'll get to that for 3.0, and I imagine >>> then >>> > that the latest value of a slider will be saved with the notebook. >>> > >>> > However, if you re-run the cell, I think it will (and should) always >>> return >>> > the default to what the code specifies. I think it's important that >>> running >>> > code has a predictable result. But I don't think this is a problem: if >>> you >>> > want the default to be 30, just set it to 30 in your code. >>> > >>> > Best wishes, >>> > Thomas >>> > >>> > _______________________________________________ >>> > 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 >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140227/f84f0c2f/attachment.html> From zonca at sdsc.edu Thu Feb 27 19:25:14 2014 From: zonca at sdsc.edu (Andrea Zonca) Date: Thu, 27 Feb 2014 16:25:14 -0800 Subject: [IPython-dev] How to identify the execution_reply message Message-ID: <CADWjrkjt+RxemdNXyE_aXZccQ=Wcs+F4C6z-+6Em1szd_fjtiw@mail.gmail.com> hi, I am trying to develop a py.test plugin to execute notebook cells as unit tests [1]. I send a cell content via `execute` to the kernel, and instead of getting back a single message, I get several, so I resorted to just loop through all of them and get the last, and it works: https://github.com/zonca/pytest-ipynb/blob/master/conftest.py#L96 Now, what is the correct way of identifying what is the reply to the last command executed? Thanks, Andrea [1] example test notebook http://nbviewer.ipython.org/github/zonca/pytest-ipynb/blob/master/test_series_plots.ipynb From takowl at gmail.com Thu Feb 27 20:13:47 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Thu, 27 Feb 2014 17:13:47 -0800 Subject: [IPython-dev] How to identify the execution_reply message In-Reply-To: <CADWjrkjt+RxemdNXyE_aXZccQ=Wcs+F4C6z-+6Em1szd_fjtiw@mail.gmail.com> References: <CADWjrkjt+RxemdNXyE_aXZccQ=Wcs+F4C6z-+6Em1szd_fjtiw@mail.gmail.com> Message-ID: <CAOvn4qjrw9+vaE0SuMcdUixzPvTYi2_e4d0_Qrm+WYb4C8ii4A@mail.gmail.com> Hi Andrea, On 27 February 2014 16:25, Andrea Zonca <zonca at sdsc.edu> wrote: > I am trying to develop a py.test plugin to execute notebook cells as > unit tests [1]. > > I send a cell content via `execute` to the kernel, and instead of > getting back a single message, > I get several, so I resorted to just loop through all of them and get > the last, and it works: > https://github.com/zonca/pytest-ipynb/blob/master/conftest.py#L96 > Yes, this is intentional. It's not just request/reply: when you ask the kernel to execute code, there will be at least kernel busy and idle status messages when it starts and finishes, and there may also be various kinds of outputs and errors from the code being executed. Finally, the execute_reply message should be one per execution, and it tells you whether it finished ok, errored, or was interrupted. It's probably better to do this by checking the msg_type in the message header, rather than waiting for the last in a cluster. > Now, what is the correct way of identifying what is the reply to the > last command > executed? > I'm not quite sure what you mean, but each returning message should have a parent_header dict, which contains the headers of the execute_request. So you should be able to match up the messages coming in with the message you sent using the msg_id. You might want to look at the messaging spec here, especially the 'General Message Format' section: http://ipython.org/ipython-doc/dev/development/messaging.html Thanks, Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140227/69f1ece3/attachment.html> From konrad.hinsen at fastmail.net Fri Feb 28 02:36:52 2014 From: konrad.hinsen at fastmail.net (Konrad Hinsen) Date: Fri, 28 Feb 2014 08:36:52 +0100 Subject: [IPython-dev] How to get the notebook name/path in the kernel? In-Reply-To: <CAOvn4qhELcSNfG8+6uQpRLObvW6Eu+0Hm5pxG-ALvca0GaXD0Q@mail.gmail.com> References: <21262.9673.594236.921890@Konrad-Hinsens-MacBook-Pro-2.local> <CAOvn4qhyt9KL5oP+ZzreZ8KHK-eMJZvEgimJDsosXNiFYCVZ+w@mail.gmail.com> <CAHAreOrpmo=e9ksvMN4c_nFCHGWbAVkESEZkoAfvp6pbTAQnqA@mail.gmail.com> <21263.711.512920.378628@Ordinateur-de-Catherine-Konrad.local> <CAOvn4qh1sMJ5XHQSqscBEJVvbH4vE1g1LkHPqhcB2a2aieiD8Q@mail.gmail.com> <21263.28209.807997.815717@Konrad-Hinsens-MacBook-Pro-2.local> <CAOvn4qhELcSNfG8+6uQpRLObvW6Eu+0Hm5pxG-ALvca0GaXD0Q@mail.gmail.com> Message-ID: <21264.15508.252571.136547@Ordinateur-de-Catherine-Konrad.local> Thomas Kluyver writes: > I think I see - you're tracking both code and datasets. Only the > kernel knows about the provenance and use of data, while only the > notebook server knows about the provenance of code. Is that right? Mostly. There is actually no fundamental difference between code and datasets. Code is just another piece of data. It's perfectly envisageable to have a compiler or preprocessor inside the ActivePapers framework that generates "code" which is then executed. There isn't much use for this in the Python edition because there aren't many code generators that produce Python code, but in the original JVM edition of ActivePapers, this is quite useful. > I think I'd still be inclined to deal with provenance in the > notebook server. I think it should be possible to make the kernel Before discussing the pros and cons of dealing with provenance tracking on one or the other side, I need to figure out what the options are. Passing information from the kernel to the notebook manager seems no easier to me than going in the other direction. The fundamental problem is that both run in distinct processes and don't even communicate directly. If I understand the architecture correctly, it's only the SessionManager who knows about both sides. So my immediate question is: how can I get the SessionManager to mediate information between the kernel and the notebook manager? Konrad. From konrad.hinsen at fastmail.net Fri Feb 28 02:51:29 2014 From: konrad.hinsen at fastmail.net (Konrad Hinsen) Date: Fri, 28 Feb 2014 08:51:29 +0100 Subject: [IPython-dev] How to get the notebook name/path in the kernel? In-Reply-To: <CA+n9YfqNik7Z96bq8QyfzJBhXEr_L3rT859Vmx92s=7YQiTVQg@mail.gmail.com> References: <21262.9673.594236.921890@Konrad-Hinsens-MacBook-Pro-2.local> <CAOvn4qhyt9KL5oP+ZzreZ8KHK-eMJZvEgimJDsosXNiFYCVZ+w@mail.gmail.com> <CAHAreOrpmo=e9ksvMN4c_nFCHGWbAVkESEZkoAfvp6pbTAQnqA@mail.gmail.com> <21263.711.512920.378628@Ordinateur-de-Catherine-Konrad.local> <CA+n9YfqNik7Z96bq8QyfzJBhXEr_L3rT859Vmx92s=7YQiTVQg@mail.gmail.com> Message-ID: <21264.16385.320204.590901@Ordinateur-de-Catherine-Konrad.local> Stephen Chan writes: > We do provenance tracking in the KBase Narrative as well, or > rather, we have an infrastructure to do provenance tracking, but > only somewhat early stage integration with our IPython > environment. It might be interesting to compare notes at some > point. Definitely. My experiments are on GitHub: http://github.com/khinsen/activepapers-python/tree/ipython But for now there's just a kernel and a notebook manager, which don't work together at all. > But back to your original question - the easiest way to do this > might be to bind a front end JS handler to a kernel ready event, > and have that push the notebook name into > os.environ['notebook_name']. We do that for some front end data > that needs to get back into the kernel. Thanks, that sounds like a workable approach. Unfortunately my JS knowledge is insufficient even for following this advice. It seems to me that a front end JS handler would have to be part of the JS code that the notebook server hands out to the browser. Unless there is a mechanism for injecting JS code from the kernel side. I guess I have some more googling to do... Konrad. From tra at popgen.net Fri Feb 28 07:23:16 2014 From: tra at popgen.net (Tiago Antao) Date: Fri, 28 Feb 2014 12:23:16 +0000 Subject: [IPython-dev] git(hub) best practices Message-ID: <20140228122316.3a44e691@lnx> Dear all, First just a strong word of appreciation for all the work on ipython notebook. It is the best thing since sliced bread, and I am one of those people that spends most of his day working inside ipython notebook and that normally griefs for any period spent outside it. You did an amazing job! I am writing to inquire if there are any github best practices, especially with regards to notebook size. The issue is that in the typical work/commit/work/commit loop, notebook diffs tend to be quite large if one is using charts (matplotlib ones in my case). The Base64 encoding is quite big (as it would be expected of course). In the interests of reducing the load on github I oftentimes wonder if there is a more efficient way to maintain a tight work/commit cycle while not imposing so much disk usage on the host? Any ideas would be most welcome... Best, Tiago PS - Again, my sincere thanks for this wonderful tool... From moorepants at gmail.com Fri Feb 28 10:42:43 2014 From: moorepants at gmail.com (Jason Moore) Date: Fri, 28 Feb 2014 10:42:43 -0500 Subject: [IPython-dev] git(hub) best practices In-Reply-To: <20140228122316.3a44e691@lnx> References: <20140228122316.3a44e691@lnx> Message-ID: <CAP7f1AjNWuoCfFx4KjT_61wsrcYw2od868QVeCaBxFSWY=5dYQ@mail.gmail.com> One possibility is to not save the output of cells. I think there is an option for that. Jason moorepants.info +01 530-601-9791 On Fri, Feb 28, 2014 at 7:23 AM, Tiago Antao <tra at popgen.net> wrote: > Dear all, > > First just a strong word of appreciation for all the work on ipython > notebook. It is the best thing since sliced bread, and I am one of > those people that spends most of his day working inside ipython > notebook and that normally griefs for any period spent outside it. You > did an amazing job! > > I am writing to inquire if there are any github best practices, > especially with regards to notebook size. > > The issue is that in the typical work/commit/work/commit loop, > notebook diffs tend to be quite large if one is using charts > (matplotlib ones in my case). The Base64 encoding is quite big (as it > would be expected of course). > > In the interests of reducing the load on github I oftentimes wonder if > there is a more efficient way to maintain a tight work/commit cycle > while not imposing so much disk usage on the host? > > Any ideas would be most welcome... > > Best, > Tiago > PS - Again, my sincere thanks for this wonderful tool... > _______________________________________________ > 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/20140228/8c1c64d5/attachment.html> From cfriedline at vcu.edu Fri Feb 28 11:10:02 2014 From: cfriedline at vcu.edu (Chris Friedline) Date: Fri, 28 Feb 2014 11:10:02 -0500 Subject: [IPython-dev] git(hub) best practices In-Reply-To: <CAP7f1AjNWuoCfFx4KjT_61wsrcYw2od868QVeCaBxFSWY=5dYQ@mail.gmail.com> References: <20140228122316.3a44e691@lnx> <CAP7f1AjNWuoCfFx4KjT_61wsrcYw2od868QVeCaBxFSWY=5dYQ@mail.gmail.com> Message-ID: <5310B4DA.7020107@vcu.edu> I have a template that I use that might help you. Check out: https://github.com/cfriedline/ipynb_template Chris -- Christopher J. Friedline, Ph.D. NSF Postdoctoral Research Fellow Virginia Commonwealth University Richmond, VA 23284 http://chris.friedline.net Jason Moore wrote: > One possibility is to not save the output of cells. I think there is an > option for that. > > > Jason > moorepants.info <http://moorepants.info> > +01 530-601-9791 > > > On Fri, Feb 28, 2014 at 7:23 AM, Tiago Antao <tra at popgen.net > <mailto:tra at popgen.net>> wrote: > > Dear all, > > First just a strong word of appreciation for all the work on ipython > notebook. It is the best thing since sliced bread, and I am one of > those people that spends most of his day working inside ipython > notebook and that normally griefs for any period spent outside it. You > did an amazing job! > > I am writing to inquire if there are any github best practices, > especially with regards to notebook size. > > The issue is that in the typical work/commit/work/commit loop, > notebook diffs tend to be quite large if one is using charts > (matplotlib ones in my case). The Base64 encoding is quite big (as it > would be expected of course). > > In the interests of reducing the load on github I oftentimes wonder if > there is a more efficient way to maintain a tight work/commit cycle > while not imposing so much disk usage on the host? > > Any ideas would be most welcome... > > Best, > Tiago > PS - Again, my sincere thanks for this wonderful tool... > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org <mailto: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 -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 801 bytes Desc: OpenPGP digital signature URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140228/cf9cb36d/attachment.sig> From takowl at gmail.com Fri Feb 28 13:33:14 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Fri, 28 Feb 2014 10:33:14 -0800 Subject: [IPython-dev] IPython 'office hours' Message-ID: <CAOvn4qhvUsTu7qzJfL8q2wKCqiSZapjbnseS34rjFDDvOPZvfg@mail.gmail.com> Hi all, We're going to start having 'office hours' for IPython - a public Google Hangout where anyone is welcome to come and ask the core team questions, or talk about interesting things you're developing with IPython. We want to try to do this monthly, on the first Tuesday of each month, starting this coming Tuesday: IPython office hours Tuesday 4th March, 18:00 GMT (10:00 PST) Google Hangout and Hipchat (http://www.hipchat.com/ghSp7E1uY ) If you'd like to join the video chat, please send me (off list) your Google+ email address in advance. People can also watch the live stream on Youtube and communicate with us via Hipchat - if it's popular, people may have to take turns in the video chat, because we're limited to 10 active participants. I Hope to see many of you on Tuesday! Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140228/9f4f0ffb/attachment.html> From scopatz at gmail.com Sun Feb 16 10:05:32 2014 From: scopatz at gmail.com (Anthony Scopatz) Date: Sun, 16 Feb 2014 15:05:32 -0000 Subject: [IPython-dev] ANN: SciPy 2014 Conference, July 6th - 12th, Austin, TX! Message-ID: <CAPk-6T6i8Pme3amRN8ZZvBhgbc1b6XC+p2_=u=MxXnCLBgdc2A@mail.gmail.com> Hello All! I am pleased to announce that *SciPy 2014*, the thirteenth annual *Scientific Computing with Python conference*, will be held this July 6th-12th in Austin, Texas. SciPy is a community dedicated to the advancement of scientific computing through open source Python software for mathematics, science, and engineering. The annual SciPy Conference allows participants from all types of organizations to showcase their latest projects, learn from skilled users and developers, and collaborate on code development. For more information please visit our website: https://conference.scipy.org/scipy2014/ This year the conference has been extended to include an additional day of presentations. During the presentation days SciPy is proud to host the following event and talk types: - Keynotes - Expert Panels - Short Talks - Poster Presentations - Birds of a Feather Sessions The full program will consist of two days of tutorials by followed by three days of presentations, and concludes with two days of developer sprints on projects of interest to attendees. This year, we are excited to present a job fair for the first time! <https://github.com/scipy-conference/scipy-conference/blob/master/mailings/conference_announcement.rst#specialized-tracks>Specialized Tracks This year we are happy to announce two specialized tracks that run in parallel to the general conference: *Scientific Computing in Education* Thanks to efforts such as Software Carpentry, the Hacker Within and grassroots Python Bootcamps, teaching scientific computing as a discipline is becoming more widely accepted and recognized as a crucial task in developing scientific literacy. This special track will focus on efforts to promote and develop scientific computing education, as well as related topics such as reproducibility and best practices for scientific computing. *Geospatial Data in Science* Python has become a core component of organiziing, understanding, and visualizing geospatial data. This track will focus on libraries, tools and techniques for processing Geospatial data of all types and for all purposes -- from low-volume to high-volume, local and global. <https://github.com/scipy-conference/scipy-conference/blob/master/mailings/conference_announcement.rst#domain-specific-mini-symposia>Domain-specific Mini-symposia Introduced in 2012, mini-symposia are held to discuss scientific computing applied to a specific scientific domain/industry during a half afternoon after the general conference. Their goal is to promote industry specific libraries and tools, and gather people with similar interests for discussions. Mini-symposia on the following topics will take place this year: - Astronomy and astrophysics - Bioinformatics - Geophysics - Vision, Visualization, and Imaging - Computational Social Science and Digital Humanities - Engineering <https://github.com/scipy-conference/scipy-conference/blob/master/mailings/conference_announcement.rst#tutorials> Tutorials Multiple interactive half-day tutorials will be taught by community experts. The tutorials provide conceptual and practical coverage of tools that have broad interest at both an introductory or advanced level. This year, a third track will be added, which target specifically programmers with no prior knowledge of scientific python. <https://github.com/scipy-conference/scipy-conference/blob/master/mailings/conference_announcement.rst#developer-sprints>Developer Sprints A hackathon environment is setup for attendees to work on the core SciPy packages or their own personal projects. The conference is an opportunity for developers that are usually physically separated to come together and engage in highly productive sessions. It is also an occasion for new community members to introduce themselves and receive tips from community experts. This year, some of the sprints will be scheduled and announced ahead of the conference. <https://github.com/scipy-conference/scipy-conference/blob/master/mailings/conference_announcement.rst#birds-of-a-feather-bof-sessions>Birds-of-a-Feather (BOF) Sessions Birds-of-a-Feather sessions are self-organized discussions that run parallel to the main conference. The BOFs sessions cover primary, tangential, or unrelated topics in an interactive, discussion setting. This year, some of the BOF sessions will be scheduled and announced ahead of the conference. <https://github.com/scipy-conference/scipy-conference/blob/master/mailings/conference_announcement.rst#important-dates>Important Dates - March 14th: Presentation abstracts, poster, tutorial submission deadline. Application for sponsorship deadline. - April 17th: Speakers selected - April 22nd: Sponsorship acceptance deadline - May 1st: Speaker schedule announced - May 6th, or 150 registrants: Early-bird registration ends - July 6-12th: 2 days of tutorials, 3 days of conference, 2 days of sprints We look forward to a very exciting conference and hope to see you all in Austin this summer! The SciPy2014 Organizers -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140216/83967eda/attachment.html>