From hans_meine at gmx.net Mon Sep 3 12:25:29 2012 From: hans_meine at gmx.net (Hans Meine) Date: Mon, 03 Sep 2012 18:25:29 +0200 Subject: [IPython-dev] internationalisation and translation of ipython In-Reply-To: References: Message-ID: <16242357.L4Hq4o0Kl8@hmeine-pc> Hi everybody! Am Dienstag, 14. August 2012, 11:38:14 schrieb Thomas Kluyver: > I've seen how gettext works from within the code, and I agree that it does > seem simple. Can I ask about logistics: One thing I learned from KDE (which BTW has put a lot of thought and effort into a good l10n infrastructure, too) is this: Short strings should *not* be just wrapped in _(...)! To be more specific, there are many English words that should be translated into different words depending on the *context*. For example, English 'to' translates to different words in German when used in "pick 1 to 4 items", "10 to 11 o'clock", or "drive to Buffalo". There are much more difficult problems than this, but this one arises most often, e.g. in user interfaces, in which labels for dialog fields contain just 'to'. I brought this up because the consequence is that every developer needs to know at least a little bit about the translation system, or someone (e.g. Nicolas) has to dive into the code everytime the translators have a problem. Best regards, Hans From nicolas at pettiaux.be Mon Sep 3 12:39:11 2012 From: nicolas at pettiaux.be (Nicolas Pettiaux) Date: Mon, 3 Sep 2012 18:39:11 +0200 Subject: [IPython-dev] internationalisation and translation of ipython In-Reply-To: <16242357.L4Hq4o0Kl8@hmeine-pc> References: <16242357.L4Hq4o0Kl8@hmeine-pc> Message-ID: Hello I have not had the time to answer Thomas (whom I was really happy to meet at EuroScipy in Brussels), exactely because of the work around EuroScipy and my main work thereafter. I expect to be too busy before November 1 to do anything really constructive, appart from reading and researching about the best infrastructure to propose and, as Hans writes, also gather recommandations and good practices from running projects that are translated. And indeed, such subleties exists ... ans I am ready to dive into the code for the sake of expansion of the use of ipython by beginners. The point though is that I master English and French, I speak rather fluently Dutch but I am not an expert and that is it. Best regards, Nicolas -- Nicolas Pettiaux, dr. sc - gsm : +32 496 24 55 01 Lepacte.be - ? promouvoir les libert?s num?riques en Belgique ? - hetpact.be From takowl at gmail.com Mon Sep 3 12:54:14 2012 From: takowl at gmail.com (Thomas Kluyver) Date: Mon, 3 Sep 2012 17:54:14 +0100 Subject: [IPython-dev] internationalisation and translation of ipython In-Reply-To: References: <16242357.L4Hq4o0Kl8@hmeine-pc> Message-ID: On 3 September 2012 17:39, Nicolas Pettiaux wrote: > The point though is that I master English and French, I > speak rather fluently Dutch but I am not an expert and that is it. I hope that once we've got the infrastructure set up, adding new languages will be something relatively easy that many people can get involved with. The results of the user survey indicate that we have users in a lot of different countries: http://ipython.org/usersurvey2011.html#countries In terms of the framework, I would be wary of using anything other than the standard library gettext module unless there's a clear need for it. Lots of other software manages with gettext. Thanks, Thomas From nicolas at pettiaux.be Mon Sep 3 13:08:11 2012 From: nicolas at pettiaux.be (Nicolas Pettiaux) Date: Mon, 3 Sep 2012 19:08:11 +0200 Subject: [IPython-dev] internationalisation and translation of ipython In-Reply-To: References: <16242357.L4Hq4o0Kl8@hmeine-pc> Message-ID: 2012/9/3 Thomas Kluyver : > On 3 September 2012 17:39, Nicolas Pettiaux wrote: >> The point though is that I master English and French, I >> speak rather fluently Dutch but I am not an expert and that is it. > > I hope that once we've got the infrastructure set up, adding new > languages will be something relatively easy that many people can get > involved with. This is exactely what I hope. And there exist many different infrastructure today, http://transifex.com http://weblate.org http://translatewiki.net http://pootle.python.org/ that we could use. One thing that I am now trying to do is : compare them. Some are more appropriate for menus or short sentences, some other for plain texts and examples, or even books. >The results of the user survey indicate that we have > users in a lot of different countries: > > http://ipython.org/usersurvey2011.html#countries > > In terms of the framework, I would be wary of using anything other > than the standard library gettext module unless there's a clear need > for it. so am I. > Lots of other software manages with gettext. indeed. See above for online solutions. There are also desktop ones : gtranslator, virtaal, omegat, lokalize and probably others. Thanks, Nicolas -- Nicolas Pettiaux, dr. sc - gsm : +32 496 24 55 01 Lepacte.be - ? promouvoir les libert?s num?riques en Belgique ? - hetpact.be From takowl at gmail.com Mon Sep 3 16:01:17 2012 From: takowl at gmail.com (Thomas Kluyver) Date: Mon, 3 Sep 2012 21:01:17 +0100 Subject: [IPython-dev] internationalisation and translation of ipython In-Reply-To: References: <16242357.L4Hq4o0Kl8@hmeine-pc> Message-ID: On 3 September 2012 18:08, Nicolas Pettiaux wrote: > This is exactely what I hope. And there exist many different > infrastructure today, > > http://transifex.com > http://weblate.org > http://translatewiki.net > http://pootle.python.org/ I think that's the relatively easy bit - any of those services, along with various desktop applications, will let people translate messages using a standard file format. What I'm less sure of is how we should integrate the translation files into our development workflow and our distribution methods. For example: - If I change a string in development, do I need to remember to update message catalogues? - Should translators be working on the development version, or the stable release? - Should the IPython package you download include translation files, or should they be separately downloadable? - What will distro packagers expect from us? Thanks, Thomas From nicolas at pettiaux.be Mon Sep 3 16:52:32 2012 From: nicolas at pettiaux.be (Nicolas Pettiaux) Date: Mon, 3 Sep 2012 22:52:32 +0200 Subject: [IPython-dev] internationalisation and translation of ipython In-Reply-To: References: <16242357.L4Hq4o0Kl8@hmeine-pc> Message-ID: 2012/9/3 Thomas Kluyver : > On 3 September 2012 18:08, Nicolas Pettiaux wrote: >> This is exactely what I hope. And there exist many different >> infrastructure today, >> >> http://transifex.com >> http://weblate.org >> http://translatewiki.net >> http://pootle.python.org/ > > I think that's the relatively easy bit - any of those services, along > with various desktop applications, will let people translate messages > using a standard file format. indeed. But a good infrastructure will help a lot the translators community. > What I'm less sure of is how we should > integrate the translation files into our development workflow and our > distribution methods. For example: > - If I change a string in development, do I need to remember to update > message catalogues? no. Gettext tools will do that. Keep develop using _() for the strings. > - Should translators be working on the development version, or the > stable release? mostly the stable release as far as I know. The gettext tool set helps to follow the variation, and will only ask to translate the string that have changed. > - Should the IPython package you download include translation files, > or should they be separately downloadable? I think the package have to include the translations, at least if they are not big (which will be the case at the beginning). > - What will distro packagers expect from us? I think they will expect what they get today and the translated files (= some more text documents) Thanks, Nicolas -- Nicolas Pettiaux, dr. sc - gsm : +32 496 24 55 01 Lepacte.be - ? promouvoir les libert?s num?riques en Belgique ? - hetpact.be From tomspur at fedoraproject.org Mon Sep 3 18:06:07 2012 From: tomspur at fedoraproject.org (Thomas Spura) Date: Tue, 4 Sep 2012 00:06:07 +0200 Subject: [IPython-dev] internationalisation and translation of ipython In-Reply-To: References: <16242357.L4Hq4o0Kl8@hmeine-pc> Message-ID: On Mon, Sep 3, 2012 at 10:52 PM, Nicolas Pettiaux wrote: > 2012/9/3 Thomas Kluyver : >> On 3 September 2012 18:08, Nicolas Pettiaux wrote: >>> This is exactely what I hope. And there exist many different >>> infrastructure today, >>> >>> http://transifex.com >>> http://weblate.org >>> http://translatewiki.net >>> http://pootle.python.org/ >> >> I think that's the relatively easy bit - any of those services, along >> with various desktop applications, will let people translate messages >> using a standard file format. > > indeed. But a good infrastructure will help a lot the translators community. I only know transifex in practice, so my comments below will be biased a bit towards that direction. >> What I'm less sure of is how we should >> integrate the translation files into our development workflow and our >> distribution methods. For example: > >> - If I change a string in development, do I need to remember to update >> message catalogues? > > no. Gettext tools will do that. Keep develop using _() for the strings. You need to explicitely "tx push" the changed strings to transifex and give the translators a bit time to translate. This means before the actual release of a new version, the StringFreeze needs to happen, where you only move code around, but don't change any _("") strings anymore. Just before the release "tx pull" will get the translations back again and you can include them into the tar ball for downloading (I'm unsure, if they need to be committed into git or if including into a tarball is sufficient). >> - Should translators be working on the development version, or the >> stable release? > > mostly the stable release as far as I know. The gettext tool set helps > to follow the variation, and will only ask to translate the string > that have changed. I'd suggest a string freeze, before each new release, so translators have a bit time to translate the development version. (Regularly pushing changed strings to tx would help to always keep a low number of needed translation strings.) >> - Should the IPython package you download include translation files, >> or should they be separately downloadable? > > I think the package have to include the translations, at least if they > are not big (which will be the case at the beginning). I cannot remember a project, which splits the translations into another repository off hand... It might be good to split the translations of the webpage, as that might become quite big and is normally not needed in a tarball (if you want to let translate the webpage too...) >> - What will distro packagers expect from us? > > I think they will expect what they get today and the translated files > (= some more text documents) They expect setup.py to compile the .po file into a .mo files and install them into: /usr/share/locale/$LANG/LC_MESSAGES/ipython.mo (when you use gettext.install("ipython")) Some quick googling showed this as an example for compiling the translations: http://wiki.maemo.org/Internationalize_a_Python_application Hope that helps. Tom From takowl at gmail.com Mon Sep 3 18:24:01 2012 From: takowl at gmail.com (Thomas Kluyver) Date: Mon, 3 Sep 2012 23:24:01 +0100 Subject: [IPython-dev] internationalisation and translation of ipython In-Reply-To: References: <16242357.L4Hq4o0Kl8@hmeine-pc> Message-ID: On 3 September 2012 23:06, Thomas Spura wrote: >>> - Should the IPython package you download include translation files, >>> or should they be separately downloadable? >> >> I think the package have to include the translations, at least if they >> are not big (which will be the case at the beginning). > > I cannot remember a project, which splits the translations into > another repository off hand... I'm conscious that we recommend that people install IPython inside every virtualenv where they're using it, so we want the installation to be as quick and light as possible. The example from Maemo looks like it would recompile every .po file to .mo on installation, which I would prefer to avoid if practical. Thomas From nicolas at pettiaux.be Tue Sep 4 01:00:41 2012 From: nicolas at pettiaux.be (Nicolas Pettiaux) Date: Tue, 4 Sep 2012 07:00:41 +0200 Subject: [IPython-dev] internationalisation and translation of ipython In-Reply-To: References: <16242357.L4Hq4o0Kl8@hmeine-pc> Message-ID: 2012/9/4 Thomas Kluyver > On 3 September 2012 23:06, Thomas Spura wrote: > thanks Thomas S for you input. > > I cannot remember a project, which splits the translations into > > another repository off hand... > > maybe not split the translation, but distribute them separately. When they are large, it is done. See kde, libreOffice, Gnome. But I beleive that for ipython (menus, basic help ...) it will not be much at all. > I'm conscious that we recommend that people install IPython inside > every virtualenv where they're using it, so we want the installation > to be as quick and light as possible. I think it will be. Everything can be automated as far as I know. The .po and .mo file can both be distributed. > The example from Maemo looks > like it would recompile every .po file to .mo on installation, which I > would prefer to avoid if practical. > > I suppose this can be avoided. Need to investigate. Have a good day, NP -- Nicolas Pettiaux, dr. sc - gsm : +32 496 24 55 01 Lepacte.be - ? promouvoir les libert?s num?riques en Belgique ? - hetpact.be -------------- next part -------------- An HTML attachment was scrubbed... URL: From hans_meine at gmx.net Tue Sep 4 08:52:57 2012 From: hans_meine at gmx.net (Hans Meine) Date: Tue, 04 Sep 2012 14:52:57 +0200 Subject: [IPython-dev] Bug in our magic_arguments decorator for building docstrings (ping R. Kern)? In-Reply-To: References: Message-ID: <25916473.9YhpqHY4JC@hmeine-pc> Am Dienstag, 5. Juni 2012, 14:00:51 schrieb Fernando Perez: > On Tue, Jun 5, 2012 at 1:57 PM, Robert Kern wrote: > > We probably want to use the RawDescriptionHelpFormatter: > > > > http://docs.python.org/library/argparse#argparse.RawDescriptionHelpFormatter > > > > Or a custom implementation that removes the leading indentation but > > otherwise leaves the line breaks and indents alone. > > Great, thanks for tracking down at least a path to a solution. > > If anyone has the bandwidth to whip out a fix for this, we'd be very > very grateful. Right now the docs for any magic with more than one > line docstring that uses the argparse decorators is completely > unreadable, so the karma-to-effort ratio of this one is huge. Has this been fixed, or is there a GH issue for this problem? Best, Hans From fperez.net at gmail.com Tue Sep 4 16:05:31 2012 From: fperez.net at gmail.com (Fernando Perez) Date: Tue, 4 Sep 2012 13:05:31 -0700 Subject: [IPython-dev] Bug in our magic_arguments decorator for building docstrings (ping R. Kern)? In-Reply-To: <25916473.9YhpqHY4JC@hmeine-pc> References: <25916473.9YhpqHY4JC@hmeine-pc> Message-ID: On Tue, Sep 4, 2012 at 5:52 AM, Hans Meine wrote: > Has this been fixed, or is there a GH issue for this problem? Fixed here: commit 673e53310ce16220ccc235eb0da56df9f654df4f Merge: 29dc2c6 df97f2d Author: Fernando Perez Date: Mon Jun 11 21:14:18 2012 -0700 Merge pull request #1921 from bfroehle/_1890_magic_arguments_docstring magic_arguments: dedent but otherwise preserve indentation. Previously magic_arguments stripped all whitespace at the beginning of each line, interferi ng with formatting syntax which relies on indentation to give context (e.g., code blocks). Now the docstring text is passed through dedent to strip the global indentation before being handed off to `RawDescriptionHelpFormatter` which preserves any remaining indentation. Thanks to @rkern for suggesting the solution approach. Closes gh-1890. From massimodisasha at gmail.com Wed Sep 5 08:28:55 2012 From: massimodisasha at gmail.com (Massimo Di Stefano) Date: Wed, 5 Sep 2012 08:28:55 -0400 Subject: [IPython-dev] R magic extension and default R graphic drivers In-Reply-To: <249CAC27-8648-40DF-9277-CB2DF8432602@gmail.com> References: <249CAC27-8648-40DF-9277-CB2DF8432602@gmail.com> Message-ID: <26A7A009-FDD5-4F81-ADA7-FC0FB82BC0C8@gmail.com> Hi All, i'm tring to modify withput lucky the src code in the rmagic extension in order to use the "type=cairo" as argument to the png() command. > png(file="myplot.png", bg="transparent", type="cairo'") please have you any hints ? thanks, Massimo. Il giorno Aug 31, 2012, alle ore 7:45 PM, Massimo Di Stefano ha scritto: > Hi All, > > > > i'm trying to run some R code from inside a notebook running on a server that doesn't have X running > the missing X ... generate an error with the default png driver. > > > if i try to run some R code that involve the graphic drivers > i got an error : > > RRuntimeError: Error in X11(paste("png::", filename, sep = ""), g$width, g$height, pointsize, : > unable to start device PNG > > > > full error log is here : > > http://epifanio.whoi.edu/data/img/rext_log.txt > > > > i guess, the reason of this error is because the server doesn't allow X fwd > and seems doesn't have X running at all. > > i can reproduce this error (or similar) also from the R console itself : > > > png(file="myplot.png", bg="transparent") > Error in X11(paste("png::", filename, sep = ""), g$width, g$height, pointsize, : > unable to start device PNG > In addition: Warning message: > In png(file = "myplot.png", bg = "transparent") : > unable to open connection to X11 display '' > > > > it can be avoided if i set the driver to "cairo" : > > > options(bitmapType="cairo") > > png(file="myplot.png", bg="transparent") > > > > The solution in R was to write a file ".Rprofile" in my home directory, so now i don't need anymore to use options(bitmapType="cairo") in the R prompt. > > i was hoping that this option was able to fix also the error inside the IPython notebook .. but instead it persist. > > > > from the error log i can see that in the file : > > IPython/extensions/rmagic.py > > line 515 > > we have : > > self.r('png("%s/Rplots%%03d.png",%s)' % (tmpd, png_args)) > > perhaps it is possible to set the driver to be used directly in rmagic code, > have you any clue on how can i fix this problem? > > thanks a lot! > > Massimo. > > [1] > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From shoibalc at gmail.com Wed Sep 5 09:09:05 2012 From: shoibalc at gmail.com (Shoibal Chakravarty) Date: Wed, 05 Sep 2012 09:09:05 -0400 Subject: [IPython-dev] ipython html notebook server on dotcloud Message-ID: <50474EF1.8080104@gmail.com> An HTML attachment was scrubbed... URL: From carl.input at gmail.com Wed Sep 5 10:19:15 2012 From: carl.input at gmail.com (Carl Smith) Date: Wed, 5 Sep 2012 15:19:15 +0100 Subject: [IPython-dev] ipython html notebook server on dotcloud In-Reply-To: <50474EF1.8080104@gmail.com> References: <50474EF1.8080104@gmail.com> Message-ID: Hi Shoibal On 5 September 2012 14:09, Shoibal Chakravarty wrote: > I am still concerned about security implications of the notebook server. > Ideally, I would like the following: > > 1. Let anybody login with a login/passwd or the various authentication > services. IPython Notebook web servers can, and normally would, use password protection, but this is a single password for that server. You can't do anything more fine-grained at the moment. It's fundamentally a single user system, but I know the developers are deeply engaged in adding support for multiple users in the near future, and this will obviously need to be secure. It's a major todo, but there's a lot of considerations, so it'll take a lot of work to get it right. > 2. Give them a secure walled-in temporary directory to work in, with > restricted shell function access. There was some discussion on this list about that kind of thing. I think Julian Taylor had some good ideas along these lines. There's a lot of interest in these types of uses, but they all depend on crippling IPython, which is a tricky thing to do well. > 3. Limit resources they use (memory, CPU load etc) and automatically log > them out if the violate this. > 4. Limit sessions to xx minutes. I think this would have to be done by the PaaS provider, else users could just hack the loggers. I'm not sure, but I'd imagine that kind of feature would necessarily be external to IPython. Sorry I can't be more help. I expect someone from IPython Dev will be along soon enough, and be a bit more helpful than I've been. All the best with this though Shoibal. It's a good area for exploration, and you can almost always get IPython to do what you want with a little imagination. Carl From jason-sage at creativetrax.com Wed Sep 5 10:26:26 2012 From: jason-sage at creativetrax.com (Jason Grout) Date: Wed, 05 Sep 2012 09:26:26 -0500 Subject: [IPython-dev] ipython html notebook server on dotcloud In-Reply-To: <50474EF1.8080104@gmail.com> References: <50474EF1.8080104@gmail.com> Message-ID: <50476112.7090105@creativetrax.com> On 9/5/12 8:09 AM, Shoibal Chakravarty wrote: > 1. Let anybody login with a login/passwd or the various authentication > services. > 2. Give them a secure walled-in temporary directory to work in, with > restricted shell function access. > 3. Limit resources they use (memory, CPU load etc) and automatically log > them out if the violate this. > 4. Limit sessions to xx minutes. > 5. Set up a parallel database service for authentication and to let > users save their notebooks etc. (eg, MongoDB uses json as storage) > > Which of these would be easily feasible? Especially point 2. Sage seems > to create (and later destroy) a temporary working directory for each > cell and severely limits shell access. One directory per login with > limited outside access might be better. It's certainly a difficult problem, since you are basically giving them shell access. I think it boils down to having a very restricted user account, quotas, and making sure there aren't, for example, world-writable files anywhere. All inside of some sort of VM that is easy to reset to a known good state. You're right about Sage's approach. There are several efforts to make things more secure and scalable now, including the Sage Cell Server which relies on the IPython infrastructure. Let me know if you want more details. Thanks, Jason From shoibalc at gmail.com Wed Sep 5 12:04:57 2012 From: shoibalc at gmail.com (Shoibal Chakravarty) Date: Wed, 05 Sep 2012 12:04:57 -0400 Subject: [IPython-dev] ipython html notebook server on dotcloud In-Reply-To: References: <50474EF1.8080104@gmail.com> Message-ID: <50477829.1070304@gmail.com> Yes, IPython is currently a single user system. Even if it is possible to add login/password or authentication layer on top of the IPython Dashboard (before the singer server password) without much effort it doesn't solve the security problem as the almost unlimited shell access is still there. dotCloud runs servers on Amazon and gives me a sort of a 'restricted user account' to host apps. In this case, the IPython notebook server is the app. The dotcloud platform uses supervisord to run ipython, not sure how much more work should go in to monitor individual notebooks and terminate those that violate resource usage. Should be possible, at least in theory. I am not sure how restricted shell access in a walled directory would work. In a way, this is the problem that these PaaS companies have actually solved to provide the platform. -Shoibal. On 09/05/2012 10:19 AM, Carl Smith wrote: > Hi Shoibal > > On 5 September 2012 14:09, Shoibal Chakravarty wrote: >> I am still concerned about security implications of the notebook server. >> Ideally, I would like the following: >> >> 1. Let anybody login with a login/passwd or the various authentication >> services. > IPython Notebook web servers can, and normally would, use password > protection, but this is a single password for that server. You can't > do anything more fine-grained at the moment. It's fundamentally a > single user system, but I know the developers are deeply engaged in > adding support for multiple users in the near future, and this will > obviously need to be secure. It's a major todo, but there's a lot of > considerations, so it'll take a lot of work to get it right. > >> 2. Give them a secure walled-in temporary directory to work in, with >> restricted shell function access. > There was some discussion on this list about that kind of thing. I > think Julian Taylor had some good ideas along these lines. There's a > lot of interest in these types of uses, but they all depend on > crippling IPython, which is a tricky thing to do well. > >> 3. Limit resources they use (memory, CPU load etc) and automatically log >> them out if the violate this. >> 4. Limit sessions to xx minutes. > I think this would have to be done by the PaaS provider, else users > could just hack the loggers. I'm not sure, but I'd imagine that kind > of feature would necessarily be external to IPython. > > Sorry I can't be more help. I expect someone from IPython Dev will be > along soon enough, and be a bit more helpful than I've been. All the > best with this though Shoibal. It's a good area for exploration, and > you can almost always get IPython to do what you want with a little > imagination. > > Carl > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > From ellisonbg at gmail.com Wed Sep 5 18:58:22 2012 From: ellisonbg at gmail.com (Brian Granger) Date: Wed, 5 Sep 2012 15:58:22 -0700 Subject: [IPython-dev] ipython html notebook server on dotcloud In-Reply-To: <50474EF1.8080104@gmail.com> References: <50474EF1.8080104@gmail.com> Message-ID: Shoibal, Hi, these are things we are interested in. There are a number of different issues you are bringing up: * Making the notebook server multiuser aware. This is definitely on our radar and we are trying to get this work funded through academic grants. We are at the early stages of the planning of this. * Running the notebook server on PaaS platforms. This is an entirely separate issue that we will have to revisit in the future - stay tuned for more on this in the coming months. One issue you will run into though is that we rely on zeromq/pyzmq which definitely doesn't run on most of the Paas vendors I know of. Cheers, Brian On Wed, Sep 5, 2012 at 6:09 AM, Shoibal Chakravarty wrote: > Hi, > > I just got interested in the possibility of getting ipython html notebook > server on the various Platform as a Service (PaaS) ideas out there: > Openshift, dotcloud, heroku, appfog etc. I was interested in seeing if I > could get people to try out my other python projects [energy economics > modeling] without having to take the trouble of downloading and compiling a > lot of different packages. I would put everything required on one of these > free PaaS services and have them try it out via the ipython notebook > interface. > > Carl Smith's notebookcloud (http://github.com/carlsmith) was another > inspiration. The PaaS approach is a baby version of the AMI approach of > notebookcloud. I let the PaaS vendors take care of the building and > maintaining the AWS infrastructure. It also happens to be completely free > for small applications. > > > Most of the Paas services do not support websockets and and often expect > only wsgi compliant python web servers. Only dotcloud > (http://www.dotcloud.com/) seems to work for now with tornado and > websockets. See http://github.com/shoibalc/ipynbserver-dotcloud. > > > I am still concerned about security implications of the notebook server. > Ideally, I would like the following: > > 1. Let anybody login with a login/passwd or the various authentication > services. > 2. Give them a secure walled-in temporary directory to work in, with > restricted shell function access. > 3. Limit resources they use (memory, CPU load etc) and automatically log > them out if the violate this. > 4. Limit sessions to xx minutes. > 5. Set up a parallel database service for authentication and to let users > save their notebooks etc. (eg, MongoDB uses json as storage) > > Which of these would be easily feasible? Especially point 2. Sage seems to > create (and later destroy) a temporary working directory for each cell and > severely limits shell access. One directory per login with limited outside > access might be better. > > Please let me know what ideas/suggestions you have. Thanks a lot for > ipython! > > -Shoibal. > > > _______________________________________________ > 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 carl.input at gmail.com Wed Sep 5 19:04:04 2012 From: carl.input at gmail.com (Carl Smith) Date: Thu, 6 Sep 2012 00:04:04 +0100 Subject: [IPython-dev] ipython html notebook server on dotcloud In-Reply-To: References: <50474EF1.8080104@gmail.com> Message-ID: You may want to speak to the PaaS provider. A lot of what you'd like to do comes down to how their platform works. IPython is not your typical web app. On Sep 5, 2012 11:58 PM, "Brian Granger" wrote: > Shoibal, > > Hi, these are things we are interested in. There are a number of > different issues you are bringing up: > > * Making the notebook server multiuser aware. This is definitely on > our radar and we are trying to get this work funded through academic > grants. We are at the early stages of the planning of this. > * Running the notebook server on PaaS platforms. This is an entirely > separate issue that we will have to revisit in the future - stay tuned > for more on this in the coming months. One issue you will run into > though is that we rely on zeromq/pyzmq which definitely doesn't run on > most of the Paas vendors I know of. > > Cheers, > > Brian > > > On Wed, Sep 5, 2012 at 6:09 AM, Shoibal Chakravarty > wrote: > > Hi, > > > > I just got interested in the possibility of getting ipython html notebook > > server on the various Platform as a Service (PaaS) ideas out there: > > Openshift, dotcloud, heroku, appfog etc. I was interested in seeing if I > > could get people to try out my other python projects [energy economics > > modeling] without having to take the trouble of downloading and > compiling a > > lot of different packages. I would put everything required on one of > these > > free PaaS services and have them try it out via the ipython notebook > > interface. > > > > Carl Smith's notebookcloud (http://github.com/carlsmith) was another > > inspiration. The PaaS approach is a baby version of the AMI approach of > > notebookcloud. I let the PaaS vendors take care of the building and > > maintaining the AWS infrastructure. It also happens to be completely free > > for small applications. > > > > > > Most of the Paas services do not support websockets and and often expect > > only wsgi compliant python web servers. Only dotcloud > > (http://www.dotcloud.com/) seems to work for now with tornado and > > websockets. See http://github.com/shoibalc/ipynbserver-dotcloud. > > > > > > I am still concerned about security implications of the notebook server. > > Ideally, I would like the following: > > > > 1. Let anybody login with a login/passwd or the various authentication > > services. > > 2. Give them a secure walled-in temporary directory to work in, with > > restricted shell function access. > > 3. Limit resources they use (memory, CPU load etc) and automatically log > > them out if the violate this. > > 4. Limit sessions to xx minutes. > > 5. Set up a parallel database service for authentication and to let users > > save their notebooks etc. (eg, MongoDB uses json as storage) > > > > Which of these would be easily feasible? Especially point 2. Sage seems > to > > create (and later destroy) a temporary working directory for each cell > and > > severely limits shell access. One directory per login with limited > outside > > access might be better. > > > > Please let me know what ideas/suggestions you have. Thanks a lot for > > ipython! > > > > -Shoibal. > > > > > > _______________________________________________ > > 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: From shoibalc at gmail.com Wed Sep 5 20:10:10 2012 From: shoibalc at gmail.com (Shoibal Chakravarty) Date: Wed, 05 Sep 2012 20:10:10 -0400 Subject: [IPython-dev] ipython html notebook server on dotcloud In-Reply-To: References: <50474EF1.8080104@gmail.com> Message-ID: <5047E9E2.70905@gmail.com> An HTML attachment was scrubbed... URL: From fperez.net at gmail.com Wed Sep 5 22:32:41 2012 From: fperez.net at gmail.com (Fernando Perez) Date: Wed, 5 Sep 2012 19:32:41 -0700 Subject: [IPython-dev] R magic extension and default R graphic drivers In-Reply-To: References: <249CAC27-8648-40DF-9277-CB2DF8432602@gmail.com> <26A7A009-FDD5-4F81-ADA7-FC0FB82BC0C8@gmail.com> Message-ID: On Wed, Sep 5, 2012 at 7:18 PM, Fernando Perez wrote: > Unfortunately I'm not an R expert, I don't know. I've pinged the > author of that code in case he has some wisdom he can share with us. Never mind, as I was about to hit send, I double-checked and realized that Jonathan is indeed subscribed to this list. So there's no need for a separate ping, hopefully he'll be able to give you some pointers. Cheers, f From fperez.net at gmail.com Wed Sep 5 22:18:24 2012 From: fperez.net at gmail.com (Fernando Perez) Date: Wed, 5 Sep 2012 19:18:24 -0700 Subject: [IPython-dev] R magic extension and default R graphic drivers In-Reply-To: <26A7A009-FDD5-4F81-ADA7-FC0FB82BC0C8@gmail.com> References: <249CAC27-8648-40DF-9277-CB2DF8432602@gmail.com> <26A7A009-FDD5-4F81-ADA7-FC0FB82BC0C8@gmail.com> Message-ID: On Wed, Sep 5, 2012 at 5:28 AM, Massimo Di Stefano wrote: > i'm tring to modify withput lucky the src code in the rmagic extension > in order to use the "type=cairo" as argument to the png() command. > > png(file="myplot.png", bg="transparent", type="cairo'") > > > please have you any hints ? Unfortunately I'm not an R expert, I don't know. I've pinged the author of that code in case he has some wisdom he can share with us. Cheers, f From fperez.net at gmail.com Wed Sep 5 22:46:49 2012 From: fperez.net at gmail.com (Fernando Perez) Date: Wed, 5 Sep 2012 19:46:49 -0700 Subject: [IPython-dev] Installation of ipython on cygwin In-Reply-To: <1346390393.13841.0.camel@bomberx.somewhere-in-the-space.org> References: <1346390393.13841.0.camel@bomberx.somewhere-in-the-space.org> Message-ID: On Thu, Aug 30, 2012 at 10:19 PM, Arnaud Gardelein wrote: > It seems that ipython got installed fine on my cygwin install. Just in > case if it could help anybody else here is the approximate procedure that > was followed: Thanks for the info! It's worth noting that those who don't need matplotlib should be fine with simply installing on top of their base cygwin python, the libffi requirement should be only for matplotlib. cheers, f From shoibalc at gmail.com Thu Sep 6 00:07:24 2012 From: shoibalc at gmail.com (Shoibal Chakravarty) Date: Thu, 06 Sep 2012 00:07:24 -0400 Subject: [IPython-dev] ipython html notebook server on dotcloud In-Reply-To: <50476112.7090105@creativetrax.com> References: <50474EF1.8080104@gmail.com> <50476112.7090105@creativetrax.com> Message-ID: <5048217C.1090009@gmail.com> Hi Jason, I'd definitely be interested in learning more about sagecell. Is there a design document that I could look at? Thanks, Shoibal. On 09/05/2012 10:26 AM, Jason Grout wrote: > On 9/5/12 8:09 AM, Shoibal Chakravarty wrote: > >> 1. Let anybody login with a login/passwd or the various authentication >> services. >> 2. Give them a secure walled-in temporary directory to work in, with >> restricted shell function access. >> 3. Limit resources they use (memory, CPU load etc) and automatically log >> them out if the violate this. >> 4. Limit sessions to xx minutes. >> 5. Set up a parallel database service for authentication and to let >> users save their notebooks etc. (eg, MongoDB uses json as storage) >> >> Which of these would be easily feasible? Especially point 2. Sage seems >> to create (and later destroy) a temporary working directory for each >> cell and severely limits shell access. One directory per login with >> limited outside access might be better. > > It's certainly a difficult problem, since you are basically giving them shell access. I > think it boils down to having a very restricted user account, quotas, and making sure > there aren't, for example, world-writable files anywhere. All inside of some sort of VM > that is easy to reset to a known good state. > > You're right about Sage's approach. There are several efforts to make things more > secure and scalable now, including the Sage Cell Server which relies on the IPython > infrastructure. Let me know if you want more details. > > Thanks, > > Jason > > From jason-sage at creativetrax.com Thu Sep 6 00:19:51 2012 From: jason-sage at creativetrax.com (Jason Grout) Date: Wed, 05 Sep 2012 23:19:51 -0500 Subject: [IPython-dev] ipython html notebook server on dotcloud In-Reply-To: <5048217C.1090009@gmail.com> References: <50474EF1.8080104@gmail.com> <50476112.7090105@creativetrax.com> <5048217C.1090009@gmail.com> Message-ID: <50482467.4010505@creativetrax.com> On 9/5/12 11:07 PM, Shoibal Chakravarty wrote: > Hi Jason, > > I'd definitely be interested in learning more about sagecell. Is there a design document > that I could look at? We're working on one. The code base is in the contrib/ipython-testing directory: https://github.com/sagemath/sagecell/tree/master/contrib/ipython-testing Very briefly: The web_server.py file is the main program that is run. The webserver has a trusted multikernel manager that talks to an untrusted multikernel manager (typically another account or another computer) over zmq. The untrusted multikernel manager receives a request to start up a session and uses the forking kernel manager to create a session by forking and hook up the zmq channels to the webserver. William Stein is also working on a new design and architecture for scalable and secure scientific computing like the notebook which looks very promising. That's one of his top priorities over the next 6-8 months or so. Thanks, Jason From stefan at sun.ac.za Thu Sep 6 04:57:21 2012 From: stefan at sun.ac.za (=?ISO-8859-1?Q?St=E9fan_van_der_Walt?=) Date: Thu, 6 Sep 2012 01:57:21 -0700 Subject: [IPython-dev] nbviewer not working for all URLs? Message-ID: Hi everyone I recently discovered nbviewer.ipython.org, with which I'm trying to view https://raw.github.com/jbpoline/nipy-notebooks/master/principles_statistics.ipynb Unfortunately, that fails. Is nbviewer part of the main IPython project or, if not, whom can I contact to resolve the problem? St?fan From takowl at gmail.com Thu Sep 6 06:57:37 2012 From: takowl at gmail.com (Thomas Kluyver) Date: Thu, 6 Sep 2012 11:57:37 +0100 Subject: [IPython-dev] nbviewer not working for all URLs? In-Reply-To: References: Message-ID: On 6 September 2012 09:57, St?fan van der Walt wrote: > Unfortunately, that fails. Is nbviewer part of the main IPython > project or, if not, whom can I contact to resolve the problem? There's a repository here that you can file an issue against: https://github.com/ipython/nbviewer I'm a bit mystified by the failure - I used it just yesterday with a Github raw view URL without any problem. Thomas From shoibalc at gmail.com Thu Sep 6 16:34:03 2012 From: shoibalc at gmail.com (Shoibal Chakravarty) Date: Thu, 06 Sep 2012 16:34:03 -0400 Subject: [IPython-dev] ipython html notebook server on dotcloud In-Reply-To: <50482467.4010505@creativetrax.com> References: <50474EF1.8080104@gmail.com> <50476112.7090105@creativetrax.com> <5048217C.1090009@gmail.com> <50482467.4010505@creativetrax.com> Message-ID: <504908BB.9060905@gmail.com> Hi Jason, I decided to try to get sage cell server work without any sage dependencies ( ie, I removed jmol). Strangely, I get an output in the bottom cell only when ipython returns an error but not otherwise. Are stdout and stderr handled differently? Does this have to do with the version of ipython and other packages used in sage vs the most recent ones. Thanks, Shoibal. On 09/06/2012 12:19 AM, Jason Grout wrote: > On 9/5/12 11:07 PM, Shoibal Chakravarty wrote: >> Hi Jason, >> >> I'd definitely be interested in learning more about sagecell. Is there a design document >> that I could look at? > We're working on one. The code base is in the contrib/ipython-testing > directory: > https://github.com/sagemath/sagecell/tree/master/contrib/ipython-testing > > Very briefly: The web_server.py file is the main program that is run. > The webserver has a trusted multikernel manager that talks to an > untrusted multikernel manager (typically another account or another > computer) over zmq. The untrusted multikernel manager receives a > request to start up a session and uses the forking kernel manager to > create a session by forking and hook up the zmq channels to the webserver. > > William Stein is also working on a new design and architecture for > scalable and secure scientific computing like the notebook which looks > very promising. That's one of his top priorities over the next 6-8 > months or so. > > Thanks, > > Jason > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > From takowl at gmail.com Thu Sep 6 16:34:37 2012 From: takowl at gmail.com (Thomas Kluyver) Date: Thu, 6 Sep 2012 21:34:37 +0100 Subject: [IPython-dev] IPython In-process kernel support Message-ID: Hi Pierre, There's a pull request open to allow the IPython Qt console to use an in-process kernel. I thought you might be interested in using something like this in Spyder. If you'd like to take a look, we'd welcome any feedback: https://github.com/ipython/ipython/pull/2382 Thanks, Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From jason-sage at creativetrax.com Thu Sep 6 16:37:36 2012 From: jason-sage at creativetrax.com (Jason Grout) Date: Thu, 06 Sep 2012 15:37:36 -0500 Subject: [IPython-dev] ipython html notebook server on dotcloud In-Reply-To: <504908BB.9060905@gmail.com> References: <50474EF1.8080104@gmail.com> <50476112.7090105@creativetrax.com> <5048217C.1090009@gmail.com> <50482467.4010505@creativetrax.com> <504908BB.9060905@gmail.com> Message-ID: <50490990.3020707@creativetrax.com> On 9/6/12 3:34 PM, Shoibal Chakravarty wrote: > Hi Jason, > > I decided to try to get sage cell server work without any sage dependencies ( ie, I > removed jmol). > > Strangely, I get an output in the bottom cell only when ipython returns an error but not > otherwise. Are stdout and stderr handled differently? Does this have to do with the > version of ipython and other packages used in sage vs the most recent ones. > I have no idea; I'm not sure exactly what you were trying and what codebase you were working from. Can you describe exactly what you tried? Thanks, Jason From jason-sage at creativetrax.com Thu Sep 6 16:43:15 2012 From: jason-sage at creativetrax.com (Jason Grout) Date: Thu, 06 Sep 2012 15:43:15 -0500 Subject: [IPython-dev] ipython html notebook server on dotcloud In-Reply-To: <504908BB.9060905@gmail.com> References: <50474EF1.8080104@gmail.com> <50476112.7090105@creativetrax.com> <5048217C.1090009@gmail.com> <50482467.4010505@creativetrax.com> <504908BB.9060905@gmail.com> Message-ID: <50490AE3.4020003@creativetrax.com> On 9/6/12 3:34 PM, Shoibal Chakravarty wrote: > Are stdout and stderr handled differently? Differently than what? We use the standard IPython stdout and stderr messages to return that information. As for versions, the current cell server requires several packages that don't come with Sage right now. See https://github.com/sagemath/sagecell/issues/344 for some instructions that I think are still current. We do assume Sage, but the actual dependencies are pretty small and can be deleted. Make sure you are working with the codebase in contrib/ipython-testing/ Thanks, Jason From shoibalc at gmail.com Thu Sep 6 17:01:35 2012 From: shoibalc at gmail.com (Shoibal Chakravarty) Date: Thu, 06 Sep 2012 17:01:35 -0400 Subject: [IPython-dev] ipython html notebook server on dotcloud In-Reply-To: <50490990.3020707@creativetrax.com> References: <50474EF1.8080104@gmail.com> <50476112.7090105@creativetrax.com> <5048217C.1090009@gmail.com> <50482467.4010505@creativetrax.com> <504908BB.9060905@gmail.com> <50490990.3020707@creativetrax.com> Message-ID: <50490F2F.2060105@gmail.com> I got web_server.py in /sagecell/contrib/ipython-testing to run without any exceptions using the usual python on my system (2.7.3) and required packages from pypi. For example: $ python web_server.py -p 8999 ZMQ Connection with computer d8da68f4-57e2-42e8-976a-8e255cd6d646 at port 62165 established. A proper input in the Sage cell doesn't produce an output but anything that triggers an exception does. The dependencies needed in a virtualenv are: $ pip freeze SQLAlchemy==0.7.8 argparse==1.2.1 gevent==0.13.8 greenlet==0.4.0 ipython==0.13 nose==1.1.2 paramiko==1.7.7.2 pycrypto==2.6 pyzmq==2.2.0.1 -e git+https://github.com/mrjoes/sockjs-tornado.git at 70fba807ad934ca1e0cbaa82c0ab98930442ed96#egg=sockjs_tornado-dev tornado==2.4 websocket==0.2.1 wsgiref==0.1.2 On 09/06/2012 04:37 PM, Jason Grout wrote: > On 9/6/12 3:34 PM, Shoibal Chakravarty wrote: >> Hi Jason, >> >> I decided to try to get sage cell server work without any sage dependencies ( ie, I >> removed jmol). >> >> Strangely, I get an output in the bottom cell only when ipython returns an error but not >> otherwise. Are stdout and stderr handled differently? Does this have to do with the >> version of ipython and other packages used in sage vs the most recent ones. >> > I have no idea; I'm not sure exactly what you were trying and what > codebase you were working from. Can you describe exactly what you tried? > > Thanks, > > Jason > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > From epatters at enthought.com Thu Sep 6 17:14:42 2012 From: epatters at enthought.com (Evan Patterson) Date: Thu, 6 Sep 2012 16:14:42 -0500 Subject: [IPython-dev] IPython In-process kernel support In-Reply-To: References: Message-ID: Thanks for the shout out, Thomas. I'm now at the point where some thorough code review would be useful. Although more testing is definitely required, all the most important functionality is working. The only known omission is raw_input for the terminal frontend, but using an in-process kernel with a terminal frontend seems a bit perverse, to say the least. Evan On Thu, Sep 6, 2012 at 3:34 PM, Thomas Kluyver wrote: > Hi Pierre, > > There's a pull request open to allow the IPython Qt console to use an > in-process kernel. I thought you might be interested in using something > like this in Spyder. If you'd like to take a look, we'd welcome any > feedback: > > https://github.com/ipython/ipython/pull/2382 > > 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: From takowl at gmail.com Thu Sep 6 17:20:04 2012 From: takowl at gmail.com (Thomas Kluyver) Date: Thu, 6 Sep 2012 22:20:04 +0100 Subject: [IPython-dev] IPython In-process kernel support In-Reply-To: References: Message-ID: Is there any major obstacle to implementing raw_input in the terminal frontend, or do you think it's just not worth it? From epatters at enthought.com Thu Sep 6 17:39:36 2012 From: epatters at enthought.com (Evan Patterson) Date: Thu, 6 Sep 2012 16:39:36 -0500 Subject: [IPython-dev] IPython In-process kernel support In-Reply-To: References: Message-ID: There is no real obstacle, but it isn't very convenient. The trouble is that the terminal frontend is truly synchronous, unlike a GUI frontend which is driven by an event loop. Here is how the terminal frontend executes code: https://github.com/ipython/ipython/blob/master/IPython/frontend/terminal/console/interactiveshell.py#L94 You can see that 'handle_stdin_request' will never be called. To handle stdin, something must be special cased: the terminal frontend, the embedded kernel, or the embedded kernel manager. I'm not sure how to handle this cleanly. Perhaps the simplest thing is to add a switch to the kernel for calling 'raw_input' directly (bypassing the kernel manager). Only terminal frontends would use this switch. Perhaps others have better ideas. Evan On Thu, Sep 6, 2012 at 4:20 PM, Thomas Kluyver wrote: > Is there any major obstacle to implementing raw_input in the terminal > frontend, or do you think it's just not worth it? > _______________________________________________ > 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: From ccordoba12 at gmail.com Thu Sep 6 17:42:19 2012 From: ccordoba12 at gmail.com (=?UTF-8?B?Q2FybG9zIEPDs3Jkb2Jh?=) Date: Thu, 06 Sep 2012 16:42:19 -0500 Subject: [IPython-dev] IPython In-process kernel support In-Reply-To: References: Message-ID: <504918BB.6030105@gmail.com> Hi, I'm the Spyder dev who has contributed most of the code to integrate it with IPython. I already left some comments on the pull request, with simple doubts about how we can use this new code. It's really promising, thanks Evan for taking the time to implement it. About raw_input, I think Robert Kern (in his original gist) caught it and transformed to a QInputDialog. It would be nice to have something like that before merging. Cheers, Carlos El 06/09/12 15:34, Thomas Kluyver escribi?: > Hi Pierre, > > There's a pull request open to allow the IPython Qt console to use an > in-process kernel. I thought you might be interested in using > something like this in Spyder. If you'd like to take a look, we'd > welcome any feedback: > > https://github.com/ipython/ipython/pull/2382 > > Thanks, > Thomas > > > This body part will be downloaded on demand. -------------- next part -------------- An HTML attachment was scrubbed... URL: From takowl at gmail.com Thu Sep 6 18:08:29 2012 From: takowl at gmail.com (Thomas Kluyver) Date: Thu, 6 Sep 2012 23:08:29 +0100 Subject: [IPython-dev] IPython In-process kernel support In-Reply-To: References: Message-ID: On 6 September 2012 22:39, Evan Patterson wrote: > You can see that 'handle_stdin_request' will never be called. To handle > stdin, something must be special cased: the terminal frontend, the embedded > kernel, or the embedded kernel manager. I'm not sure how to handle this > cleanly. Perhaps the simplest thing is to add a switch to the kernel for > calling 'raw_input' directly (bypassing the kernel manager). Only terminal > frontends would use this switch. Perhaps others have better ideas. OK, that makes sense. My inclination would be to leave it until someone finds they actually need it - as you say, running in the terminal with a local kernel seems a bit odd. If it did become necessary, another possible route would be to run the kernel in its own thread, so a degree of asynchronous execution was possible. Although I'm sure any solution with the word 'thread' in has its share of problems. > About raw_input, I think Robert Kern (in his original gist) caught it and transformed to a QInputDialog. It would be nice to have something like that before merging. If I understand Evan correctly, the problem with raw_input is only when using this in the terminal frontend. In the Qt console, I assume it behaves like a remote kernel - the prompt appears inline. Evan, can you confirm that? Thanks, Thomas From epatters at enthought.com Thu Sep 6 18:12:24 2012 From: epatters at enthought.com (Evan Patterson) Date: Thu, 6 Sep 2012 17:12:24 -0500 Subject: [IPython-dev] IPython In-process kernel support In-Reply-To: References: Message-ID: On Thu, Sep 6, 2012 at 5:08 PM, Thomas Kluyver wrote: > On 6 September 2012 22:39, Evan Patterson wrote: > > You can see that 'handle_stdin_request' will never be called. To handle > > stdin, something must be special cased: the terminal frontend, the > embedded > > kernel, or the embedded kernel manager. I'm not sure how to handle this > > cleanly. Perhaps the simplest thing is to add a switch to the kernel for > > calling 'raw_input' directly (bypassing the kernel manager). Only > terminal > > frontends would use this switch. Perhaps others have better ideas. > > OK, that makes sense. My inclination would be to leave it until > someone finds they actually need it - as you say, running in the > terminal with a local kernel seems a bit odd. If it did become > necessary, another possible route would be to run the kernel in its > own thread, so a degree of asynchronous execution was possible. > Although I'm sure any solution with the word 'thread' in has its share > of problems. > > > About raw_input, I think Robert Kern (in his original gist) caught it > and transformed to a QInputDialog. It would be nice to have something like > that before merging. > > If I understand Evan correctly, the problem with raw_input is only > when using this in the terminal frontend. In the Qt console, I assume > it behaves like a remote kernel - the prompt appears inline. Evan, can > you confirm that? > Yes, that's exactly how it works. Evan -------------- next part -------------- An HTML attachment was scrubbed... URL: From bedwards at cs.unm.edu Thu Sep 6 18:50:20 2012 From: bedwards at cs.unm.edu (Ben Edwards) Date: Thu, 6 Sep 2012 16:50:20 -0600 Subject: [IPython-dev] (no subject) Message-ID: Sorry if this is posted twice, sent it from the wrong email... For the last week or so I've been working on Mathematica and MATLAB extensions for the IPython notebook. I've been shamelessly copying and modifying code from the octave extension. The Mathematica one is in pretty good working order, you can check it out at (and test it please!): https://github.com/bjedwards/IPython-mathematicamagic-extension I know there doesn't need to be an extension for everything under the sun, but this seems like it might be useful to include. Unless there is some reason to not include extensions to non-free software, which is probably reasonable. Could this possibly be included in IPython, or should it stay an external extension? If it is to stay external I'll perhaps announce it on the user list. Ben Edwards -------------- next part -------------- An HTML attachment was scrubbed... URL: From takowl at gmail.com Thu Sep 6 19:03:19 2012 From: takowl at gmail.com (Thomas Kluyver) Date: Fri, 7 Sep 2012 00:03:19 +0100 Subject: [IPython-dev] (no subject) In-Reply-To: References: Message-ID: Hi Ben, On 6 September 2012 23:50, Ben Edwards wrote: > I know there doesn't need to be an extension for everything under the sun, > but this seems like it might be useful to include. Unless there is some > reason to not include extensions to non-free software, which is probably > reasonable. Could this possibly be included in IPython, or should it stay an > external extension? If it is to stay external I'll perhaps announce it on > the user list. I don't have a major objection to interfacing with proprietary software, but I think it makes sense for most extensions to be externally maintained. The idea of an extension system is that you can make things like this without having to get them included in IPython. I'd encourage you to add it to the extension index on the wiki, as well as making an announcement: http://wiki.ipython.org/Extensions_Index Also, we can easily include an extension later if we realise it would be more valuable like that, but dropping a default extension is more disruptive. Best wishes, Thomas From takowl at gmail.com Thu Sep 6 19:21:36 2012 From: takowl at gmail.com (Thomas Kluyver) Date: Fri, 7 Sep 2012 00:21:36 +0100 Subject: [IPython-dev] Windows build service Message-ID: Hi all, At my request, ShiningPanda have activated a Windows build environment for our project, and even thrown in $5 of free build credits to experiment with it. After some fiddling, tests on Python 2.7 are passing: https://jenkins.shiningpanda.com/ipython/job/ipython-win-py27/ This is currently set up to run at a rather conservative twice per week. But any of the core devs* can trigger an immediate run, and we might want to increase the rate near release time. I also tried to get a Python 3.2 job running, but at present a bug in distribute (https://bitbucket.org/tarek/distribute/issue/284/get_exe_prefixes-passes-bytes-to ) prevents us installing pywin32 inside the virtualenv. If anyone more Windows-savvy knows a workaround, your help would be appreciated! Otherwise, hopefully we'll get a fix in place before long. Best wishes, Thomas * Core devs: if you don't have access to our project on ShiningPanda and you want it, let me know. From fperez.net at gmail.com Fri Sep 7 00:17:54 2012 From: fperez.net at gmail.com (Fernando Perez) Date: Thu, 6 Sep 2012 21:17:54 -0700 Subject: [IPython-dev] (no subject) In-Reply-To: References: Message-ID: On Thu, Sep 6, 2012 at 4:03 PM, Thomas Kluyver wrote: > Also, we can easily include an extension later if we realise it would > be more valuable like that, but dropping a default extension is more > disruptive. Pretty much agreeing with everything Thomas said :) And thanks for creating the Mathematica one, that could be very useful to many (and would have been to me a few years ago). As long as *your* code is properly licensed, there's no problem in having IPython extensions that interface with proprietary tools, especially high-value/interest ones such as Mathematica and Matlab. I agree that we should probably start with having it independently maintained at least for now, in particular because putting it in the core creates a testing problem for us: we can all have machines configured with cython, R and octave to run a full test suite, but we don't necessarily have Mathematica or Matlab available for testing. As long as you maintain it, you can ensure that it remains in working condition. But we're very happy to see this contribution, by all means add it to the extensions index! Cheers, f From fperez.net at gmail.com Fri Sep 7 04:20:49 2012 From: fperez.net at gmail.com (Fernando Perez) Date: Fri, 7 Sep 2012 01:20:49 -0700 Subject: [IPython-dev] Bitey magic extension In-Reply-To: References: Message-ID: On Sat, Aug 25, 2012 at 4:00 AM, Thomas Kluyver wrote: > Very neat! We've just had a talk from David Beazley (the author of Bitey), > so it's well timed. Indeed! BTW, this should probably go into the extension index on the wiki... From fperez.net at gmail.com Fri Sep 7 04:26:48 2012 From: fperez.net at gmail.com (Fernando Perez) Date: Fri, 7 Sep 2012 01:26:48 -0700 Subject: [IPython-dev] Blogging from the notebook Message-ID: Hi folks, I had to answer a question from a colleague today about how to use the notebook to blog, and I ended up spending a bit more time on it than I should (the fact that I had to write a grant helped, I'm sure... Matthew can shoot me now). But I suspect others will find this useful: http://blog.fperez.org/2012/09/blogging-with-ipython-notebook.html Kudos to everyone who has worked on nbconvert to improve it and make this possible. We should be able to streamline this further without too much difficulty, but even now, once configured the amount of manual labor involved is really minimal. Cheers, f From fperez.net at gmail.com Fri Sep 7 04:38:55 2012 From: fperez.net at gmail.com (Fernando Perez) Date: Fri, 7 Sep 2012 01:38:55 -0700 Subject: [IPython-dev] John Hunter's memorial service: Oct 1, 2012 Message-ID: Hi all, I have just received the following information from John's family regarding the memorial service: John's memorial service will be held on Monday, October 1, 2012, at 11.a.m. at Rockefeller Chapel at the University of Chicago. The exact address is 5850 S. Woodlawn Ave, Chicago, IL 60615. The service is open to the public. The service will be fully planned and scripted with no room for people to eulogize, however, we will have a reception after the service, hosted by Tradelink, where people can talk. Regards, f From ellisonbg at gmail.com Fri Sep 7 14:20:22 2012 From: ellisonbg at gmail.com (Brian Granger) Date: Fri, 7 Sep 2012 11:20:22 -0700 Subject: [IPython-dev] Moving all dev docs and IPEPs to github In-Reply-To: References: Message-ID: On Mon, Aug 13, 2012 at 12:04 AM, Fernando Perez wrote: > On Sun, Aug 12, 2012 at 10:02 PM, Brian Granger wrote: >> I propose that we transition all of our dev docs (those focused on >> developing IPython itself) to the github IPython wiki. > > I think that's sensible, but only if we also move the existing wiki > (we've talked about that in the past, with several people in favor, > and Thomas graciously indicating that despite his time being the > largest 'sunk cost' here he wouldn't object either). I don't mind the > current wiki as much as others, but what I do *not* want is to have > two wikis again. In my mind, a user focused wiki and a dev focused wiki could be maintained separately. I really want to keep all of our dev related things on github as it makes our dev process much more discoverable. But I do agree that having two wikis is a bit silly. > So if we're going to activate the github wiki, then that should be our > *only* wiki. That means we'll need to migrate both the current wiki > and the current dev docs to it. > > I'm sort of +0.5 on the idea, and will happily go along if other devs > feel it will really make things better for them. I think that moving everything to github is the best way to have all our dev related docs in one place rather than 3 or 4. I am definitely +1 on the idea. >> I also propose that we host all IPEPs at this same location for >> everyone to edit and view in one place (rather than individual gists). > > Yes, my putting the first IPEP on a gist was just a quick experiment. > At the time, I was thinking we could make a separate repo for IPEPS. > But since the wiki *is* a repo, it would satisfy the criteria I had in > mind at the time (easier access to all IPEPs in one place, easy > updates for anyone who proposes one, ...). Yes, I think we are closing in on a good approach for the IPEPs = github wiki + ipython-dev >> I also propose that we start to think about doing some more deliberate >> planning for the project (like a roadmap) and that we keep that on the >> wiki. Yes, I agree we need something like a roadmap in addition to the IPEPs. > Yes, this is something that we've been hinting and where we > occasionally drop half-discussions on the list, but having a bit of > organization is starting to be necessary. I don't believe in overly > detailed roadmaps, because the nature of open source work is a highly > organic, evolutionary process driven by a combination of individual > interests and the PR review process acting as selective pressure. So > I think there's little point in trying to 'dictate' via a roadmap what > the project needs to be... Yes, our roadmap needs to be informal, flexible, non-verbose and dynamic. I would like something that people feel good about updating often with small bits of information that is useful to all. I don't want something that takes hours to update or is otherwise a burden to us. I think that having most of our dev process managed by issues and PRs works great and I don't want to mess with that. It is just a little bit of the bigger picture stuff that we need a bit more organization on. And honestly, the IPEPs will help with that as well. > But where I think there's a lot of value, and that we have a genuine > need, is in helping us all understand what the 'big ideas' are, what > the main lines of work for the project are and if anyone in particular > is already tackling one or not, so that people can coordinate a bit. > So I think that this roadmap would mostly be in a sense a place to > suggest directions for work that may need an IPEP, or where one or > more people may want to coordinate efforts. > > With that loose definition of roadmap, I'm all for it and I think it > will help us all work better... Great, we just need to make the final decision on the wiki consolidation and we can start to move content over. Cheers, Brian > Cheers, > > f > _______________________________________________ > 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 Fri Sep 7 14:21:20 2012 From: fperez.net at gmail.com (Fernando Perez) Date: Fri, 7 Sep 2012 11:21:20 -0700 Subject: [IPython-dev] John Hunter's memorial service: Oct 1, 2012 In-Reply-To: References: Message-ID: I just received the official announcement, please note the RSVP requirement to Miriam at msierig at gmail.com. John Davidson Hunter, III 1968-2012 [image: Inline image 1] Our family invites you to join us to celebrate and remember the life of John Hunter Memorial Service Rockefeller Chapel 5850 South Woodlawn Chicago, IL 60637 Monday October 1, 2012 11am Service will be followed by a reception where family and friends may gather to share memories of John. Please RSVP to Miriam at msierig at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: jdhj.jpg Type: image/jpeg Size: 370050 bytes Desc: not available URL: From ellisonbg at gmail.com Fri Sep 7 15:16:41 2012 From: ellisonbg at gmail.com (Brian Granger) Date: Fri, 7 Sep 2012 12:16:41 -0700 Subject: [IPython-dev] IPEP 3: Multiuser support in the notebook Message-ID: Hi, Recently, we started to use IPEPs (IPython Enhancement Proposals) to work out the design of significant new developments in IPython. We have had two IPEPs so far, and today we setup a wiki page to track these IPEPs and formalize the process of creating and discussing of IPEPs: https://github.com/ipython/ipython/wiki/IPython-Enhancement-Proposals-(IPEPs) Now that we have a good way of tracking IPEPs, I thought it was a good opportunity to create a new IPEP myself. We have started to get posts on ipython-dev about multiuser capabilities in the notebook. We have previously thought and talked a lot about this, but we haven't written anything down. We are hoping that this IPEP will fix that and move the design forward. If you are interested in multiuser support in the notebook here is what you should do: 1. Read the draft IPEP: https://github.com/ipython/ipython/wiki/IPEP-3:-Multiuser-support-in-the-notebook 2. Discuss the IPEP in this email thread. 3. Help us edit the IPEP as the discussion moves along. Cheers, Brian -- Brian E. Granger Cal Poly State University, San Luis Obispo bgranger at calpoly.edu and ellisonbg at gmail.com From jason-sage at creativetrax.com Fri Sep 7 15:40:50 2012 From: jason-sage at creativetrax.com (Jason Grout) Date: Fri, 07 Sep 2012 14:40:50 -0500 Subject: [IPython-dev] IPEP 3: Multiuser support in the notebook In-Reply-To: References: Message-ID: <504A4DC2.8050508@creativetrax.com> On 9/7/12 2:16 PM, Brian Granger wrote: > Hi, > > 3. Help us edit the IPEP as the discussion moves along. How do we do that? For example the last sentence contains a typo (either->each). I'd like to fix it: how? Thanks, Jason From ellisonbg at gmail.com Fri Sep 7 15:47:28 2012 From: ellisonbg at gmail.com (Brian Granger) Date: Fri, 7 Sep 2012 12:47:28 -0700 Subject: [IPython-dev] IPEP 3: Multiuser support in the notebook In-Reply-To: <504A4DC2.8050508@creativetrax.com> References: <504A4DC2.8050508@creativetrax.com> Message-ID: OK I just changed a setting and you should be able to edit the wiki. On Fri, Sep 7, 2012 at 12:40 PM, Jason Grout wrote: > On 9/7/12 2:16 PM, Brian Granger wrote: >> Hi, >> >> 3. Help us edit the IPEP as the discussion moves along. > > How do we do that? For example the last sentence contains a typo > (either->each). I'd like to fix it: how? > > 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 michael.k.bilow at gmail.com Fri Sep 7 16:48:37 2012 From: michael.k.bilow at gmail.com (Michael Bilow) Date: Fri, 7 Sep 2012 13:48:37 -0700 Subject: [IPython-dev] Confusing NameError in Parallelizing with IPython Message-ID: Hi! I'm new to this list and to IPython, and I started using IPython to parallelize some code I'd written (complete code: https://github.com/chuyelchulo/ipython-nameerror, requires numpy and PIL). I've been encountering a confusing NameError that keeps popping up when I try to run this program: The function to be mapped (parallel_run) is imported from a module different from __main__, but the interpreter complains that the functions and modules used by parallel_run are not part of the namespace. I asked about the error here ( http://stackoverflow.com/questions/12304847/ipython-parallel-computing-namespace-issues), and was told to come to this list. Thanks! Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: From benjaminrk at gmail.com Fri Sep 7 17:04:55 2012 From: benjaminrk at gmail.com (MinRK) Date: Fri, 7 Sep 2012 14:04:55 -0700 Subject: [IPython-dev] Confusing NameError in Parallelizing with IPython In-Reply-To: References: Message-ID: On Fri, Sep 7, 2012 at 1:48 PM, Michael Bilow wrote: > Hi! > > I'm new to this list and to IPython, and I started using IPython to > parallelize some code I'd written (complete code: > https://github.com/chuyelchulo/ipython-nameerror, requires numpy and > PIL). I've been encountering a confusing NameError that keeps popping up > when I try to run this program: The function to be mapped (parallel_run) is > imported from a module different from __main__, but the interpreter > complains that the functions and modules used by parallel_run are not part > of the namespace. > > I asked about the error here ( > http://stackoverflow.com/questions/12304847/ipython-parallel-computing-namespace-issues), > and was told to come to this list. > Hi again! When I do the following: $> cd /path/to/ipython-nameerror $> ipcluster start -n 4 --daemon $> python wrapper_wrapper.py Time elapsed: 5.85908985138 s It seems to work as expected. A few quick questions: 1. what is the cwd when you run ipcluster? Are your engines local or remote? What do you get from: import os import pprint from IPython import parallel client = parallel.Client() pprint.pprint(client[:].apply_async(os.getcwdu).get_dict()) or: %px import wrapper If I start the engines somewhere else such that `wrapper` is not importable, I get the NameErrors you are seeing. -MinRK > Thanks! > > Michael > > _______________________________________________ > 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: From michael.k.bilow at gmail.com Fri Sep 7 17:18:36 2012 From: michael.k.bilow at gmail.com (Michael Bilow) Date: Fri, 7 Sep 2012 14:18:36 -0700 Subject: [IPython-dev] Confusing NameError in Parallelizing with IPython In-Reply-To: References: Message-ID: Wow, you nailed it, thanks. I was running ipcluster start in a different directory from the one my code was in. I still don't understand the provenance of that particular error, but I can see how it could cause one. Thanks! Michael On Fri, Sep 7, 2012 at 2:04 PM, MinRK wrote: > > > On Fri, Sep 7, 2012 at 1:48 PM, Michael Bilow wrote: > >> Hi! >> >> I'm new to this list and to IPython, and I started using IPython to >> parallelize some code I'd written (complete code: >> https://github.com/chuyelchulo/ipython-nameerror, requires numpy and >> PIL). I've been encountering a confusing NameError that keeps popping up >> when I try to run this program: The function to be mapped (parallel_run) is >> imported from a module different from __main__, but the interpreter >> complains that the functions and modules used by parallel_run are not part >> of the namespace. >> >> I asked about the error here ( >> http://stackoverflow.com/questions/12304847/ipython-parallel-computing-namespace-issues), >> and was told to come to this list. >> > > Hi again! > > When I do the following: > > $> cd /path/to/ipython-nameerror > $> ipcluster start -n 4 --daemon > $> python wrapper_wrapper.py > Time elapsed: 5.85908985138 s > > It seems to work as expected. > > A few quick questions: > > 1. what is the cwd when you run ipcluster? Are your engines local or > remote? What do you get from: > > import os > import pprint > from IPython import parallel > > client = parallel.Client() > pprint.pprint(client[:].apply_async(os.getcwdu).get_dict()) > > or: > > %px import wrapper > > If I start the engines somewhere else such that `wrapper` is not > importable, I get the NameErrors you are seeing. > > -MinRK > > >> Thanks! >> >> Michael >> >> _______________________________________________ >> 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: From jason-sage at creativetrax.com Fri Sep 7 18:50:38 2012 From: jason-sage at creativetrax.com (Jason Grout) Date: Fri, 07 Sep 2012 17:50:38 -0500 Subject: [IPython-dev] IPEP 3: Multiuser support in the notebook In-Reply-To: References: <504A4DC2.8050508@creativetrax.com> Message-ID: <504A7A3E.8040609@creativetrax.com> On 9/7/12 2:47 PM, Brian Granger wrote: > OK I just changed a setting and you should be able to edit the wiki. Thanks. It worked. Regarding: "When a user clicks "live share" they will get a private and secure URL they can share with other users. These other users can then edit the notebook and run code on the kernel in a Google Docs like manner." Are you saying that the two of us will be interacting with one running kernel? Or are you saying that we both have different kernels and the outputs are somehow pushed back and forth between our representations? The former seems more likely, but I was just checking. In Sage we have the latter (IIRC), and sometimes it gets really confusing. Thanks, Jason From fperez.net at gmail.com Fri Sep 7 19:19:13 2012 From: fperez.net at gmail.com (Fernando Perez) Date: Fri, 7 Sep 2012 16:19:13 -0700 Subject: [IPython-dev] IPEP 3: Multiuser support in the notebook In-Reply-To: <504A7A3E.8040609@creativetrax.com> References: <504A4DC2.8050508@creativetrax.com> <504A7A3E.8040609@creativetrax.com> Message-ID: On Fri, Sep 7, 2012 at 3:50 PM, Jason Grout wrote: > Are you saying that the two of us will be interacting with one running > kernel? Or are you saying that we both have different kernels and the > outputs are somehow pushed back and forth between our representations? > The former seems more likely, but I was just checking. In Sage we have > the latter (IIRC), and sometimes it gets really confusing. The former. We envision collaboration similar to Gdocs, running against the same kernel, but with cell-level granularity for concurrent typing instead of character-level. When a user starts typing in a cell, the others would see it shaded with that user's name, effectively locking cells, so that they don't trample on each other. Creating a framework for synchronizing at the cell level is easier and less finicky than getting something like google docs that syncs character-by-character. And I also don't quite like the feel of complete 'all hands at the same time' editing gdocs provides, so hopefully this will be a good experience. We'll have to see. Cheers, f From benjaminrk at gmail.com Fri Sep 7 19:55:26 2012 From: benjaminrk at gmail.com (MinRK) Date: Fri, 7 Sep 2012 16:55:26 -0700 Subject: [IPython-dev] Confusing NameError in Parallelizing with IPython In-Reply-To: References: Message-ID: On Fri, Sep 7, 2012 at 2:18 PM, Michael Bilow wrote: > Wow, you nailed it, thanks. I was running ipcluster start in a different > directory from the one my code was in. I still don't understand the > provenance of that particular error, but I can see how it could cause one. Here's a mor detailed exploration of what is happening: import pickle from wrapper import parallel_run print pickle.dumps(parallel_run) gives: cwrapper parallel_run p0 . In other words, the serialized form of a module function is just the function name and the module in which it lives. When the request arrives on the engines, it is deserialized back into its module namespace like so : try: __import__(self.module) except ImportError: pass else: g = sys.modules[self.module].__dict__ So what is happening is the import of `wrapper` is failing, but IPython suppressed that error, and unpacked the function into an empty namespace instead. It's possible that this error should *not* be suppressed, because it certainly would have been more informative to you to see `ImportError: wrapper` rather than a NameError since it came out in the wrong place. I don't know what case is actually helped by this suppression, so I am inclined to just cease catching the error . -MinRK > > Thanks! > > Michael > > On Fri, Sep 7, 2012 at 2:04 PM, MinRK wrote: > >> >> >> On Fri, Sep 7, 2012 at 1:48 PM, Michael Bilow wrote: >> >>> Hi! >>> >>> I'm new to this list and to IPython, and I started using IPython to >>> parallelize some code I'd written (complete code: >>> https://github.com/chuyelchulo/ipython-nameerror, requires numpy and >>> PIL). I've been encountering a confusing NameError that keeps popping up >>> when I try to run this program: The function to be mapped (parallel_run) is >>> imported from a module different from __main__, but the interpreter >>> complains that the functions and modules used by parallel_run are not part >>> of the namespace. >>> >>> I asked about the error here ( >>> http://stackoverflow.com/questions/12304847/ipython-parallel-computing-namespace-issues), >>> and was told to come to this list. >>> >> >> Hi again! >> >> When I do the following: >> >> $> cd /path/to/ipython-nameerror >> $> ipcluster start -n 4 --daemon >> $> python wrapper_wrapper.py >> Time elapsed: 5.85908985138 s >> >> It seems to work as expected. >> >> A few quick questions: >> >> 1. what is the cwd when you run ipcluster? Are your engines local or >> remote? What do you get from: >> >> import os >> import pprint >> from IPython import parallel >> >> client = parallel.Client() >> pprint.pprint(client[:].apply_async(os.getcwdu).get_dict()) >> >> or: >> >> %px import wrapper >> >> If I start the engines somewhere else such that `wrapper` is not >> importable, I get the NameErrors you are seeing. >> >> -MinRK >> >> >>> Thanks! >>> >>> Michael >>> >>> _______________________________________________ >>> 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: From bussonniermatthias at gmail.com Sat Sep 8 04:19:44 2012 From: bussonniermatthias at gmail.com (Matthias BUSSONNIER) Date: Sat, 8 Sep 2012 10:19:44 +0200 Subject: [IPython-dev] IPEP 3: Multiuser support in the notebook In-Reply-To: <504A7A3E.8040609@creativetrax.com> References: <504A4DC2.8050508@creativetrax.com> <504A7A3E.8040609@creativetrax.com> Message-ID: <3E375ECA-EA19-4F71-8A8D-F0C5A39DB512@gmail.com> Le 8 sept. 2012 ? 00:50, Jason Grout a ?crit : > On 9/7/12 2:47 PM, Brian Granger wrote: >> OK I just changed a setting and you should be able to edit the wiki. > > Thanks. It worked. > > Regarding: "When a user clicks "live share" they will get a private and > secure URL they can share with other users. These other users can then > edit the notebook and run code on the kernel in a Google Docs like manner." > > Are you saying that the two of us will be interacting with one running > kernel? Or are you saying that we both have different kernels and the > outputs are somehow pushed back and forth between our representations? > The former seems more likely, but I was just checking. In Sage we have > the latter (IIRC), and sometimes it gets really confusing. Here is a demo of the former: http://elacave.lmdb.eu/~carreau/NotebookLiveCollaboration.mov (really rough draft) 1 kernel. If people want to run in different kernel, they clone and merge afterward the ipynb in git. see PR #2342 for how we could diff notebooks. -- Matthias > > Thanks, > > Jason > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev From bussonniermatthias at gmail.com Sat Sep 8 05:02:50 2012 From: bussonniermatthias at gmail.com (Matthias BUSSONNIER) Date: Sat, 8 Sep 2012 11:02:50 +0200 Subject: [IPython-dev] IPEP 3: Multiuser support in the notebook In-Reply-To: References: <504A4DC2.8050508@creativetrax.com> <504A7A3E.8040609@creativetrax.com> Message-ID: <8F44A41C-A1BF-40B6-B707-F767DD6091CF@gmail.com> Comment on current IPEP version : > ? Users will have the ability to "live share" notebooks and their kernels. When a user clicks "live share" they will get a private and secure URL they can share with other users. These other users can then edit the notebook and run code on the kernel in a Google Docs like manner. This is one feature, but I would expect the ability to invite/remove user independently. Either by being able to tick checkboxes, or else. But nothing annoy me more than having to look into my email to find the link. Ability to have "soft" more grained privileges. Invite a user than can only edit and not run. Obviously we are really vulnerable to JS injection. We should definitely try to do something about that, even if we sell the notebook as beeing not totally secured. One thing we can use is html5 sandboxed feature of iframe. This could also solve the "problem" of css in ".rendered_html". Implementation wide for live collaborating, we should redirect the message using cell ID, otherwise this is a huge problem to redirect IOPub to all clients. > ? Version control of notebooks will be done using the command line interface to git and other VCSs. These VCS command will be issued through the shell widget. I think some high level command would be great, like changing 'save' button, to 'commit' with a custom message that can be generated by user. One of the things I came across while prototyping live collaboration is the real need to have the current state of the notebook on the kernel side. I think we should define a format of notebook 'patches' that represent common operation on a ipynb file, at least: - appending/moving/deletting worksheet/cells preferably with reference to the worksheet/cell by UUID. I also think that for live collaboration we need both a 'cell is being edited' lock, and also maybe a 'cell is being executed' lock. shift+Enter in collaboration is annoying as it makes you select the next cell, releasing your lock and selecting a new cell, potentially locked. I would be inclined to change ctrl+enter to execute without selecting all to be able to stay on the same cell. -- Matthias Le 8 sept. 2012 ? 01:19, Fernando Perez a ?crit : > On Fri, Sep 7, 2012 at 3:50 PM, Jason Grout wrote: >> Are you saying that the two of us will be interacting with one running >> kernel? Or are you saying that we both have different kernels and the >> outputs are somehow pushed back and forth between our representations? >> The former seems more likely, but I was just checking. In Sage we have >> the latter (IIRC), and sometimes it gets really confusing. > > The former. We envision collaboration similar to Gdocs, running > against the same kernel, but with cell-level granularity for > concurrent typing instead of character-level. When a user starts > typing in a cell, the others would see it shaded with that user's > name, effectively locking cells, so that they don't trample on each > other. > > Creating a framework for synchronizing at the cell level is easier and > less finicky than getting something like google docs that syncs > character-by-character. And I also don't quite like the feel of > complete 'all hands at the same time' editing gdocs provides, so > hopefully this will be a good experience. We'll have to see. > > Cheers, > > f > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev From jason-sage at creativetrax.com Sat Sep 8 15:16:43 2012 From: jason-sage at creativetrax.com (Jason Grout) Date: Sat, 08 Sep 2012 14:16:43 -0500 Subject: [IPython-dev] Changing configuration after running Message-ID: <504B999B.2080406@creativetrax.com> When I create a new profile, the default ipython_config.py file has these lines: # A list of dotted module names of IPython extensions to load. c.InteractiveShellApp.extensions = [ ] [snip...] # dotted module name of an IPython extension to load. # c.InteractiveShellApp.extra_extension = '' What is the difference between .extensions and .extra_extension? Thanks, Jason From jason-sage at creativetrax.com Sat Sep 8 15:19:21 2012 From: jason-sage at creativetrax.com (Jason Grout) Date: Sat, 08 Sep 2012 14:19:21 -0500 Subject: [IPython-dev] extra_extension config option In-Reply-To: <504B999B.2080406@creativetrax.com> References: <504B999B.2080406@creativetrax.com> Message-ID: <504B9A39.9020306@creativetrax.com> Sorry for the previous subject line that didn't make sense; it was left over from a message I decided against sending! Jason From benjaminrk at gmail.com Sat Sep 8 15:31:41 2012 From: benjaminrk at gmail.com (MinRK) Date: Sat, 8 Sep 2012 12:31:41 -0700 Subject: [IPython-dev] Changing configuration after running In-Reply-To: <504B999B.2080406@creativetrax.com> References: <504B999B.2080406@creativetrax.com> Message-ID: On Sat, Sep 8, 2012 at 12:16 PM, Jason Grout wrote: > When I create a new profile, the default ipython_config.py file has > these lines: > > # A list of dotted module names of IPython extensions to load. > c.InteractiveShellApp.extensions = [ ] > > [snip...] > > # dotted module name of an IPython extension to load. > # c.InteractiveShellApp.extra_extension = '' > > What is the difference between .extensions and .extra_extension? > extra_extension just exists to preserve the `--ext` command-line option, so you can do: ipython --ext cythonmagic Where cythonmagic is *added* to the extensions list. `extra_extension = 'cythonmagic'` is identical to `extensions.append('cythonmagic')` This is one case the current config system still doesn't support well: adding to containers. > > 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: From jason-sage at creativetrax.com Sat Sep 8 15:46:25 2012 From: jason-sage at creativetrax.com (Jason Grout) Date: Sat, 08 Sep 2012 14:46:25 -0500 Subject: [IPython-dev] changing input_splitter from config Message-ID: <504BA091.1020301@creativetrax.com> Is it possible to change the input splitter from within the ipython_config.py file? I can successfully change it from a custom extension, but none of the variants I've tried in a config file seem to work. For example, in the ipython_config file: from IPython.core.inputsplitter import IPythonInputSplitter class SageIPythonInputSplitter(IPythonInputSplitter): def push(self, lines): print "push line" super(SageaIPythonInputSplitter, self).push(lines) # Execute the given command string. c.InteractiveShellApp.input_splitter = SageIPythonInputSplitter() Thanks, Jason From jason-sage at creativetrax.com Sat Sep 8 15:51:05 2012 From: jason-sage at creativetrax.com (Jason Grout) Date: Sat, 08 Sep 2012 14:51:05 -0500 Subject: [IPython-dev] Changing configuration after running In-Reply-To: References: <504B999B.2080406@creativetrax.com> Message-ID: <504BA1A9.20801@creativetrax.com> On 9/8/12 2:31 PM, MinRK wrote: > `extra_extension = 'cythonmagic'` is identical to > `extensions.append('cythonmagic')` > > This is one case the current config system still doesn't support well: > adding to containers. Thanks! That makes sense. Jason From fperez.net at gmail.com Sat Sep 8 16:19:52 2012 From: fperez.net at gmail.com (Fernando Perez) Date: Sat, 8 Sep 2012 13:19:52 -0700 Subject: [IPython-dev] IPEP 3: Multiuser support in the notebook In-Reply-To: <8F44A41C-A1BF-40B6-B707-F767DD6091CF@gmail.com> References: <504A4DC2.8050508@creativetrax.com> <504A7A3E.8040609@creativetrax.com> <8F44A41C-A1BF-40B6-B707-F767DD6091CF@gmail.com> Message-ID: On Sat, Sep 8, 2012 at 2:02 AM, Matthias BUSSONNIER wrote: > Comment on current IPEP version : > Ability to have "soft" more grained privileges. Invite a user than can only edit and not run. Definitely. Given how potentially destructive execution can be, this is a very important permission level we want to have. In static documents (say google docs), the only things that matter are read/write privileges. We have read/write/execute, and all three levels of permission should be available. > Obviously we are really vulnerable to JS injection. We should definitely try to do something about that, even if we sell the notebook as beeing not totally secured. One thing we can use is html5 sandboxed feature of iframe. This could also solve the "problem" of css in ".rendered_html". > Yes, the ipep should have a section on security in the web sense (JS, cross-scripting possibilities, etc). I know next to nothing about that stuff, but at least we should outline what the boundaries of the problem are, and hopefully we'll get some expertise on the matter over time. > One of the things I came across while prototyping live collaboration is the real need to have the current state of the notebook on the kernel side. > I think we should define a format of notebook 'patches' that represent common operation on a ipynb file, at least: > - appending/moving/deletting worksheet/cells > preferably with reference to the worksheet/cell by UUID. Yes, this is a tough one: for many reasons a fully stateless server has many benefits, but it's also a real hindrance for other key use cases. Managing long-running processes is very hard with the current design, and having all save operations send the full notebook back uplink is simply unsustainable in the long run as it makes the system unusable with large notebooks over asymmetric or metered links (such as mobile connections). We *will* have to come up with a solution where that state is managed server side somehow, the current design simply fails to solve this key use case that will become increasingly important as people move more and more from local notebook use to server-based one. > I also think that for live collaboration we need both a 'cell is being edited' lock, and also maybe a 'cell is being executed' lock. > > shift+Enter in collaboration is annoying as it makes you select the next cell, releasing your lock and selecting a new cell, potentially locked. > I would be inclined to change ctrl+enter to execute without selecting all to be able to stay on the same cell. We debated a lot whether to select all or not, initially it didn't. I'm not opposed to going back to the no-select state on Ctrl-Enter if we find a good reason for it (and this could be one). I don't think the reasons for going with select were super strong. Cheers, f From fperez.net at gmail.com Sat Sep 8 16:23:54 2012 From: fperez.net at gmail.com (Fernando Perez) Date: Sat, 8 Sep 2012 13:23:54 -0700 Subject: [IPython-dev] Moving all dev docs and IPEPs to github In-Reply-To: References: Message-ID: On Fri, Sep 7, 2012 at 11:20 AM, Brian Granger wrote: > In my mind, a user focused wiki and a dev focused wiki could be > maintained separately. I really want to keep all of our dev related > things on github as it makes our dev process much more discoverable. > But I do agree that having two wikis is a bit silly. I think a wiki can have a 'dev' area and a 'user' area, but having two systems is more overhead than makes sense for us. We have such a small and constrained team, we really need to minimize all overhead. > I think that moving everything to github is the best way to have all > our dev related docs in one place rather than 3 or 4. I am definitely > +1 on the idea. Well, let's go ahead and have a quick vote from everyone who has a stake in it (aka anyone who has contributed to the wiki or is likely to)... I'll just send a separate email on it. Let's have the vote on the user list so users who aren't subscribed here also have a chance to voice their opinion. > Yes, our roadmap needs to be informal, flexible, non-verbose and > dynamic. I would like something that people feel good about updating > often with small bits of information that is useful to all. I don't > want something that takes hours to update or is otherwise a burden to > us. I think that having most of our dev process managed by issues and > PRs works great and I don't want to mess with that. It is just a > little bit of the bigger picture stuff that we need a bit more > organization on. And honestly, the IPEPs will help with that as well. Agreed. Cheers, f From carl.input at gmail.com Sat Sep 8 17:09:54 2012 From: carl.input at gmail.com (Carl Smith) Date: Sat, 8 Sep 2012 22:09:54 +0100 Subject: [IPython-dev] IPEP 3: Multiuser support in the notebook In-Reply-To: References: <504A4DC2.8050508@creativetrax.com> <504A7A3E.8040609@creativetrax.com> <8F44A41C-A1BF-40B6-B707-F767DD6091CF@gmail.com> Message-ID: I'm not sure, but I don't think you can do cross-scripting in Chrome. Maybe other browsers will make this concern mute too. I'm not certain, but that's what I thought. I'm on my phone so I can't do much to look into it right now. -------------- next part -------------- An HTML attachment was scrubbed... URL: From carl.input at gmail.com Sat Sep 8 17:19:20 2012 From: carl.input at gmail.com (Carl Smith) Date: Sat, 8 Sep 2012 22:19:20 +0100 Subject: [IPython-dev] Moving all dev docs and IPEPs to github In-Reply-To: References: Message-ID: I'd like to see a user focussed nb based set of docs for new users, but not a whole seperate wiki. There's currently nothing that I know of that serves as a self-contained user manual. Perhaps start with A Brief Tour, then one nb per topic, but as a complete guide for users. I'd be keen to do a bunch of work on this, but would need some help with it. On Sep 8, 2012 9:26 PM, "Fernando Perez" wrote: > On Fri, Sep 7, 2012 at 11:20 AM, Brian Granger > wrote: > > > In my mind, a user focused wiki and a dev focused wiki could be > > maintained separately. I really want to keep all of our dev related > > things on github as it makes our dev process much more discoverable. > > But I do agree that having two wikis is a bit silly. > > I think a wiki can have a 'dev' area and a 'user' area, but having two > systems is more overhead than makes sense for us. We have such a > small and constrained team, we really need to minimize all overhead. > > > I think that moving everything to github is the best way to have all > > our dev related docs in one place rather than 3 or 4. I am definitely > > +1 on the idea. > > Well, let's go ahead and have a quick vote from everyone who has a > stake in it (aka anyone who has contributed to the wiki or is likely > to)... I'll just send a separate email on it. Let's have the vote on > the user list so users who aren't subscribed here also have a chance > to voice their opinion. > > > Yes, our roadmap needs to be informal, flexible, non-verbose and > > dynamic. I would like something that people feel good about updating > > often with small bits of information that is useful to all. I don't > > want something that takes hours to update or is otherwise a burden to > > us. I think that having most of our dev process managed by issues and > > PRs works great and I don't want to mess with that. It is just a > > little bit of the bigger picture stuff that we need a bit more > > organization on. And honestly, the IPEPs will help with that as well. > > Agreed. > > 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: From fperez.net at gmail.com Sat Sep 8 17:43:51 2012 From: fperez.net at gmail.com (Fernando Perez) Date: Sat, 8 Sep 2012 14:43:51 -0700 Subject: [IPython-dev] Moving all dev docs and IPEPs to github In-Reply-To: References: Message-ID: On Sat, Sep 8, 2012 at 2:19 PM, Carl Smith wrote: > I'd like to see a user focussed nb based set of docs for new users, but not > a whole seperate wiki. There's currently nothing that I know of that serves > as a self-contained user manual. Perhaps start with A Brief Tour, then one > nb per topic, but as a complete guide for users. I'd be keen to do a bunch > of work on this, but would need some help with it. Now that nbconvert is getting into shape, what we need is to incorporate the conversion of our existing example notebooks into the documentation, along with restructuring the docs themselves. That would be a fantastic, self-contained project for someone to help with! Cheers, f From ellisonbg at gmail.com Sat Sep 8 18:24:15 2012 From: ellisonbg at gmail.com (Brian Granger) Date: Sat, 8 Sep 2012 15:24:15 -0700 Subject: [IPython-dev] changing input_splitter from config In-Reply-To: <504BA091.1020301@creativetrax.com> References: <504BA091.1020301@creativetrax.com> Message-ID: Only class attributes that have config=True set can be configured from the command line or config files. In general, these are things that have values of simple types such as strings, ints, bools, etc. When you do: c.InteractiveShellApp.input_splitter = SageIPythonInputSplitter() You are not setting this attribute on the real InteractiveShellApp (I think it would actually be InteractiveShell but thats a side point). Instead you are setting the input_splitter attr on a special config object that is used when the real InteractiveShell is created. What you are wanting to do is fundamentally change how that object is built so an extension is the only way to go. I suppose we might be able to create a config=True input_splitter_class attribute that could be set to SageIPythonInputSplitter. Then you could set this in your config files. I think that would be a pretty simple PR to put together. One thing to be careful of though - the input splitter is used in multiple locations in the code base you we would need to make sure that all of those are changed to the same value. Cheers, Brian On Sat, Sep 8, 2012 at 12:46 PM, Jason Grout wrote: > Is it possible to change the input splitter from within the > ipython_config.py file? I can successfully change it from a custom > extension, but none of the variants I've tried in a config file seem to > work. For example, in the ipython_config file: > > from IPython.core.inputsplitter import IPythonInputSplitter > class SageIPythonInputSplitter(IPythonInputSplitter): > def push(self, lines): > print "push line" > super(SageaIPythonInputSplitter, self).push(lines) > > # Execute the given command string. > c.InteractiveShellApp.input_splitter = SageIPythonInputSplitter() > > 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 jason-sage at creativetrax.com Sat Sep 8 19:08:45 2012 From: jason-sage at creativetrax.com (Jason Grout) Date: Sat, 08 Sep 2012 18:08:45 -0500 Subject: [IPython-dev] changing input_splitter from config In-Reply-To: References: <504BA091.1020301@creativetrax.com> Message-ID: <504BCFFD.3000008@creativetrax.com> On 9/8/12 5:24 PM, Brian Granger wrote: > Only class attributes that have config=True set can be configured from > the command line or config files. In general, these are things that > have values of simple types such as strings, ints, bools, etc. > > When you do: > > c.InteractiveShellApp.input_splitter = SageIPythonInputSplitter() > > You are not setting this attribute on the real InteractiveShellApp (I > think it would actually be InteractiveShell but thats a side point). > Instead you are setting the input_splitter attr on a special config > object that is used when the real InteractiveShell is created. What > you are wanting to do is fundamentally change how that object is built > so an extension is the only way to go. > > I suppose we might be able to create a config=True > input_splitter_class attribute that could be set to > SageIPythonInputSplitter. Then you could set this in your config > files. I think that would be a pretty simple PR to put together. One > thing to be careful of though - the input splitter is used in multiple > locations in the code base you we would need to make sure that all of > those are changed to the same value. > Thanks for the explanation! It's not a problem for me to do it in an extension. I have to load some magics and set up a few other things in an extension anyway, so I can set the input splitter there too. It just looked to me like I should be able to configure it from the profile, and then I was puzzled why it wasn't working. I have to say I'm really impressed (again) with the hook system and the config system. I'm trying to shift all of the Sage customizations into either a config file or an extension (i.e., a combination of both), and so far, it's working out nicely. (And it's fairly simple thanks to the work other Sage devs did already in a first pass at migrating to the newest ipython [1]). Thanks, Jason [1] http://trac.sagemath.org/sage_trac/ticket/12719 From carl.input at gmail.com Sat Sep 8 19:36:02 2012 From: carl.input at gmail.com (Carl Smith) Date: Sun, 9 Sep 2012 00:36:02 +0100 Subject: [IPython-dev] Moving all dev docs and IPEPs to github In-Reply-To: References: Message-ID: I'll put myself forward for this one, no problem. I'll wait and see how much help I can be with the wiki migration, and start exploring this in the mean while. I'm real busy tonight, but will be online and free for a few days as of tomorrow. Cheers Carl -------------- next part -------------- An HTML attachment was scrubbed... URL: From fperez.net at gmail.com Sat Sep 8 20:17:51 2012 From: fperez.net at gmail.com (Fernando Perez) Date: Sat, 8 Sep 2012 17:17:51 -0700 Subject: [IPython-dev] changing input_splitter from config In-Reply-To: <504BCFFD.3000008@creativetrax.com> References: <504BA091.1020301@creativetrax.com> <504BCFFD.3000008@creativetrax.com> Message-ID: On Sat, Sep 8, 2012 at 4:08 PM, Jason Grout wrote: > > I have to say I'm really impressed (again) with the hook system and the > config system. I'm trying to shift all of the Sage customizations into > either a config file or an extension (i.e., a combination of both), and > so far, it's working out nicely. (And it's fairly simple thanks to the > work other Sage devs did already in a first pass at migrating to the > newest ipython [1]). Glad to hear that, and it's important to note that we view that goal as something that you should be able to achieve; if something prevents it in IPython, it's a bug. The Sage command line client is a heavily customized ipython, but it doesn't fundamentally change the logic of a REPL, so it should be 100% doable via configuration/extension fixes, without having to subclass/rewrite any of the main parts of the code. Keep on pinging us if you find anything that prevents that (and I know that the docs explaining this could use improvement). Cheers, f From ellisonbg at gmail.com Sat Sep 8 20:31:15 2012 From: ellisonbg at gmail.com (Brian Granger) Date: Sat, 8 Sep 2012 17:31:15 -0700 Subject: [IPython-dev] changing input_splitter from config In-Reply-To: <504BCFFD.3000008@creativetrax.com> References: <504BA091.1020301@creativetrax.com> <504BCFFD.3000008@creativetrax.com> Message-ID: One other factor: If you want that bit of configuration to be easily usable by a lot of people, then putting it into an extension is definitely the way to go. On Sat, Sep 8, 2012 at 4:08 PM, Jason Grout wrote: > On 9/8/12 5:24 PM, Brian Granger wrote: >> Only class attributes that have config=True set can be configured from >> the command line or config files. In general, these are things that >> have values of simple types such as strings, ints, bools, etc. >> >> When you do: >> >> c.InteractiveShellApp.input_splitter = SageIPythonInputSplitter() >> >> You are not setting this attribute on the real InteractiveShellApp (I >> think it would actually be InteractiveShell but thats a side point). >> Instead you are setting the input_splitter attr on a special config >> object that is used when the real InteractiveShell is created. What >> you are wanting to do is fundamentally change how that object is built >> so an extension is the only way to go. >> >> I suppose we might be able to create a config=True >> input_splitter_class attribute that could be set to >> SageIPythonInputSplitter. Then you could set this in your config >> files. I think that would be a pretty simple PR to put together. One >> thing to be careful of though - the input splitter is used in multiple >> locations in the code base you we would need to make sure that all of >> those are changed to the same value. >> > > Thanks for the explanation! > > It's not a problem for me to do it in an extension. I have to load some > magics and set up a few other things in an extension anyway, so I can > set the input splitter there too. It just looked to me like I should be > able to configure it from the profile, and then I was puzzled why it > wasn't working. > > I have to say I'm really impressed (again) with the hook system and the > config system. I'm trying to shift all of the Sage customizations into > either a config file or an extension (i.e., a combination of both), and > so far, it's working out nicely. (And it's fairly simple thanks to the > work other Sage devs did already in a first pass at migrating to the > newest ipython [1]). > > Thanks, > > Jason > > [1] http://trac.sagemath.org/sage_trac/ticket/12719 > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev -- Brian E. Granger Cal Poly State University, San Luis Obispo bgranger at calpoly.edu and ellisonbg at gmail.com From jason-sage at creativetrax.com Sat Sep 8 20:45:43 2012 From: jason-sage at creativetrax.com (Jason Grout) Date: Sat, 08 Sep 2012 19:45:43 -0500 Subject: [IPython-dev] changing input_splitter from config In-Reply-To: References: <504BA091.1020301@creativetrax.com> <504BCFFD.3000008@creativetrax.com> Message-ID: <504BE6B7.10602@creativetrax.com> On 9/8/12 7:31 PM, Brian Granger wrote: > One other factor: > > If you want that bit of configuration to be easily usable by a lot of > people, then putting it into an extension is definitely the way to go. > Yes, I was debating how much to put in the config file, and how much to do on the fly in an extension. For example, changing the banner definitely goes into the config file. But the auto imports that Sage does, or changing the prompt, and things like that---the in-my-head debate is still going about which place is better. By the way, my ongoing work on this is at https://github.com/jasongrout/sage-ipython-profile Thanks, Jason From jason-sage at creativetrax.com Sat Sep 8 20:58:02 2012 From: jason-sage at creativetrax.com (Jason Grout) Date: Sat, 08 Sep 2012 19:58:02 -0500 Subject: [IPython-dev] oinspect overrideable? Message-ID: <504BE99A.9080706@creativetrax.com> Sage overrides IPython's inspect modules in order to support Sage's (admittedly weird) directory structure (a throwback to early Cython days, IIRC). Anyways, in Sage's current pass to use the new IPython, I see this comment: # Ideally, these would just be methods of the Inspector class # that we could override; however, IPython looks them up in # the global :class:`IPython.core.oinspect` module namespace. # Thus, we have to monkey-patch. import sagedoc, sageinspect, IPython.core.oinspect IPython.core.oinspect.getdoc = sageinspect.sage_getdoc #sagedoc.my_getdoc IPython.core.oinspect.getsource = sagedoc.my_getsource IPython.core.oinspect.getargspec = sageinspect.sage_getargspec I searched for each of these functions, and it does seem that they are being imported and used directly. Would it be easy to convert those calls to calls on a current inspector object so that these functions would be easy to override? Thanks, Jason From bussonniermatthias at gmail.com Sun Sep 9 05:57:10 2012 From: bussonniermatthias at gmail.com (Matthias BUSSONNIER) Date: Sun, 9 Sep 2012 11:57:10 +0200 Subject: [IPython-dev] IPEP 3: Multiuser support in the notebook In-Reply-To: References: <504A4DC2.8050508@creativetrax.com> <504A7A3E.8040609@creativetrax.com> <8F44A41C-A1BF-40B6-B707-F767DD6091CF@gmail.com> Message-ID: Le 8 sept. 2012 ? 23:09, Carl Smith a ?crit : > I'm not sure, but I don't think you can do cross-scripting in Chrome. Maybe other browsers will make this concern mute too. I'm not certain, but that's what I thought. I'm on my phone so I can't do much to look into it right now. Well, If I understand XSS it is pretty trivial to do with python notebook as we allow to embed script in .ipynb files. They might not be executable but a simple notebook with in a markdown cell : click me should work. moreover you can embed iframes, ...Etc. So could forge a malicious ipynb file and ask you to view it through nbviewer.ipython.org. assuming you are logged to nbviewer.ipython.org, the scripts in this notebook has all your rights. For me, this is XSS. I won't imagine what people would try to do if you know that JS can send code to execute on the server side ! -- Matthias > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev From carl.input at gmail.com Sun Sep 9 08:33:34 2012 From: carl.input at gmail.com (Carl Smith) Date: Sun, 9 Sep 2012 13:33:34 +0100 Subject: [IPython-dev] IPEP 3: Multiuser support in the notebook In-Reply-To: References: <504A4DC2.8050508@creativetrax.com> <504A7A3E.8040609@creativetrax.com> <8F44A41C-A1BF-40B6-B707-F767DD6091CF@gmail.com> Message-ID: I'd totally misunderstood the problem. That's all pretty scary. Thanks for putting me straight. On Sep 9, 2012 10:57 AM, "Matthias BUSSONNIER" wrote: > > Le 8 sept. 2012 ? 23:09, Carl Smith a ?crit : > > > I'm not sure, but I don't think you can do cross-scripting in Chrome. > Maybe other browsers will make this concern mute too. I'm not certain, but > that's what I thought. I'm on my phone so I can't do much to look into it > right now. > > Well, If I understand XSS it is pretty trivial to do with python notebook > as we allow to embed script in .ipynb files. > They might not be executable but a simple notebook with in a markdown cell > : > > click me should work. > moreover you can embed iframes, ...Etc. > > So could forge a malicious ipynb file and ask you to view it through > nbviewer.ipython.org. > > assuming you are logged to nbviewer.ipython.org, the scripts in this > notebook has all your rights. > > For me, this is XSS. > > I won't imagine what people would try to do if you know that JS can send > code to execute on the server side ! > -- > Matthias > > > > > > _______________________________________________ > > 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: From bussonniermatthias at gmail.com Sun Sep 9 08:44:10 2012 From: bussonniermatthias at gmail.com (Matthias BUSSONNIER) Date: Sun, 9 Sep 2012 14:44:10 +0200 Subject: [IPython-dev] IPEP 3: Multiuser support in the notebook In-Reply-To: References: <504A4DC2.8050508@creativetrax.com> <504A7A3E.8040609@creativetrax.com> <8F44A41C-A1BF-40B6-B707-F767DD6091CF@gmail.com> Message-ID: Le 9 sept. 2012 ? 14:33, Carl Smith a ?crit : > I'd totally misunderstood the problem. That's all pretty scary. Thanks for putting me straight. Don't worry, I'm discovering it too, actually I discovered it when making a prototype a live collaboration. I was like "oh my god, I can do anything I want in my chrome browser from safari... F*** this means so else could do that too, without me knowing" This concern me a little more for nbviewer which is meant for sharing notebook, and for which we would like to add user login, but we would be really vulnerable. -- Matthias > > On Sep 9, 2012 10:57 AM, "Matthias BUSSONNIER" wrote: > > Le 8 sept. 2012 ? 23:09, Carl Smith a ?crit : > > > I'm not sure, but I don't think you can do cross-scripting in Chrome. Maybe other browsers will make this concern mute too. I'm not certain, but that's what I thought. I'm on my phone so I can't do much to look into it right now. > > Well, If I understand XSS it is pretty trivial to do with python notebook as we allow to embed script in .ipynb files. > They might not be executable but a simple notebook with in a markdown cell : > > click me should work. > moreover you can embed iframes, ...Etc. > > So could forge a malicious ipynb file and ask you to view it through nbviewer.ipython.org. > > assuming you are logged to nbviewer.ipython.org, the scripts in this notebook has all your rights. > > For me, this is XSS. > > I won't imagine what people would try to do if you know that JS can send code to execute on the server side ! > -- > Matthias > > > > > > _______________________________________________ > > 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 satra at mit.edu Sun Sep 9 09:35:01 2012 From: satra at mit.edu (Satrajit Ghosh) Date: Sun, 9 Sep 2012 15:35:01 +0200 Subject: [IPython-dev] multiprocessing from within notebook crashes kernel Message-ID: hi all, we are using a workflow library that internally uses multiprocessing to distribute jobs locally. when we run this from the notebook, it crashes the kernel. any thoughts as to why this might happen. here is the code from the library: https://github.com/nipy/nipype/blob/master/nipype/pipeline/plugins/multiproc.py cheers, satra -------------- next part -------------- An HTML attachment was scrubbed... URL: From ellisonbg at gmail.com Sun Sep 9 12:10:42 2012 From: ellisonbg at gmail.com (Brian Granger) Date: Sun, 9 Sep 2012 09:10:42 -0700 Subject: [IPython-dev] IPEP 3: Multiuser support in the notebook In-Reply-To: <8F44A41C-A1BF-40B6-B707-F767DD6091CF@gmail.com> References: <504A4DC2.8050508@creativetrax.com> <504A7A3E.8040609@creativetrax.com> <8F44A41C-A1BF-40B6-B707-F767DD6091CF@gmail.com> Message-ID: Matthias, On Sat, Sep 8, 2012 at 2:02 AM, Matthias BUSSONNIER wrote: > > > Comment on current IPEP version : > >> ? Users will have the ability to "live share" notebooks and their kernels. When a user clicks "live share" they will get a private and secure URL they can share with other users. These other users can then edit the notebook and run code on the kernel in a Google Docs like manner. > > This is one feature, but I would expect the ability to invite/remove user independently. > Either by being able to tick checkboxes, or else. But nothing annoy me more than having to look into my email to find the link. > > Ability to have "soft" more grained privileges. Invite a user than can only edit and not run. One thing we need to think through is the different "modes" a user can view a page in. Minimally we have three boolean flags that determine the mode: read, write, execute. Are there others? One big thing we will have to work out is how to tune the content/display of each page in a way that reflects these flags, but that is secure. Our current approach of setting a variable in JS to control things is horribly insecure. Ideas on this? > Obviously we are really vulnerable to JS injection. We should definitely try to do something about that, even if we sell the notebook as beeing not totally secured. One thing we can use is html5 sandboxed feature of iframe. This could also solve the "problem" of css in ".rendered_html". I agree we need to think more about security, but that is really off topic for this IPEP (i.e., the same technical problems exist for the single user notebook). > Implementation wide for live collaborating, we should redirect the message using cell ID, otherwise this is a huge problem to redirect IOPub to all clients. I am not quite following you here. Don't all clients need to get all iopub messages? >> ? Version control of notebooks will be done using the command line interface to git and other VCSs. These VCS command will be issued through the shell widget. > > > I think some high level command would be great, like changing 'save' button, to 'commit' with a custom message that can be generated by user. We have talked about this before and we want to avoid creating a git UI in the notebook. The other issue is that repo level actions are not per notebook, but per directory, so if we did add a commit button, it would need to be on the directory dashboard, not the notebook page. > One of the things I came across while prototyping live collaboration is the real need to have the current state of the notebook on the kernel side. > I think we should define a format of notebook 'patches' that represent common operation on a ipynb file, at least: > - appending/moving/deletting worksheet/cells > preferably with reference to the worksheet/cell by UUID. I am not sure what you mean by having the notebook state on the kernel. We have to be very careful to keep the notebook and kernel state completely separate. Can you elaborate on why this was needed? But actually, can you open a separate IPEP for live collaboration - it is really a big topic in itself. > I also think that for live collaboration we need both a 'cell is being edited' lock, and also maybe a 'cell is being executed' lock. Yep, I think at the cell level that having locks like this makes sense for us. The problem is doing so in an asynchronous setting (what if both of us lock the same cell before the server is notified?) > shift+Enter in collaboration is annoying as it makes you select the next cell, releasing your lock and selecting a new cell, potentially locked. > I would be inclined to change ctrl+enter to execute without selecting all to be able to stay on the same cell. Yes, we will have to think carefully about what the cursor does upon executing a cell in live collaboration. > -- > Matthias > > > Le 8 sept. 2012 ? 01:19, Fernando Perez a ?crit : > >> On Fri, Sep 7, 2012 at 3:50 PM, Jason Grout wrote: >>> Are you saying that the two of us will be interacting with one running >>> kernel? Or are you saying that we both have different kernels and the >>> outputs are somehow pushed back and forth between our representations? >>> The former seems more likely, but I was just checking. In Sage we have >>> the latter (IIRC), and sometimes it gets really confusing. >> >> The former. We envision collaboration similar to Gdocs, running >> against the same kernel, but with cell-level granularity for >> concurrent typing instead of character-level. When a user starts >> typing in a cell, the others would see it shaded with that user's >> name, effectively locking cells, so that they don't trample on each >> other. >> >> Creating a framework for synchronizing at the cell level is easier and >> less finicky than getting something like google docs that syncs >> character-by-character. And I also don't quite like the feel of >> complete 'all hands at the same time' editing gdocs provides, so >> hopefully this will be a good experience. We'll have to see. >> >> Cheers, >> >> f >> _______________________________________________ >> IPython-dev mailing list >> IPython-dev at scipy.org >> http://mail.scipy.org/mailman/listinfo/ipython-dev > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev -- Brian E. Granger Cal Poly State University, San Luis Obispo bgranger at calpoly.edu and ellisonbg at gmail.com From ellisonbg at gmail.com Sun Sep 9 12:13:14 2012 From: ellisonbg at gmail.com (Brian Granger) Date: Sun, 9 Sep 2012 09:13:14 -0700 Subject: [IPython-dev] IPEP 3: Multiuser support in the notebook In-Reply-To: References: <504A4DC2.8050508@creativetrax.com> <504A7A3E.8040609@creativetrax.com> <8F44A41C-A1BF-40B6-B707-F767DD6091CF@gmail.com> Message-ID: > Yes, this is a tough one: for many reasons a fully stateless server > has many benefits, but it's also a real hindrance for other key use > cases. Managing long-running processes is very hard with the current > design, and having all save operations send the full notebook back > uplink is simply unsustainable in the long run as it makes the system > unusable with large notebooks over asymmetric or metered links (such > as mobile connections). > > We *will* have to come up with a solution where that state is managed > server side somehow, the current design simply fails to solve this key > use case that will become increasingly important as people move more > and more from local notebook use to server-based one. I agree this stuff is all important, but let's open an separate IPEP for live collaboration and notebook saving issues. -- Brian E. Granger Cal Poly State University, San Luis Obispo bgranger at calpoly.edu and ellisonbg at gmail.com From ellisonbg at gmail.com Sun Sep 9 12:19:21 2012 From: ellisonbg at gmail.com (Brian Granger) Date: Sun, 9 Sep 2012 09:19:21 -0700 Subject: [IPython-dev] IPEP 3: Multiuser support in the notebook In-Reply-To: References: <504A4DC2.8050508@creativetrax.com> <504A7A3E.8040609@creativetrax.com> <8F44A41C-A1BF-40B6-B707-F767DD6091CF@gmail.com> Message-ID: On Sun, Sep 9, 2012 at 2:57 AM, Matthias BUSSONNIER wrote: > > Le 8 sept. 2012 ? 23:09, Carl Smith a ?crit : > >> I'm not sure, but I don't think you can do cross-scripting in Chrome. Maybe other browsers will make this concern mute too. I'm not certain, but that's what I thought. I'm on my phone so I can't do much to look into it right now. > > Well, If I understand XSS it is pretty trivial to do with python notebook as we allow to embed script in .ipynb files. > They might not be executable but a simple notebook with in a markdown cell : > > click me should work. > moreover you can embed iframes, ...Etc. > > So could forge a malicious ipynb file and ask you to view it through nbviewer.ipython.org. > > assuming you are logged to nbviewer.ipython.org, the scripts in this notebook has all your rights. > > For me, this is XSS. > > I won't imagine what people would try to do if you know that JS can send code to execute on the server side ! I am not sure I am following the discussion here. The IPython Notebook is designed to execute arbitrary python and javascript code. we don't view that as a security vulnerability - it is our central feature! Is this what you are talking about or is there some other subtle aspect you are referring to? One thing you might be talking about is the fact that