From bussonniermatthias at gmail.com Sun Jun 1 16:01:18 2014 From: bussonniermatthias at gmail.com (Matthias Bussonnier) Date: Sun, 1 Jun 2014 22:01:18 +0200 Subject: [IPython-dev] Sourcing a javascript file from a notebook, and writing local javascript In-Reply-To: References: Message-ID: <580EE2E2-C879-4E1B-A9DF-8CC452415D5A@gmail.com> Le 31 mai 2014 ? 18:41, Andrew Gibiansky a ?crit : > I'm not an IPython dev, but I believe that embedding JS into a Markdown cell has indeed been deprecated, for security reasons. I now experiment by putting things in custom.js. Technically, we just never had the time to strip JS from markdown cell on 1.x, so it was not really supported. But yes, now it is sanitized and removed. > > Code in custom.js I think has all the privileges that normal Javascript has, so you should be free to load external files and scripts. You can include your own JS files using require.js: There should be a nbextension folder in ~/.ipython to store extra javascript > > require(['/static/custom/my_file.js']); this will fail in case where people serve IPython notebook with a prefix. you could use IPython.load_extensions('myext'); that will do the right thing, and is a small wrapper around require. -- M > > In a similar way you should be able to load foreign JS files, I think; I don't know require.js very well though. You could probably also just append a > > > In Notebook 1.x, the local code executes but throws an error about undefined variables, suggesting that the external javascript file was not loaded. Is this expected? > > In Notebook 2.0, so far as I can tell, none of it executes at all. > > Am I right in thinking that embedding Javascript into a markdown cell has been deprecated? Do I need to put it into custom.js instead? And, will I be able to source the remote file from there, or will I need to make that library local as well? > > Sorry if this is a naive question, a lot of aspects of this are new to me. I'm just looking for the most straightforward and lightweight approach so I can experiment with my code. > > Thanks in advance, > Clare > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev From bussonniermatthias at gmail.com Sun Jun 1 16:11:02 2014 From: bussonniermatthias at gmail.com (Matthias Bussonnier) Date: Sun, 1 Jun 2014 22:11:02 +0200 Subject: [IPython-dev] [IPython-User] Runtime selection of the default pretty display In-Reply-To: <1273CFAC-331E-45B3-97FF-14A092FED153@lrde.epita.fr> References: <6E5E5423-133C-426F-B4CF-47F84E65B9FB@lrde.epita.fr> <6EF5CAE5-BC46-4D44-8660-051D7BDA3D8F@gmail.com> <1273CFAC-331E-45B3-97FF-14A092FED153@lrde.epita.fr> Message-ID: Hi Akim. >>> So what I'd like is a means to control which _repr_ IPython's >>> display will chose. Is there such a feature? >> >> No, there is not. > > Do you think that would be useful? No it is by design. If you need the functionality, you are probably misunderstanding the way it works. As a library author you shouldn't decide for the user, if the user really want to change, he/she import display_whatever from IPython.display and call it on your object. Any tentative to do something else, will break things in weird ways. >> You cannot, the last syntactic block of code has a value, it will be displayed. > > Well, I'm not really an expect Python programmer, so maybe you > thought I would have thought of another means and rejected it, > but no, I did not :) So yes, I can have what I was asking for, > provided I avoid the outer lambda (lambdas are so sadly poor in > Python :-/): > >> # Requires IPython 2.0. >> def _automaton_interact(self): >> """Display automaton `self` with a local menu to the select >> the display mode. Pay attention to not displaying large >> automata by default. >> """ >> from IPython.html.widgets import interact >> if 20 < self.state_number(): >> modes = ['info', 'dot'] >> else: >> modes = ['dot', 'info'] >> modes += ['info,detailed', 'tooltip', 'type', 'dot2tex'] >> interact(lambda mode: _automaton_display(self, mode), mode = modes) >> >> automaton.display = _automaton_interact > > This does exactly what I want. > >> Il might get better if you fix your above problem of foo.display(), maybe using `_repr_mime_` in ipython >> but i do not remember if you can do it with widgets. > > I have not found a means to use _repr_mime_ here > >> Keep in mind that widget are still at the beginning, so missing pieces might still arise. > > Sure. I'd like to suggest something like _repr_widget_ or > whatever that would allow to provide an interactive widget > as representation. That would be really awesome. Widget are not my area of expertise, I haven't played a lot with them, so I'll let other respond. -- M > Cheers, > > Akim > > _______________________________________________ > IPython-User mailing list > IPython-User at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-user From asmeurer at gmail.com Sun Jun 1 21:30:59 2014 From: asmeurer at gmail.com (Aaron Meurer) Date: Sun, 1 Jun 2014 20:30:59 -0500 Subject: [IPython-dev] [IPython-User] Runtime selection of the default pretty display In-Reply-To: References: <6E5E5423-133C-426F-B4CF-47F84E65B9FB@lrde.epita.fr> <6EF5CAE5-BC46-4D44-8660-051D7BDA3D8F@gmail.com> <1273CFAC-331E-45B3-97FF-14A092FED153@lrde.epita.fr> Message-ID: This sort of thing has come up in the context of SymPy before as well. SymPy can render equations using MathJax, but it can also render them as png using LaTeX itself (if it is installed). The notebook always prefers MathJax to png, so the only way to force png output is to not include the mathjax output, which is what sympy.init_printing(use_latex='png') does. But this is obviously not ideal (if something else pulls the latex off an object, it will think that these objects don't have that representation). So I definitely think there should be a way to change IPython's preferred order of printing for different frontends. Aaron Meurer On Sun, Jun 1, 2014 at 3:42 PM, Akim Demaille wrote: > > Le 1 juin 2014 ? 22:11, Matthias Bussonnier a ?crit : > >> Hi Akim. > > hi! > >>>>> So what I'd like is a means to control which _repr_ IPython's >>>>> display will chose. Is there such a feature? >>>> >>>> No, there is not. >>> >>> Do you think that would be useful? >> >> No it is by design. If you need the functionality, you are probably misunderstanding the way it works. >> As a library author you shouldn't decide for the user, if the user really want to change, he/she import >> display_whatever from IPython.display and call it on your object. Any tentative to do something else, >> will break things in weird ways. > > Well, I think I agree with what you are saying, but let me > reemphasize that my problem here is rendering automata. > Small automata should be rendered with _repr_svg_, bigger > ones should just display some metrics by default, such as > their size. So I would have _repr_svg_ return None in such > a case. And that's a means to control which _repr_ will > chose. Except that it's decentralized: the logic of which > _repr_ is 'enabled' is spread in each one of them. As a > library author I do not want to prevent what the user > will see, I'm trying to provide them with the best _default_ > behavior possible. > > _repr_widget_ would be my best bet currently, as it allows > me to select the best default behavior, and leave at the user > the choice to select other formats. > > (And btw, I'm not pushing my users to call IPython.display > at all, I'm really referring to the default display of values). > _______________________________________________ > IPython-User mailing list > IPython-User at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-user From claresloggett at gmail.com Sun Jun 1 23:25:12 2014 From: claresloggett at gmail.com (Clare Sloggett) Date: Mon, 2 Jun 2014 13:25:12 +1000 Subject: [IPython-dev] Sourcing a javascript file from a notebook, and writing local javascript In-Reply-To: <580EE2E2-C879-4E1B-A9DF-8CC452415D5A@gmail.com> References: <580EE2E2-C879-4E1B-A9DF-8CC452415D5A@gmail.com> Message-ID: Hi Andrew and Matthias, Thanks very much! This should work for me. I have installed (other people's) extensions in the past so I know where these things need to go. I was kind of hoping there'd be a lightweight (interactive) way to change the javascript via Notebook itself, just for dev purposes. However I can see the security issues. This should be fine! Although, would it work to put my external-library loading code into nbextensions, then run the javascript that calls this library via %%javascript or IPython.display's Javascript? Or have those things also been deprecated? Thanks again, Clare On 2 June 2014 06:01, Matthias Bussonnier wrote: > > Le 31 mai 2014 ? 18:41, Andrew Gibiansky a ?crit : > > > I'm not an IPython dev, but I believe that embedding JS into a Markdown > cell has indeed been deprecated, for security reasons. I now experiment by > putting things in custom.js. > > Technically, we just never had the time to strip JS from markdown cell on > 1.x, so it was not really supported. > But yes, now it is sanitized and removed. > > > > > Code in custom.js I think has all the privileges that normal Javascript > has, so you should be free to load external files and scripts. You can > include your own JS files using require.js: > > There should be a nbextension folder in ~/.ipython to store extra > javascript > > > > > require(['/static/custom/my_file.js']); > > this will fail in case where people serve IPython notebook with a prefix. > you could use > IPython.load_extensions('myext'); > > that will do the right thing, and is a small wrapper around require. > -- > M > > > > > In a similar way you should be able to load foreign JS files, I think; I > don't know require.js very well though. You could probably also just append > a > > > > > > In Notebook 1.x, the local code executes but throws an error about > undefined variables, suggesting that the external javascript file was not > loaded. Is this expected? > > > > In Notebook 2.0, so far as I can tell, none of it executes at all. > > > > Am I right in thinking that embedding Javascript into a markdown cell > has been deprecated? Do I need to put it into custom.js instead? And, will > I be able to source the remote file from there, or will I need to make that > library local as well? > > > > Sorry if this is a naive question, a lot of aspects of this are new to > me. I'm just looking for the most straightforward and lightweight approach > so I can experiment with my code. > > > > Thanks in advance, > > Clare > > > > _______________________________________________ > > 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 Mon Jun 2 03:31:00 2014 From: bussonniermatthias at gmail.com (Matthias Bussonnier) Date: Mon, 2 Jun 2014 09:31:00 +0200 Subject: [IPython-dev] Sourcing a javascript file from a notebook, and writing local javascript In-Reply-To: References: <580EE2E2-C879-4E1B-A9DF-8CC452415D5A@gmail.com> Message-ID: <2763157A-1306-4D39-9368-AE6769B32AA3@gmail.com> Le 2 juin 2014 ? 05:25, Clare Sloggett a ?crit : > Hi Andrew and Matthias, > > Thanks very much! This should work for me. I have installed (other people's) extensions in the past so I know where these things need to go. > > I was kind of hoping there'd be a lightweight (interactive) way to change the javascript via Notebook itself, just for dev purposes. However I can see the security issues. This should be fine!] > > Although, would it work to put my external-library loading code into nbextensions, then run the javascript that calls this library via %%javascript or IPython.display's Javascript? Or have those things also been deprecated? No, these will work when executed. in IPython.display.html too. > > Thanks again, > Clare > > > On 2 June 2014 06:01, Matthias Bussonnier wrote: > > Le 31 mai 2014 ? 18:41, Andrew Gibiansky a ?crit : > > > I'm not an IPython dev, but I believe that embedding JS into a Markdown cell has indeed been deprecated, for security reasons. I now experiment by putting things in custom.js. > > Technically, we just never had the time to strip JS from markdown cell on 1.x, so it was not really supported. > But yes, now it is sanitized and removed. > > > > > Code in custom.js I think has all the privileges that normal Javascript has, so you should be free to load external files and scripts. You can include your own JS files using require.js: > > There should be a nbextension folder in ~/.ipython to store extra javascript > > > > > require(['/static/custom/my_file.js']); > > this will fail in case where people serve IPython notebook with a prefix. > you could use > IPython.load_extensions('myext'); > > that will do the right thing, and is a small wrapper around require. > -- > M > > > > > In a similar way you should be able to load foreign JS files, I think; I don't know require.js very well though. You could probably also just append a > > > > > > In Notebook 1.x, the local code executes but throws an error about undefined variables, suggesting that the external javascript file was not loaded. Is this expected? > > > > In Notebook 2.0, so far as I can tell, none of it executes at all. > > > > Am I right in thinking that embedding Javascript into a markdown cell has been deprecated? Do I need to put it into custom.js instead? And, will I be able to source the remote file from there, or will I need to make that library local as well? > > > > Sorry if this is a naive question, a lot of aspects of this are new to me. I'm just looking for the most straightforward and lightweight approach so I can experiment with my code. > > > > Thanks in advance, > > Clare > > > > _______________________________________________ > > IPython-dev mailing list > > IPython-dev at scipy.org > > http://mail.scipy.org/mailman/listinfo/ipython-dev > > > > > > _______________________________________________ > > IPython-dev mailing list > > IPython-dev at scipy.org > > http://mail.scipy.org/mailman/listinfo/ipython-dev > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: From bussonniermatthias at gmail.com Mon Jun 2 03:46:28 2014 From: bussonniermatthias at gmail.com (Matthias Bussonnier) Date: Mon, 2 Jun 2014 09:46:28 +0200 Subject: [IPython-dev] [IPython-User] Runtime selection of the default pretty display In-Reply-To: References: <6E5E5423-133C-426F-B4CF-47F84E65B9FB@lrde.epita.fr> <6EF5CAE5-BC46-4D44-8660-051D7BDA3D8F@gmail.com> <1273CFAC-331E-45B3-97FF-14A092FED153@lrde.epita.fr> Message-ID: <87A0D8D5-8699-49A3-A5F5-E44BBFFB68E8@gmail.com> Le 2 juin 2014 ? 03:30, Aaron Meurer a ?crit : > This sort of thing has come up in the context of SymPy before as well. > SymPy can render equations using MathJax, but it can also render them > as png using LaTeX itself (if it is installed). The notebook always > prefers MathJax to png, so the only way to force png output is to not > include the mathjax output, which is what > sympy.init_printing(use_latex='png') does. But this is obviously not > ideal (if something else pulls the latex off an object, it will think > that these objects don't have that representation). So I definitely > think there should be a way to change IPython's preferred order of > printing for different front ends. But this shouldn't come from the library side but from the specific frontend you are using. And for having thought of this many time you always end up in an infinite number of layer where you want to overwrite the preference in the previous layer. Also technically in the notebook it is not super hard to implement on a user-facing drop down. The display priority is exposed as the following in javascript. IPython.OutputArea.display_order // ["application/javascript", "text/html", "text/markdown", "text/latex", "image/svg+xml", "image/png", "image/jpeg", "application/pdf", "text/plain"] Just monkey-patch it, Sympy will compute all and notebook store all, but display only the first. -- M > > Aaron Meurer > > On Sun, Jun 1, 2014 at 3:42 PM, Akim Demaille wrote: >> >> Le 1 juin 2014 ? 22:11, Matthias Bussonnier a ?crit : >> >>> Hi Akim. >> >> hi! >> >>>>>> So what I'd like is a means to control which _repr_ IPython's >>>>>> display will chose. Is there such a feature? >>>>> >>>>> No, there is not. >>>> >>>> Do you think that would be useful? >>> >>> No it is by design. If you need the functionality, you are probably misunderstanding the way it works. >>> As a library author you shouldn't decide for the user, if the user really want to change, he/she import >>> display_whatever from IPython.display and call it on your object. Any tentative to do something else, >>> will break things in weird ways. >> >> Well, I think I agree with what you are saying, but let me >> reemphasize that my problem here is rendering automata. >> Small automata should be rendered with _repr_svg_, bigger >> ones should just display some metrics by default, such as >> their size. So I would have _repr_svg_ return None in such >> a case. And that's a means to control which _repr_ will >> chose. Except that it's decentralized: the logic of which >> _repr_ is 'enabled' is spread in each one of them. As a >> library author I do not want to prevent what the user >> will see, I'm trying to provide them with the best _default_ >> behavior possible. >> >> _repr_widget_ would be my best bet currently, as it allows >> me to select the best default behavior, and leave at the user >> the choice to select other formats. >> >> (And btw, I'm not pushing my users to call IPython.display >> at all, I'm really referring to the default display of values). >> _______________________________________________ >> IPython-User mailing list >> IPython-User at scipy.org >> http://mail.scipy.org/mailman/listinfo/ipython-user > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev From bussonniermatthias at gmail.com Mon Jun 2 04:10:29 2014 From: bussonniermatthias at gmail.com (Matthias Bussonnier) Date: Mon, 2 Jun 2014 10:10:29 +0200 Subject: [IPython-dev] [IPython-User] Runtime selection of the default pretty display In-Reply-To: References: <6E5E5423-133C-426F-B4CF-47F84E65B9FB@lrde.epita.fr> <6EF5CAE5-BC46-4D44-8660-051D7BDA3D8F@gmail.com> <1273CFAC-331E-45B3-97FF-14A092FED153@lrde.epita.fr> Message-ID: <10B9C9F7-C196-464A-BD51-7A6BC77658B0@gmail.com> Le 1 juin 2014 ? 22:42, Akim Demaille a ?crit : > Well, I think I agree with what you are saying, but let me > reemphasize that my problem here is rendering automata. > Small automata should be rendered with _repr_svg_, bigger > ones should just display some metrics by default, such as > their size. So I would have _repr_svg_ return None in such > a case. And that's a means to control which _repr_ will > chose. Except that it's decentralized: the logic of which > _repr_ is 'enabled' is spread in each one of them. As a > library author I do not want to prevent what the user > will see, I'm trying to provide them with the best _default_ > behavior possible. I understand, but your default make the assumption that the user is using it in a live notebook and is focused on interactive usage. inherently **choosing** one repr imply that others will not be computed and not stored in the final document. It also start adding coupling between frontend and kernel. Also the _default_ value make little sens as it change depending on the context. Do you run things headless ? Notebook app ? Emacs ? Will you convert it using nbconvert after ? For me explicit is better than implicit, I wouldn't try to guess the best for the user. > > _repr_widget_ would be my best bet currently, as it allows > me to select the best default behavior, and leave at the user > the choice to select other formats. For me widget are slower to use than keyboard and methods like .png() , .svg(), text() as I have to reach the mouse. > (And btw, I'm not pushing my users to call IPython.display > at all, I'm really referring to the default display of values). But they are not only displayed they are stored in _ and for later conversion. Display is a side effect. -- M From chris at myrage.com Mon Jun 2 08:46:42 2014 From: chris at myrage.com (Christoph Szeppek) Date: Mon, 2 Jun 2014 14:46:42 +0200 Subject: [IPython-dev] blocking kernel client is not ready after call to start_channels, solution provided Message-ID: Hi IPython Developers! I'm pretty new to IPython and tried to send a single command to a newly started kernel. I use the KernelManager.start_kernel() method to start the kernel, then call KernelManager.client() to get a blocking client, then called client.execute() and tried to fetch a execute_reply and maybe a msg_type: stream message on the iopub and shell channels by calling their get_msgs() methods. I repeated this step several times and occasionally, there was no data received on the iopub channel at all. I tried to wait for client.channels_running to be True but this indicates weather the channel's thread's run() method has been called, not weather it has completed, so the handler for incoming messages on that channel may not have been set up at that time. It turned out that one has to wait for shell and iopub channel's ioloop._running to be True before receiving data on that channel. So I added the following method to the client: def channels_ready(self): return (self.shell_channel.ioloop._running and self.iopub_channel.ioloop._running) for which I now wait to be true before calling the client's execute method. Best Regards, Christoph From stuaxo2 at yahoo.com Tue Jun 3 06:53:25 2014 From: stuaxo2 at yahoo.com (Stuart Axon) Date: Tue, 3 Jun 2014 03:53:25 -0700 (PDT) Subject: [IPython-dev] cairo renderhook Message-ID: <1401792805.44847.YahooMailNeo@web122102.mail.ne1.yahoo.com> Hello ipythoners ? I?ve made a simple render hook for cairo surfaces and contexts ? http://nbviewer.ipython.org/urls/gist.githubusercontent.com/stuaxo/0f4e1ee9b603c3bc5a6c/raw/a46689663cf6cfd0484466a210271dfd6712b03d/cairo%20in%20ipython.ipynb ? How can I package this so people can use it easily ? ? ? Cheers s++ -------------- next part -------------- An HTML attachment was scrubbed... URL: From pi at berkeley.edu Tue Jun 3 12:49:17 2014 From: pi at berkeley.edu (Paul Ivanov) Date: Tue, 3 Jun 2014 09:49:17 -0700 Subject: [IPython-dev] cairo renderhook In-Reply-To: <1401792805.44847.YahooMailNeo@web122102.mail.ne1.yahoo.com> References: <1401792805.44847.YahooMailNeo@web122102.mail.ne1.yahoo.com> Message-ID: <20140603164917.GC28634@HbI-OTOH.berkeley.edu> Stuart Axon, on 2014-06-03 03:53, wrote: > I?ve made a simple render hook for cairo surfaces and contexts Thanks for sharing, Stuart > How can I package this so people can use it easily ? The easiest way would be to make it into an IPython extension, and list it on this page: https://github.com/ipython/ipython/wiki/Extensions-Index The directions for how to make an extension are linked to from there, but I reproduce them here to convince you (and others) that it really is simple: An IPython extension is an importable Python module that has a couple of special functions to load and unload it. Here is a template: # myextension.py def load_ipython_extension(ipython): # The `ipython` argument is the currently active `InteractiveShell` # instance, which can be used in any way. This allows you to register # new magics or aliases, for example. def unload_ipython_extension(ipython): # If you want your extension to be unloadable, put that logic here. This load_ipython_extension() function is called after your extension is imported, and the currently active InteractiveShell instance is passed as the only argument. You can do anything you want with IPython at that point. load_ipython_extension() will be called again if you load or reload the extension again. It is up to the extension author to add code to manage that. Useful InteractiveShell methods include register_magic_function(), push() (to add variables to the user namespace) and drop_by_id() (to remove variables on unloading). You can put your extension modules anywhere you want, as long as they can be imported by Python?s standard import mechanism. However, to make it easy to write extensions, you can also put your extensions in extensions/ within the IPython directory. This directory is added to sys.path automatically. When your extension is ready for general use, please add it to the extensions index. We also encourage you to upload it to PyPI and use the Framework :: IPython classifier, so that users can install it with standard packaging tools. http://ipython.org/ipython-doc/dev/config/extensions/index.html#writing-extensions best, -- _ / \ A* \^ - ,./ _.`\\ / \ / ,--.S \/ \ / `"~,_ \ \ __o ? _ \<,_ /:\ --(_)/-(_)----.../ | \ --------------.......J Paul Ivanov ipython and matplotlib core developer http://pirsquared.org From gager at ilsb.tuwien.ac.at Tue Jun 3 17:01:46 2014 From: gager at ilsb.tuwien.ac.at (Jakob Gager) Date: Tue, 03 Jun 2014 23:01:46 +0200 Subject: [IPython-dev] Get Notebook name in python Message-ID: <538E37BA.3040001@ilsb.tuwien.ac.at> Hy guys, is there a way to get the current notebook name in python? Something similar to the javascript IPython.notebook.notebook_name. Thanks for the help! br Jakob From benjaminrk at gmail.com Tue Jun 3 17:10:25 2014 From: benjaminrk at gmail.com (MinRK) Date: Tue, 3 Jun 2014 14:10:25 -0700 Subject: [IPython-dev] Get Notebook name in python In-Reply-To: <538E37BA.3040001@ilsb.tuwien.ac.at> References: <538E37BA.3040001@ilsb.tuwien.ac.at> Message-ID: The kernel does not know that a notebook is associated with it because there can be many frontends associated with the same kernel. If you really need it for some reason, you could fetch it from the frontend via javascript or a widget. On Tue, Jun 3, 2014 at 2:01 PM, Jakob Gager wrote: > Hy guys, > > is there a way to get the current notebook name in python? Something > similar to > the javascript IPython.notebook.notebook_name. > > Thanks for the help! > > br > Jakob > _______________________________________________ > 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 stuaxo2 at yahoo.com Tue Jun 3 18:45:08 2014 From: stuaxo2 at yahoo.com (Stuart Axon) Date: Tue, 3 Jun 2014 15:45:08 -0700 (PDT) Subject: [IPython-dev] cairo renderhook In-Reply-To: <1401792805.44847.YahooMailNeo@web122102.mail.ne1.yahoo.com> References: <1401792805.44847.YahooMailNeo@web122102.mail.ne1.yahoo.com> Message-ID: <1401835508.29671.YahooMailNeo@web122105.mail.ne1.yahoo.com> Thanks for the info, I've started this,? stuaxo/ipython_cairo stuaxo/ipython_cairo ipython_cairo - Render cairo surfaces and contexts in an ipython notebook. View on github.com Preview by Yahoo it's not on pypi yet as I have to add a setup.py (or manifest / whatever is needed) - also I want to port some cairo examples into it to make it useful :) I should probably unregister the render hooks on unload, any idea how do I do that ? ? ? S++ On Tuesday, June 3, 2014 11:53 AM, Stuart Axon wrote: > > >Hello ipythoners >? >I?ve made a simple render hook for cairo surfaces and contexts >? >http://nbviewer.ipython.org/urls/gist.githubusercontent.com/stuaxo/0f4e1ee9b603c3bc5a6c/raw/a46689663cf6cfd0484466a210271dfd6712b03d/cairo%20in%20ipython.ipynb >? >How can I package this so people can use it easily ? >? >? >Cheers >s++ > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kyle.mandli at gmail.com Tue Jun 3 19:27:54 2014 From: kyle.mandli at gmail.com (Kyle Mandli) Date: Tue, 3 Jun 2014 18:27:54 -0500 Subject: [IPython-dev] SciPy 2014 BoF Message-ID: Hello IPython Devs, As one of the co-chairs in charge of organizing the birds-of-a-feather sesssions at the SciPy conference this year, I wanted to encourage you to submit a BoF proposal to open up discussion on topics related to IPython development, future, or just general questions. Let me and Matt know if there is anything we can help with in terms of organization as well. Thanks! Kyle Manldi (and via proxy Matt McCormick) -------------- next part -------------- An HTML attachment was scrubbed... URL: From fperez.net at gmail.com Wed Jun 4 05:37:13 2014 From: fperez.net at gmail.com (Fernando Perez) Date: Wed, 4 Jun 2014 02:37:13 -0700 Subject: [IPython-dev] SciPy 2014 BoF In-Reply-To: References: Message-ID: Hi Kyle, thanks a lot for reaching out... That's indeed a great idea, and it would be a good opportunity for us to reach out to the broader scipy community with feedback, discussions, etc. Folks, the only issue is that I can't deal with this right now. I just landed in Alaska for a short vacation, and will be offline in the backcountry until the end of next week. If someone else in the dev team could fill out the BoF submission, I'd be very grateful. One caveat: whomever fills out the BoF form, please note that we need it to NOT overlap with the py3 BoF that Thomas and I are working on... Cheers, f On Tue, Jun 3, 2014 at 4:27 PM, Kyle Mandli wrote: > Hello IPython Devs, > > As one of the co-chairs in charge of organizing the birds-of-a-feather > sesssions at the SciPy conference this year, I wanted to encourage you to > submit a BoF proposal to open up discussion on topics related to IPython > development, future, or just general questions. Let me and Matt know if > there is anything we can help with in terms of organization as well. > > Thanks! > > Kyle Manldi (and via proxy Matt McCormick) > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -- Fernando Perez (@fperez_org; http://fperez.org) fperez.net-at-gmail: mailing lists only (I ignore this when swamped!) fernando.perez-at-berkeley: contact me here for any direct mail -------------- next part -------------- An HTML attachment was scrubbed... URL: From stuaxo2 at yahoo.com Wed Jun 4 06:46:26 2014 From: stuaxo2 at yahoo.com (Stuart Axon) Date: Wed, 4 Jun 2014 03:46:26 -0700 (PDT) Subject: [IPython-dev] cairo renderhook In-Reply-To: <1401835508.29671.YahooMailNeo@web122105.mail.ne1.yahoo.com> References: <1401792805.44847.YahooMailNeo@web122102.mail.ne1.yahoo.com> <1401835508.29671.YahooMailNeo@web122105.mail.ne1.yahoo.com> Message-ID: <1401878786.77042.YahooMailNeo@web122102.mail.ne1.yahoo.com> Just noticed that yahoo mail ate the link :( ? here it is ??github.com/stuaxo/ipython_cairo ? ? S++ On Tuesday, June 3, 2014 11:45 PM, Stuart Axon wrote: > > >Thanks for the info, I've started this,? > > >stuaxo/ipython_cairo > > > stuaxo/ipython_cairo >ipython_cairo - Render cairo surfaces and contexts in an ipython notebook. >View on github.com Preview by Yahoo > > >it's not on pypi yet as I have to add a setup.py (or manifest / whatever is needed) - also I want to port some cairo examples into it to make it useful :) > > > > >I should probably unregister the render hooks on unload, any idea how do I do that ? >? >? >S++ > > > >On Tuesday, June 3, 2014 11:53 AM, Stuart Axon wrote: > > >> >> >>Hello ipythoners >>? >>I?ve made a simple render hook for cairo surfaces and contexts >>? >>http://nbviewer.ipython.org/urls/gist.githubusercontent.com/stuaxo/0f4e1ee9b603c3bc5a6c/raw/a46689663cf6cfd0484466a210271dfd6712b03d/cairo%20in%20ipython.ipynb >>? >>How can I package this so people can use it easily ? >>? >>? >>Cheers >>s++ >> >> >> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kyle.mandli at gmail.com Wed Jun 4 10:06:02 2014 From: kyle.mandli at gmail.com (Kyle Mandli) Date: Wed, 4 Jun 2014 09:06:02 -0500 Subject: [IPython-dev] SciPy 2014 BoF In-Reply-To: References: Message-ID: I figured you would not want to overlap with the py3 BoF so consider that done. Kyle On Wed, Jun 4, 2014 at 4:37 AM, Fernando Perez wrote: > Hi Kyle, > > thanks a lot for reaching out... That's indeed a great idea, and it would > be a good opportunity for us to reach out to the broader scipy community > with feedback, discussions, etc. > > Folks, the only issue is that I can't deal with this right now. I just > landed in Alaska for a short vacation, and will be offline in the > backcountry until the end of next week. If someone else in the dev team > could fill out the BoF submission, I'd be very grateful. > > One caveat: whomever fills out the BoF form, please note that we need it > to NOT overlap with the py3 BoF that Thomas and I are working on... > > Cheers, > > f > > > On Tue, Jun 3, 2014 at 4:27 PM, Kyle Mandli wrote: > >> Hello IPython Devs, >> >> As one of the co-chairs in charge of organizing the birds-of-a-feather >> sesssions at the SciPy conference this year, I wanted to encourage you to >> submit a BoF proposal to open up discussion on topics related to IPython >> development, future, or just general questions. Let me and Matt know if >> there is anything we can help with in terms of organization as well. >> >> Thanks! >> >> Kyle Manldi (and via proxy Matt McCormick) >> >> _______________________________________________ >> IPython-dev mailing list >> IPython-dev at scipy.org >> http://mail.scipy.org/mailman/listinfo/ipython-dev >> >> > > > -- > Fernando Perez (@fperez_org; http://fperez.org) > fperez.net-at-gmail: mailing lists only (I ignore this when swamped!) > fernando.perez-at-berkeley: contact me here for any direct mail > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From erik.m.bray at gmail.com Wed Jun 4 12:17:36 2014 From: erik.m.bray at gmail.com (Erik Bray) Date: Wed, 4 Jun 2014 12:17:36 -0400 Subject: [IPython-dev] Get Notebook name in python In-Reply-To: <538E37BA.3040001@ilsb.tuwien.ac.at> References: <538E37BA.3040001@ilsb.tuwien.ac.at> Message-ID: On Tue, Jun 3, 2014 at 5:01 PM, Jakob Gager wrote: > Hy guys, > > is there a way to get the current notebook name in python? Something > similar to > the javascript IPython.notebook.notebook_name. > > Thanks for the help! There are a couple answers on Stack Overflow here: http://stackoverflow.com/questions/12544056/how-to-i-get-the-current-ipython-notebook-name Different answers for different IPython versions (mine now longer works on 2.0 :( ). That said, these are all hacks and most certainly unsupported and brittle. Erik From beta at computableapp.com Wed Jun 4 15:30:02 2014 From: beta at computableapp.com (=?windows-1252?Q?Karl_Traunm=FCller?=) Date: Wed, 4 Jun 2014 21:30:02 +0200 Subject: [IPython-dev] Announcing IPython for iPad Message-ID: <9D4714F2-1933-4E22-A50F-F92BACD6311A@computableapp.com> [Sorry if this announcement doesn?t belong to this mailing list, but I thought it might be of interest to some of you.] Dear IPython community, I would like to announce the upcoming release of my ?IPython for iPad? app, Computable. Find the (preliminary) product page here: http://computableapp.com Computable comes with a complete SciPy stack consisting of: - numpy 1.8.0 - scipy 0.13.2 - sympy 0.7.5 - pandas 0.13.1 - matplotlib 1.3.1 - IPython 1.2.0, running on Python 2.7.1. Due to my release schedule, I could not get all software packages to their lastest versions (e.g., IPython 2.1, SciPy 1.4). These will be updated gradually after the initial release. More packages (e.g., seaborn, scikit learn) are planned for future releases, but for the initial release, I had to limit scope to the core stack. TeX and LaTeX rendering is supported through MathJax. Matplotlib support for Retina iPads is included. The app comes with a bunch of example notebooks, most notably Prof. Lorena A. Barba?s lecture notes on fluid dynamics and aerodynamics. These highly polished notebooks look gorgeous on a Retina iPad. I have tested the app with a wide range of notebooks, and things seem to work well so far. However, I expect a substantial number of issues to surface during beta testing, because of the sheer size and complexity of the bundled software. Thus, I am looking for IPython power users that exercise the app with their favorite notebooks and software packages :) If you would like to join the beta, please drop me a line at beta at computableapp.com. I will then send you detailed instructions on how to install beta builds, report bugs, etc. As a small thank-you for your efforts, every tester will get a free copy once the app is released (I?m aiming for early July). System Requirements: - iOS 7 or higher - iPad 2 or newer (although good performance probably only on A7 devices, e.g. iPad Air) - The installer bundle (.ipa) currently has around 55MB kind regards, Karl Traunm?ller Indie Mac & iOS developer from Linz, Austria From ellisonbg at gmail.com Wed Jun 4 16:23:23 2014 From: ellisonbg at gmail.com (Brian Granger) Date: Wed, 4 Jun 2014 13:23:23 -0700 Subject: [IPython-dev] Announcing IPython for iPad In-Reply-To: <9D4714F2-1933-4E22-A50F-F92BACD6311A@computableapp.com> References: <9D4714F2-1933-4E22-A50F-F92BACD6311A@computableapp.com> Message-ID: Awesome!!! This really makes me happy to see other people building on top of IPython like this. Is it possible for you to give all of us access to the beta, or should people just email you individally? Cheers, Briabn On Wed, Jun 4, 2014 at 12:30 PM, Karl Traunm?ller wrote: > [Sorry if this announcement doesn?t belong to this mailing list, but I thought it might be of interest to some of you.] > > Dear IPython community, > > I would like to announce the upcoming release of my ?IPython for iPad? app, Computable. Find the (preliminary) product page here: http://computableapp.com > > Computable comes with a complete SciPy stack consisting of: > - numpy 1.8.0 > - scipy 0.13.2 > - sympy 0.7.5 > - pandas 0.13.1 > - matplotlib 1.3.1 > - IPython 1.2.0, > running on Python 2.7.1. > > Due to my release schedule, I could not get all software packages to their lastest versions (e.g., IPython 2.1, SciPy 1.4). These will be updated gradually after the initial release. More packages (e.g., seaborn, scikit learn) are planned for future releases, but for the initial release, I had to limit scope to the core stack. > > TeX and LaTeX rendering is supported through MathJax. Matplotlib support for Retina iPads is included. > > The app comes with a bunch of example notebooks, most notably Prof. Lorena A. Barba?s lecture notes on fluid dynamics and aerodynamics. These highly polished notebooks look gorgeous on a Retina iPad. > > I have tested the app with a wide range of notebooks, and things seem to work well so far. However, I expect a substantial number of issues to surface during beta testing, because of the sheer size and complexity of the bundled software. Thus, I am looking for IPython power users that exercise the app with their favorite notebooks and software packages :) > > If you would like to join the beta, please drop me a line at beta at computableapp.com. I will then send you detailed instructions on how to install beta builds, report bugs, etc. As a small thank-you for your efforts, every tester will get a free copy once the app is released (I?m aiming for early July). > > System Requirements: > - iOS 7 or higher > - iPad 2 or newer (although good performance probably only on A7 devices, e.g. iPad Air) > - The installer bundle (.ipa) currently has around 55MB > > kind regards, > > Karl Traunm?ller > Indie Mac & iOS developer from Linz, Austria > > _______________________________________________ > 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 @ellisonbg on Twitter and GitHub bgranger at calpoly.edu and ellisonbg at gmail.com From beta at computableapp.com Wed Jun 4 16:26:45 2014 From: beta at computableapp.com (=?windows-1252?Q?Karl_Traunm=FCller?=) Date: Wed, 4 Jun 2014 22:26:45 +0200 Subject: [IPython-dev] Announcing IPython for iPad In-Reply-To: References: <9D4714F2-1933-4E22-A50F-F92BACD6311A@computableapp.com> Message-ID: <85ED5AA2-A942-4F09-A0DC-159B4CABD315@computableapp.com> Brian, > Awesome!!! This really makes me happy to see other people building on > top of IPython like this. My pleasure :) And thanks for IPython! > Is it possible for you to give all of us > access to the beta, or should people just email you individally? I have to list every test device's UDID in the beta distribution profile, so, no (or not yet ? this comes for iOS 8). So just send me a short email, and I?ll follow up with instructions on where to find the UDID, and how to get started. regards, Karl > > Cheers, > > Briabn > > On Wed, Jun 4, 2014 at 12:30 PM, Karl Traunm?ller > wrote: >> [Sorry if this announcement doesn?t belong to this mailing list, but I thought it might be of interest to some of you.] >> >> Dear IPython community, >> >> I would like to announce the upcoming release of my ?IPython for iPad? app, Computable. Find the (preliminary) product page here: http://computableapp.com >> >> Computable comes with a complete SciPy stack consisting of: >> - numpy 1.8.0 >> - scipy 0.13.2 >> - sympy 0.7.5 >> - pandas 0.13.1 >> - matplotlib 1.3.1 >> - IPython 1.2.0, >> running on Python 2.7.1. >> >> Due to my release schedule, I could not get all software packages to their lastest versions (e.g., IPython 2.1, SciPy 1.4). These will be updated gradually after the initial release. More packages (e.g., seaborn, scikit learn) are planned for future releases, but for the initial release, I had to limit scope to the core stack. >> >> TeX and LaTeX rendering is supported through MathJax. Matplotlib support for Retina iPads is included. >> >> The app comes with a bunch of example notebooks, most notably Prof. Lorena A. Barba?s lecture notes on fluid dynamics and aerodynamics. These highly polished notebooks look gorgeous on a Retina iPad. >> >> I have tested the app with a wide range of notebooks, and things seem to work well so far. However, I expect a substantial number of issues to surface during beta testing, because of the sheer size and complexity of the bundled software. Thus, I am looking for IPython power users that exercise the app with their favorite notebooks and software packages :) >> >> If you would like to join the beta, please drop me a line at beta at computableapp.com. I will then send you detailed instructions on how to install beta builds, report bugs, etc. As a small thank-you for your efforts, every tester will get a free copy once the app is released (I?m aiming for early July). >> >> System Requirements: >> - iOS 7 or higher >> - iPad 2 or newer (although good performance probably only on A7 devices, e.g. iPad Air) >> - The installer bundle (.ipa) currently has around 55MB >> >> kind regards, >> >> Karl Traunm?ller >> Indie Mac & iOS developer from Linz, Austria >> >> _______________________________________________ >> 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 > @ellisonbg on Twitter and GitHub > bgranger at calpoly.edu and ellisonbg at gmail.com > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev From gager at ilsb.tuwien.ac.at Wed Jun 4 17:19:13 2014 From: gager at ilsb.tuwien.ac.at (Jakob Gager) Date: Wed, 04 Jun 2014 23:19:13 +0200 Subject: [IPython-dev] Get Notebook name in python In-Reply-To: References: <538E37BA.3040001@ilsb.tuwien.ac.at> Message-ID: <538F8D51.6060102@ilsb.tuwien.ac.at> Thanks Min and Erik for the answers. Actually I was expecting such an answer from Min, but I'm really happy to see this hackish approaches to cope with this issue from Erik. I thought there had to be some way, because a save call in the notebook results in a printout of the filename in the terminal by the kernel. I finally came up with a simple method like def getname(): display(Javascript('IPython.notebook.kernel.execute("theNotebook = " + "\'"+IPython.notebook.notebook_name+"\'");')) return theNotebook Jakob Am 2014-06-04 18:17, schrieb Erik Bray: > On Tue, Jun 3, 2014 at 5:01 PM, Jakob Gager wrote: >> Hy guys, >> >> is there a way to get the current notebook name in python? Something >> similar to >> the javascript IPython.notebook.notebook_name. >> >> Thanks for the help! > There are a couple answers on Stack Overflow here: > http://stackoverflow.com/questions/12544056/how-to-i-get-the-current-ipython-notebook-name > Different answers for different IPython versions (mine now longer > works on 2.0 :( ). > > That said, these are all hacks and most certainly unsupported and brittle. > > Erik > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev From takowl at gmail.com Wed Jun 4 18:00:47 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Wed, 4 Jun 2014 15:00:47 -0700 Subject: [IPython-dev] SciPy 2014 BoF In-Reply-To: References: Message-ID: On 4 June 2014 02:37, Fernando Perez wrote: > thanks a lot for reaching out... That's indeed a great idea, and it would > be a good opportunity for us to reach out to the broader scipy community > with feedback, discussions, etc. > > Folks, the only issue is that I can't deal with this right now. I just > landed in Alaska for a short vacation, and will be offline in the > backcountry until the end of next week. If someone else in the dev team > could fill out the BoF submission, I'd be very grateful. > > One caveat: whomever fills out the BoF form, please note that we need it > to NOT overlap with the py3 BoF that Thomas and I are working on... > I've created the BoF proposal on the website, and invited all the core team as speakers. If anyone hasn't got an email and thinks they should have, please let me know. For now I've just filled in a very brief, generic description. I think any of us should be able to edit it. We can discuss in the dev meeting tomorrow what else we want to put there. Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From dpsanders at ciencias.unam.mx Wed Jun 4 19:29:22 2014 From: dpsanders at ciencias.unam.mx (David P. Sanders) Date: Wed, 4 Jun 2014 18:29:22 -0500 Subject: [IPython-dev] Use the IPython Notebook to generate reST output for SciPy proceedings? Message-ID: Hi all, I am writing my contribution to the SciPy 2014 proceedings. This is required to be in reStructuredText (a strange choice, in my opinion...) Since I am far from a reST expert, I thought that it would be a good idea to use the IPython Notebook and export the results to reST: ipython nbconvert proceedings.ipynb --to rst This mostly does, indeed, work (with some tweaking to splice in the article header in the correct format). However, the resulting reST apparently is not in the correct format. In particular, displayed equations are rendered as .. math:: a = \pm 2^e \times m. instead of .. math:: a = \pm 2^e \times m. which seems to be the required format and Python code blocks as .. code:: python instead of .. code-block:: python Does anybody have a suitable template file? I'm sure it should be easy to do, but I have not yet got round to playing with templates, and I have not been following the latest developments so would not even know where to start looking. Thanks, David. -- Dr. David P. Sanders Profesor Titular "A" / Associate Professor Departamento de F?sica, Facultad de Ciencias Universidad Nacional Aut?noma de M?xico (UNAM) dpsanders at ciencias.unam.mx http://sistemas.fciencias.unam.mx/~dsanders Cub?culo / office: #414, 4o. piso del Depto. de F?sica Tel.: +52 55 5622 4965 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dpsanders at ciencias.unam.mx Wed Jun 4 19:33:07 2014 From: dpsanders at ciencias.unam.mx (David P. Sanders) Date: Wed, 4 Jun 2014 18:33:07 -0500 Subject: [IPython-dev] Use the IPython Notebook to generate reST output for SciPy proceedings? Message-ID: On Wed, Jun 4, 2014 at 6:29 PM, David P. Sanders wrote: > Hi all, > > I am writing my contribution to the SciPy 2014 proceedings. > This is required to be in reStructuredText (a strange choice, in my > opinion...) > > Since I am far from a reST expert, I thought that it would be a good idea > to use the IPython Notebook and export the results to reST: > > ipython nbconvert proceedings.ipynb --to rst > > This mostly does, indeed, work (with some tweaking to splice in the > article header in the correct format). > > However, the resulting reST apparently is not in the correct format. > In particular, displayed equations are rendered as > > .. math:: a = \pm 2^e \times m. > > instead of > > .. math:: > > a = \pm 2^e \times m. > > which seems to be the required format > > and Python code blocks as > > .. code:: python > > instead of > > .. code-block:: python > > > Does anybody have a suitable template file? > I'm sure it should be easy to do, but I have not yet got round to playing > with templates, and I have not been following the latest developments so > would not even know where to start looking. > OK, found the template file. Modifying code to code-block is trivial, but what is the correct syntax to add the new line and spacing after .. math:: ? > > Thanks, > David. > > -- > Dr. David P. Sanders > > Profesor Titular "A" / Associate Professor > Departamento de F?sica, Facultad de Ciencias > Universidad Nacional Aut?noma de M?xico (UNAM) > > dpsanders at ciencias.unam.mx > http://sistemas.fciencias.unam.mx/~dsanders > > Cub?culo / office: #414, 4o. piso del Depto. de F?sica > > Tel.: +52 55 5622 4965 > -- Dr. David P. Sanders Profesor Titular "A" / Associate Professor Departamento de F?sica, Facultad de Ciencias Universidad Nacional Aut?noma de M?xico (UNAM) dpsanders at ciencias.unam.mx http://sistemas.fciencias.unam.mx/~dsanders Cub?culo / office: #414, 4o. piso del Depto. de F?sica Tel.: +52 55 5622 4965 -------------- next part -------------- An HTML attachment was scrubbed... URL: From takowl at gmail.com Wed Jun 4 19:43:01 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Wed, 4 Jun 2014 16:43:01 -0700 Subject: [IPython-dev] Use the IPython Notebook to generate reST output for SciPy proceedings? In-Reply-To: References: Message-ID: On 4 June 2014 16:33, David P. Sanders wrote: > OK, found the template file. > Modifying code to code-block is trivial, but what is the correct syntax to > add the new line and spacing after .. math:: ? > I've just tried it, and maths expressions in code output (e.g. from sympy) have the spacing and indentation I'd expect. Expressions included in markdown cells appear on the same line as the ".. math::" directive, which I would guess is the work of pandoc. However, when I run it through rst2html, both formats are rendered correctly, so it doesn't appear to be incorrect rst. Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From fperez.net at gmail.com Thu Jun 5 03:49:18 2014 From: fperez.net at gmail.com (Fernando Perez) Date: Thu, 5 Jun 2014 00:49:18 -0700 Subject: [IPython-dev] Announcing IPython for iPad In-Reply-To: References: <9D4714F2-1933-4E22-A50F-F92BACD6311A@computableapp.com> Message-ID: +1000 :-) On Jun 4, 2014 12:23 PM, "Brian Granger" wrote: > Awesome!!! This really makes me happy to see other people building on > top of IPython like this. Is it possible for you to give all of us > access to the beta, or should people just email you individally? > > Cheers, > > Briabn > > On Wed, Jun 4, 2014 at 12:30 PM, Karl Traunm?ller > wrote: > > [Sorry if this announcement doesn?t belong to this mailing list, but I > thought it might be of interest to some of you.] > > > > Dear IPython community, > > > > I would like to announce the upcoming release of my ?IPython for iPad? > app, Computable. Find the (preliminary) product page here: > http://computableapp.com > > > > Computable comes with a complete SciPy stack consisting of: > > - numpy 1.8.0 > > - scipy 0.13.2 > > - sympy 0.7.5 > > - pandas 0.13.1 > > - matplotlib 1.3.1 > > - IPython 1.2.0, > > running on Python 2.7.1. > > > > Due to my release schedule, I could not get all software packages to > their lastest versions (e.g., IPython 2.1, SciPy 1.4). These will be > updated gradually after the initial release. More packages (e.g., seaborn, > scikit learn) are planned for future releases, but for the initial release, > I had to limit scope to the core stack. > > > > TeX and LaTeX rendering is supported through MathJax. Matplotlib support > for Retina iPads is included. > > > > The app comes with a bunch of example notebooks, most notably Prof. > Lorena A. Barba?s lecture notes on fluid dynamics and aerodynamics. These > highly polished notebooks look gorgeous on a Retina iPad. > > > > I have tested the app with a wide range of notebooks, and things seem to > work well so far. However, I expect a substantial number of issues to > surface during beta testing, because of the sheer size and complexity of > the bundled software. Thus, I am looking for IPython power users that > exercise the app with their favorite notebooks and software packages :) > > > > If you would like to join the beta, please drop me a line at > beta at computableapp.com. I will then send you detailed instructions on how > to install beta builds, report bugs, etc. As a small thank-you for your > efforts, every tester will get a free copy once the app is released (I?m > aiming for early July). > > > > System Requirements: > > - iOS 7 or higher > > - iPad 2 or newer (although good performance probably only on A7 > devices, e.g. iPad Air) > > - The installer bundle (.ipa) currently has around 55MB > > > > kind regards, > > > > Karl Traunm?ller > > Indie Mac & iOS developer from Linz, Austria > > > > _______________________________________________ > > 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 > @ellisonbg on Twitter and GitHub > 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 konrad.hinsen at fastmail.net Thu Jun 5 04:34:30 2014 From: konrad.hinsen at fastmail.net (Konrad Hinsen) Date: Thu, 05 Jun 2014 10:34:30 +0200 Subject: [IPython-dev] Get Notebook name in python In-Reply-To: <538E37BA.3040001@ilsb.tuwien.ac.at> References: <538E37BA.3040001@ilsb.tuwien.ac.at> Message-ID: <42CCE368D3569511BCA3BC22@Ordinateur-de-Catherine-Konrad.local> --On 3 juin 2014 23:01:46 +0200 Jakob Gager wrote: > is there a way to get the current notebook name in python? Something > similar to > the javascript IPython.notebook.notebook_name. There was a discussion on this on February 2014. A possible solution (depending on your exact needs) was proposed by Stephen Chan: http://mail.scipy.org/pipermail/ipython-dev/2014-February/013362.html Konrad. From bussonniermatthias at gmail.com Thu Jun 5 05:09:10 2014 From: bussonniermatthias at gmail.com (Matthias Bussonnier) Date: Thu, 5 Jun 2014 11:09:10 +0200 Subject: [IPython-dev] Get Notebook name in python In-Reply-To: <538F8D51.6060102@ilsb.tuwien.ac.at> References: <538E37BA.3040001@ilsb.tuwien.ac.at> <538F8D51.6060102@ilsb.tuwien.ac.at> Message-ID: The webserver write in the terminal. Not the kernel. Envoy? de mon iPhone > Le 4 juin 2014 ? 23:19, Jakob Gager a ?crit : > > Thanks Min and Erik for the answers. Actually I was expecting such an > answer from Min, but I'm really happy to see this hackish approaches to > cope with this issue from Erik. > I thought there had to be some way, because a save call in the notebook > results in a printout of the filename in the terminal by the kernel. > > I finally came up with a simple method like > > def getname(): > display(Javascript('IPython.notebook.kernel.execute("theNotebook = " + > "\'"+IPython.notebook.notebook_name+"\'");')) > return theNotebook > > Jakob > > > Am 2014-06-04 18:17, schrieb Erik Bray: >> On Tue, Jun 3, 2014 at 5:01 PM, Jakob Gager wrote: >>> Hy guys, >>> >>> is there a way to get the current notebook name in python? Something >>> similar to >>> the javascript IPython.notebook.notebook_name. >>> >>> Thanks for the help! >> There are a couple answers on Stack Overflow here: >> http://stackoverflow.com/questions/12544056/how-to-i-get-the-current-ipython-notebook-name >> Different answers for different IPython versions (mine now longer >> works on 2.0 :( ). >> >> That said, these are all hacks and most certainly unsupported and brittle. >> >> Erik >> _______________________________________________ >> 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 gager at ilsb.tuwien.ac.at Thu Jun 5 15:41:53 2014 From: gager at ilsb.tuwien.ac.at (Jakob Gager) Date: Thu, 05 Jun 2014 21:41:53 +0200 Subject: [IPython-dev] Get Notebook name in python In-Reply-To: References: <538E37BA.3040001@ilsb.tuwien.ac.at> <538F8D51.6060102@ilsb.tuwien.ac.at> Message-ID: <5390C801.6020403@ilsb.tuwien.ac.at> Thanks for the clarification! Am 2014-06-05 11:09, schrieb Matthias Bussonnier: > The webserver write in the terminal. Not the kernel. > > Envoy? de mon iPhone > >> Le 4 juin 2014 ? 23:19, Jakob Gager a ?crit : >> >> Thanks Min and Erik for the answers. Actually I was expecting such an >> answer from Min, but I'm really happy to see this hackish approaches to >> cope with this issue from Erik. >> I thought there had to be some way, because a save call in the notebook >> results in a printout of the filename in the terminal by the kernel. >> >> I finally came up with a simple method like >> >> def getname(): >> display(Javascript('IPython.notebook.kernel.execute("theNotebook = " + >> "\'"+IPython.notebook.notebook_name+"\'");')) >> return theNotebook >> >> Jakob >> >> >> Am 2014-06-04 18:17, schrieb Erik Bray: >>> On Tue, Jun 3, 2014 at 5:01 PM, Jakob Gager wrote: >>>> Hy guys, >>>> >>>> is there a way to get the current notebook name in python? Something >>>> similar to >>>> the javascript IPython.notebook.notebook_name. >>>> >>>> Thanks for the help! >>> There are a couple answers on Stack Overflow here: >>> http://stackoverflow.com/questions/12544056/how-to-i-get-the-current-ipython-notebook-name >>> Different answers for different IPython versions (mine now longer >>> works on 2.0 :( ). >>> >>> That said, these are all hacks and most certainly unsupported and brittle. >>> >>> Erik >>> _______________________________________________ >>> 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 wstein at gmail.com Thu Jun 5 17:01:10 2014 From: wstein at gmail.com (William Stein) Date: Thu, 5 Jun 2014 14:01:10 -0700 Subject: [IPython-dev] Get Notebook name in python In-Reply-To: References: <538E37BA.3040001@ilsb.tuwien.ac.at> Message-ID: On Tue, Jun 3, 2014 at 2:10 PM, MinRK wrote: > The kernel does not know that a notebook is associated with it because > there can be many frontends associated with the same kernel. If you really > need it for some reason, you could fetch it from the frontend via > javascript or a widget. > > Motivated by this question, I just implemented this functionality for SageMathCloud (SMC) worksheets. I'm just going to mention what I did here, in the hope that maybe IPython will do something similar (to minimize user confusion). When a SageMathCloud worksheet is started, the backend runs a small amount of initialization code, mainly to set the current directory. I just added code so that it sets the variable __file__ in the namespace in which the worksheet is executed. This is similar to how doing python foo.py sets __file__ to "foo.py" inside the foo module, and is I suspect the first thing a Python-programmer would guess would work. As with IPython, with SMC the Python process executing code knows nothing about files/worksheets. Still, the fact is that in some cases that code-executing Python process was started in order to run code in a worksheet, so it seems fine to me for that process to be informed of the worksheet's filename. Incidentally, I made __file__ the absolutely (rather than relative) path to the worksheet, due to the discussion [1]. I also made __file__ a unicode string, since very often people's filenames are unicode in SMC. [1] http://stackoverflow.com/questions/7116889/python-file-attribute-absolute-or-relative -- William > > On Tue, Jun 3, 2014 at 2:01 PM, Jakob Gager > wrote: > >> Hy guys, >> >> is there a way to get the current notebook name in python? Something >> similar to >> the javascript IPython.notebook.notebook_name. >> >> Thanks for the help! >> >> br >> Jakob >> _______________________________________________ >> 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 > > -- William Stein Professor of Mathematics University of Washington http://wstein.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From ASchneiderman at asha.org Fri Jun 6 14:15:15 2014 From: ASchneiderman at asha.org (Anders Schneiderman) Date: Fri, 6 Jun 2014 14:15:15 -0400 Subject: [IPython-dev] D3 in IPython Notebook 2? Message-ID: <39C584F4-9FE0-4C14-850D-08692BABC994@asha.org> I'm trying to use some complex graphs in d3, and some of the examples I found from last year said that in IPython Notebook 2 it'd be easier to use d3. I didn't find any reference to it in the 2 documentation and searching didn't come up with anything either. Is there an easier way to use d3 in IPython Notebook 2? Or is that going to happen in a later version? Thanks! Anders Schneiderman Database Services Manager | ASHA | (301) 296-8651 -------------- next part -------------- An HTML attachment was scrubbed... URL: From michaelmalak at yahoo.com Fri Jun 6 14:24:17 2014 From: michaelmalak at yahoo.com (Michael Malak) Date: Fri, 6 Jun 2014 11:24:17 -0700 (PDT) Subject: [IPython-dev] D3 in IPython Notebook 2? In-Reply-To: <39C584F4-9FE0-4C14-850D-08692BABC994@asha.org> Message-ID: <1402079057.25451.YahooMailBasic@web140402.mail.bf1.yahoo.com> I have an example of d3.js in IPython 2.0: http://technicaltidbit.blogspot.com/2014/05/geosparkgrams-tiny-histograms-on-map.html -------------------------------------------- On Fri, 6/6/14, Anders Schneiderman wrote: Subject: [IPython-dev] D3 in IPython Notebook 2? To: "ipython-dev at scipy.org" Date: Friday, June 6, 2014, 12:15 PM I'm trying to use some complex graphs in d3, and some of the examples I found from last year said that in IPython Notebook 2 it'd be easier to use d3. ?I didn't find any reference to it in the 2 documentation ?and searching didn't come up with anything either. ?Is there an easier way to use d3 in IPython Notebook 2? ?Or is that going to happen in a later version? Thanks!? Anders Schneiderman? Database Services Manager | ASHA |?(301) 296-8651 -----Inline Attachment Follows----- _______________________________________________ IPython-dev mailing list IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev From nick.bollweg at gmail.com Fri Jun 6 15:11:10 2014 From: nick.bollweg at gmail.com (Nicholas Bollweg) Date: Fri, 6 Jun 2014 15:11:10 -0400 Subject: [IPython-dev] D3 in IPython Notebook 2? In-Reply-To: <39C584F4-9FE0-4C14-850D-08692BABC994@asha.org> References: <39C584F4-9FE0-4C14-850D-08692BABC994@asha.org> Message-ID: Because d3 is require.js-aware, it is actually a little more complicated to do simple, static d3. However, with the widget system it is far easier to do complex, dynamic d3. To get just a little, using a remote d3.js, you basically still use the %%html cell magic approach: %%html >
foo
> > This is kinda gross, as it uses IDs, but this is better than just attaching stuff to the parent document. Also, this method will potentially work better in nbviewer than widgets. That being said, once you take the plunge and start working with widgets, traitlets and Backbone, you can do much cooler bi-drectional stuff than before. Here is an example of getting information back from d3 into the kernel: http://nbviewer.ipython.org/gist/anonymous/9975962 Note that traitlets for containers (list, dict) are not instrumented in core (yet), so you'll have to do a bit of your own bookkeeping there. One thing that example doesn't take advantage of is IPython.html.install_nbextension: this is probably the most predictable way to install scripts into a place the notebook server can find them. import IPython > IPython.html.install_nbextension("http://d3js.org/d3.v3.min.js") > d3 can then be required: ... > require(["nbextensions/d3.v3.min"], function(d3){...}) > ... > Hope this helps! -------------- next part -------------- An HTML attachment was scrubbed... URL: From ASchneiderman at asha.org Fri Jun 6 17:20:58 2014 From: ASchneiderman at asha.org (Anders Schneiderman) Date: Fri, 6 Jun 2014 17:20:58 -0400 Subject: [IPython-dev] D3 in IPython Notebook 2? In-Reply-To: References: <39C584F4-9FE0-4C14-850D-08692BABC994@asha.org> Message-ID: <8DA679FA-AF44-4D67-AADB-323C277A577D@asha.org> Thanks, Nicholas and Michael! That's very helpful. Anders Schneiderman Database Services Manager | ASHA | (301) 296-8651 On Jun 6, 2014, at 3:11 PM, "Nicholas Bollweg" > wrote: Because d3 is require.js-aware, it is actually a little more complicated to do simple, static d3. However, with the widget system it is far easier to do complex, dynamic d3. To get just a little, using a remote d3.js, you basically still use the %%html cell magic approach: %%html
foo
This is kinda gross, as it uses IDs, but this is better than just attaching stuff to the parent document. Also, this method will potentially work better in nbviewer than widgets. That being said, once you take the plunge and start working with widgets, traitlets and Backbone, you can do much cooler bi-drectional stuff than before. Here is an example of getting information back from d3 into the kernel: http://nbviewer.ipython.org/gist/anonymous/9975962 Note that traitlets for containers (list, dict) are not instrumented in core (yet), so you'll have to do a bit of your own bookkeeping there. One thing that example doesn't take advantage of is IPython.html.install_nbextension: this is probably the most predictable way to install scripts into a place the notebook server can find them. import IPython IPython.html.install_nbextension("http://d3js.org/d3.v3.min.js") d3 can then be required: ... require(["nbextensions/d3.v3.min"], function(d3){...}) ... Hope this helps! _______________________________________________ IPython-dev mailing list IPython-dev at scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: From takowl at gmail.com Mon Jun 9 14:07:34 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Mon, 9 Jun 2014 11:07:34 -0700 Subject: [IPython-dev] IPython office hours - live discussion of IPython development Message-ID: We'll once again be holding IPython 'office hours', where you can come and ask core developers about how to integrate things with IPython, how to get involved with development, and what features people are working on or planning to work on at present. Anyone who's interested is very welcome to join us. Our office hours take place on a publicly broadcast Google Hangout, and in our Hipchat development room. If you want to be in the video chat, please let me know your Google email address; if you want to join in by text chat, go to http://www.hipchat.com/ghtNzvmfC tomorrow. This month's office hours will be tomorrow (Tuesday 10th June), at 1700 UTC - that's 10am in California, 6pm in the UK. Sorry for the short notice. https://plus.google.com/b/117293602899680632636/events/c52rc2niqk8d7bpiudkpkg8q1o4 Thanks, Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From capslockwizard at gmail.com Thu Jun 12 01:34:18 2014 From: capslockwizard at gmail.com (Justin) Date: Thu, 12 Jun 2014 13:34:18 +0800 Subject: [IPython-dev] Ipython Notebook Showing Warnings In Wrong Order Message-ID: The order that warning messages are printed in Ipython Notebooks in the presence of a print statement is not as expected. Take for example: import warnings warnings.simplefilter('always') for x in range(10): warnings.warn('Warning %d' % (x)) print x When I run this using python I get: test.py:5: UserWarning: Warning 0 warnings.warn('Warning %d' % (x)) 0 test.py:5: UserWarning: Warning 1 warnings.warn('Warning %d' % (x)) 1 test.py:5: UserWarning: Warning 2 warnings.warn('Warning %d' % (x)) 2 test.py:5: UserWarning: Warning 3 warnings.warn('Warning %d' % (x)) 3 test.py:5: UserWarning: Warning 4 warnings.warn('Warning %d' % (x)) 4 test.py:5: UserWarning: Warning 5 warnings.warn('Warning %d' % (x)) 5 test.py:5: UserWarning: Warning 6 warnings.warn('Warning %d' % (x)) 6 test.py:5: UserWarning: Warning 7 warnings.warn('Warning %d' % (x)) 7 test.py:5: UserWarning: Warning 8 warnings.warn('Warning %d' % (x)) 8 test.py:5: UserWarning: Warning 9 warnings.warn('Warning %d' % (x)) 9 Running it in the Ipython console with %cpaste shows similar output as above. However when I run it in an Ipython notebook cell the order is different: 0 1 2 3 4 5 6 7 8 9 -c:5: UserWarning: Warning 0 -c:5: UserWarning: Warning 1 -c:5: UserWarning: Warning 2 -c:5: UserWarning: Warning 3 -c:5: UserWarning: Warning 4 -c:5: UserWarning: Warning 5 -c:5: UserWarning: Warning 6 -c:5: UserWarning: Warning 7 -c:5: UserWarning: Warning 8 -c:5: UserWarning: Warning 9 Is there a way to fix this or is this a bug? Thanks! ~Justin~ -------------- next part -------------- An HTML attachment was scrubbed... URL: From bussonniermatthias at gmail.com Thu Jun 12 02:57:28 2014 From: bussonniermatthias at gmail.com (Matthias Bussonnier) Date: Thu, 12 Jun 2014 08:57:28 +0200 Subject: [IPython-dev] Ipython Notebook Showing Warnings In Wrong Order In-Reply-To: References: Message-ID: <93E1558F-1720-4AF7-A8F9-01BFE7DDBC91@gmail.com> Hi Justin, Le 12 juin 2014 ? 07:34, Justin a ?crit : > The order that warning messages are printed in Ipython Notebooks in the presence of a print statement is not as expected. Take for example: No the order is not wrong, warning send string to stderr, print to stdout. Nothing guaranties the "order" in which they appear. Having them interleaved in the terminal is one way of representing it to the user when you only have on text buffer. If you do care about the order, you should explicitly write to stout or err with both. Here is an example in python 3, or python 2 if you import print_function from __future__. It does what you expect. import warnings import sys warnings.simplefilter('always') for x in range(10): warnings.warn('Warning %d' % (x)) print( x, file=sys.stderr) -- M > import warnings > warnings.simplefilter('always') > > for x in range(10): > warnings.warn('Warning %d' % (x)) > print x -------------- next part -------------- An HTML attachment was scrubbed... URL: From maximilian.albert at gmail.com Thu Jun 12 04:46:06 2014 From: maximilian.albert at gmail.com (Maximilian Albert) Date: Thu, 12 Jun 2014 09:46:06 +0100 Subject: [IPython-dev] Ipython Notebook Showing Warnings In Wrong Order In-Reply-To: <93E1558F-1720-4AF7-A8F9-01BFE7DDBC91@gmail.com> References: <93E1558F-1720-4AF7-A8F9-01BFE7DDBC91@gmail.com> Message-ID: Hi Justin, The order that warning messages are printed in Ipython Notebooks in the > presence of a print statement is not as expected. Take for example: > > > No the order is not wrong, warning send string to stderr, print to stdout. > Nothing guaranties the "order" in which they appear. > That said, you can try to flush the buffers immediately. The following produces the expected order for me in the notebook as well: ==> import sys import warnings warnings.simplefilter('always') for x in range(10): warnings.warn('Warning %d' % (x)) sys.stderr.flush() print x sys.stdout.flush() <== Cheers, Max -------------- next part -------------- An HTML attachment was scrubbed... URL: From ASchneiderman at asha.org Thu Jun 12 08:41:38 2014 From: ASchneiderman at asha.org (Anders Schneiderman) Date: Thu, 12 Jun 2014 08:41:38 -0400 Subject: [IPython-dev] D3 in IPython Notebook 2? In-Reply-To: References: <39C584F4-9FE0-4C14-850D-08692BABC994@asha.org> Message-ID: <93268EE5694C0A4BBB888C2EEFEEEC22A42EA791F7@EXCH2008.hq.asha.org> Hi Nicholas, Your answer was really helpful, but after mucking about for a few days there are 2 places where I'm still stuck: 1) If I want to encapsulate the JavaScript, how do I do it? For example, in your IPython Notebook you create a Python class called CirclesWidget and some JavaScript that creates an IPython.DOMWidgetView subclass. Turning the CirclesWidget into a module and then calling it from an IPython Notebook via import is easy. How do I take the function part of the JavaScript require and take the equivalent action so that another user could use some new widget without having to dump a bunch of JavaScript into their notebook? I haven't worked with JavaScript in a long time, and I couldn't figure it out looking at the require.js documentation ? and the example custom widgets in IPython Notebook 2.0 include their JavaScript in the same notebook that calls the widget. 2) you wrote: Note that traitlets for containers (list, dict) are not instrumented in core (yet), so you'll have to do a bit of your own bookkeeping there. Can you give me a hint as to what that might look like? I'm not looking for a full blown answer, just a sentence steering me in the right direction. Thanks, Anders -------------- next part -------------- An HTML attachment was scrubbed... URL: From takowl at gmail.com Thu Jun 12 12:39:35 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Thu, 12 Jun 2014 09:39:35 -0700 Subject: [IPython-dev] D3 in IPython Notebook 2? In-Reply-To: <93268EE5694C0A4BBB888C2EEFEEEC22A42EA791F7@EXCH2008.hq.asha.org> References: <39C584F4-9FE0-4C14-850D-08692BABC994@asha.org> <93268EE5694C0A4BBB888C2EEFEEEC22A42EA791F7@EXCH2008.hq.asha.org> Message-ID: On 12 June 2014 05:41, Anders Schneiderman wrote: > 2) you wrote: > > Note that traitlets for containers (list, dict) are not instrumented in > core (yet), so you'll have to do a bit of your own bookkeeping there. > > > > Can you give me a hint as to what that might look like? I'm not looking > for a full blown answer, just a sentence steering me in the right direction. > Here are the eventful_graph and eventful_dict datastructures that were written for a demo with live-updating graphs (NetworkX -> D3): https://gist.github.com/takluyver/9619942351cdc571a302 Best wishes, Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From ian.h.bell at gmail.com Thu Jun 12 15:14:58 2014 From: ian.h.bell at gmail.com (Ian Bell) Date: Thu, 12 Jun 2014 21:14:58 +0200 Subject: [IPython-dev] ipython pip dependencies Message-ID: Hi Ipython guys, I just had cause to re-install ipython, and I was wondering whether it was deliberate that the pip package does not include the requirements for the other packages that it needs (tornado, zmq, etc.) I had to do a handful of pip install ipython (doh. missing tornado, pip install tornado) pip install ipython (doh. now missing zmq, pip install zmq) etc., and it would be nice it I could just do pip install ipython and it would pull in the dependencies. Anyway, nice work with Ipython, its such a great piece of work, use it every day. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gaitan at gmail.com Thu Jun 12 15:27:34 2014 From: gaitan at gmail.com (=?UTF-8?B?TWFydMOtbiBHYWl0w6Fu?=) Date: Thu, 12 Jun 2014 16:27:34 -0300 Subject: [IPython-dev] ipython pip dependencies In-Reply-To: References: Message-ID: On Thu, Jun 12, 2014 at 4:14 PM, Ian Bell wrote: > Hi Ipython guys, > > I just had cause to re-install ipython, and I was wondering whether it was > deliberate that the pip package does not include the requirements for the > other packages that it needs (tornado, zmq, etc.) I had to do a handful of > pip install ipython (doh. missing tornado, pip install tornado) pip install > ipython (doh. now missing zmq, pip install zmq) etc., and it would be nice > it I could just do pip install ipython and it would pull in the > dependencies. > > Anyway, nice work with Ipython, its such a great piece of work, use it > every day. try $ pip install install[all] or, if you only need the requirements for IPython Notebook $ pip install install[notebook] -- mgaitan.github.io textosypretextos.com.ar -------------- next part -------------- An HTML attachment was scrubbed... URL: From nathan12343 at gmail.com Thu Jun 12 16:37:06 2014 From: nathan12343 at gmail.com (Nathan Goldbaum) Date: Thu, 12 Jun 2014 13:37:06 -0700 Subject: [IPython-dev] Hide some code cells, show others? Message-ID: Hi all, Apologies if this has been asked before - my google-fu has failed me. I'm currently writing a proceedings for the scipy conference. Since they require and .rst file with a custom format I was planning to use the rst nbconvert template to generate my talk, using raw nbconvert cells to supply rst formatting as needed. I'd also like to include code for some cells but not all. In particular, one or two of the plots have pretty lengthy scripts associated with them and I'd prefer not to have to include them in the paper. I've found this StackOverflow discussion, which seems to sort of do what I want: http://stackoverflow.com/questions/19524554/suppress-code-in-nbconvert-ipython but this will suppress the output of *all* code cells. Is there a way (possibly through an IPython extension) in the notebook interface to indicate whether or not I want to include a code cell in the nbconvert output? Thanks for your help, Nathan -------------- next part -------------- An HTML attachment was scrubbed... URL: From takowl at gmail.com Thu Jun 12 16:55:01 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Thu, 12 Jun 2014 13:55:01 -0700 Subject: [IPython-dev] ipython pip dependencies In-Reply-To: References: Message-ID: On 12 June 2014 12:27, Mart?n Gait?n wrote: > try > > $ pip install install[all] > > or, if you only need the requirements for IPython Notebook > > $ pip install install[notebook] > Exactly. The rationale is that you can install and use IPython in the terminal without any extra dependencies. Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From francois.deheeger at free.fr Thu Jun 12 17:04:35 2014 From: francois.deheeger at free.fr (=?UTF-8?Q?Fran=C3=A7ois_Deheeger?=) Date: Thu, 12 Jun 2014 17:04:35 -0400 Subject: [IPython-dev] Hide some code cells, show others? In-Reply-To: References: Message-ID: Hi, one of the way is to use the cell toolbar and "tag" the cells you want to keep (or delete... depends on the number of both !). I usually use the 'slideshow' mode of that cell toolbar and tag with 'Notes' cells i want to keep. Then, by using the idea of the stackoverflow post you mentioned, create the template you need. It might look like: {%- extends 'full.tpl' -%} {% block input_group %} {% if cell['metadata'].get('slideshow',{}).get('slide_type','') == 'Notes' -%} {{ super() }} {% endif %} {%- endblock input_group %} And then use that template through nbconvert. Hope it helps, Francois 2014-06-12 16:37 GMT-04:00 Nathan Goldbaum : > Hi all, > > Apologies if this has been asked before - my google-fu has failed me. > > I'm currently writing a proceedings for the scipy conference. Since they > require and .rst file with a custom format I was planning to use the rst > nbconvert template to generate my talk, using raw nbconvert cells to supply > rst formatting as needed. > > I'd also like to include code for some cells but not all. In particular, > one or two of the plots have pretty lengthy scripts associated with them > and I'd prefer not to have to include them in the paper. > > I've found this StackOverflow discussion, which seems to sort of do what I > want: > > > http://stackoverflow.com/questions/19524554/suppress-code-in-nbconvert-ipython > > but this will suppress the output of *all* code cells. Is there a way > (possibly through an IPython extension) in the notebook interface to > indicate whether or not I want to include a code cell in the nbconvert > output? > > Thanks for your help, > > Nathan > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -- Fran?ois Deheeger -------------- next part -------------- An HTML attachment was scrubbed... URL: From ian.h.bell at gmail.com Thu Jun 12 18:28:25 2014 From: ian.h.bell at gmail.com (Ian Bell) Date: Fri, 13 Jun 2014 00:28:25 +0200 Subject: [IPython-dev] ipython pip dependencies In-Reply-To: References: Message-ID: Ok that makes sense to me. I didn't know about the "pip install ipython[all]" command, is that standard pip? On Thu, Jun 12, 2014 at 10:55 PM, Thomas Kluyver wrote: > On 12 June 2014 12:27, Mart?n Gait?n wrote: > >> try >> >> $ pip install install[all] >> >> or, if you only need the requirements for IPython Notebook >> >> $ pip install install[notebook] >> > > Exactly. The rationale is that you can install and use IPython in the > terminal without any extra dependencies. > > 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 benjaminrk at gmail.com Thu Jun 12 18:39:29 2014 From: benjaminrk at gmail.com (MinRK) Date: Thu, 12 Jun 2014 15:39:29 -0700 Subject: [IPython-dev] ipython pip dependencies In-Reply-To: References: Message-ID: not pip-specific, but part of setuptools in general . ? On Thu, Jun 12, 2014 at 3:28 PM, Ian Bell wrote: > Ok that makes sense to me. I didn't know about the "pip install > ipython[all]" command, is that standard pip? > > > On Thu, Jun 12, 2014 at 10:55 PM, Thomas Kluyver wrote: > >> On 12 June 2014 12:27, Mart?n Gait?n wrote: >> >>> try >>> >>> $ pip install install[all] >>> >>> or, if you only need the requirements for IPython Notebook >>> >>> $ pip install install[notebook] >>> >> >> Exactly. The rationale is that you can install and use IPython in the >> terminal without any extra dependencies. >> >> Thomas >> >> _______________________________________________ >> 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 stilley2 at jhmi.edu Thu Jun 12 18:40:58 2014 From: stilley2 at jhmi.edu (Steven Tilley II) Date: Thu, 12 Jun 2014 18:40:58 -0400 Subject: [IPython-dev] Interrupting Program on Engines Message-ID: <20140612224058.GA768@Tilley_IdeaPad.ebalto.jhmi.edu> Hi, Often while running code on multiple engines, I need to interrupt it. Is there a clean way to do this? It seems that ctrl-c ing the ipcluster command or hitting stop in the notebook sends something like sigkill to the engines, which will cause my computer to bluescreen if it is at certain parts of my code. However, I don't think I have this problem if I am not running the code on an engine (e.g. on the notebooks main kernel). Thanks! Steve -- Steven W Tilley II Biomedical Engineering PhD Student I-STAR LAB Johns Hopkins University From pierre.gerold at laposte.net Fri Jun 13 05:22:32 2014 From: pierre.gerold at laposte.net (pierre.gerold) Date: Fri, 13 Jun 2014 11:22:32 +0200 Subject: [IPython-dev] Hide some code cells, show others? In-Reply-To: References: Message-ID: <539AC2D8.8020009@laposte.net> Hi, I have encoutered the same problem as yours, but my purpose was for latex export, not html. I have written a little extension ( right now closed source) that have following features: - can tag for hide the all cell - tag to hide input part only - tag to hide output part only - pretty button in ipython to run nbconvert - output of nbconvert put in a window Currently I havn't release the code precisely because of two reasons: -> should be extended for html case (at least, in a ideal world, for the slideshow too ...) -> my tagging system wasn't mature enought ( you might be able to tag differently for latex/html and combine tag) If you are interested by this fonctionnality, I can publish my code tomorrow, saturday 13th of june, (no time today) on github, and you could give me a feedback about what I do. I think, with your help it could be done properly in a short time ( maximum one week ). Precisely I need feedback about what is usefull for people, what is an understandable documentation, and of course all things I havn't though yet ... I you just want a ready to use extension, nevermind, it will be released, but later ... See you Pierre From tarun.gaba7 at gmail.com Fri Jun 13 08:42:18 2014 From: tarun.gaba7 at gmail.com (TARUN GABA) Date: Fri, 13 Jun 2014 18:12:18 +0530 Subject: [IPython-dev] IPython2.0: Sending data from javascript to kernel Message-ID: Hi All I am working on a module where I need to fetch some data(JSON) from frontend Javascript to backend Kernel. As far as I know, we could do this via: IPython.kernel.execute(..) from Javascript side. But that is obsolete in IPython2. What is the best way to do pass the data from Javascript to kernel in IPython2? Any help will be appreciated .. :) Thanks Tarun Gaba -------------- next part -------------- An HTML attachment was scrubbed... URL: From rinaldo at bccn-berlin.de Fri Jun 13 10:28:12 2014 From: rinaldo at bccn-berlin.de (Rinaldo Betkiewicz) Date: Fri, 13 Jun 2014 16:28:12 +0200 Subject: [IPython-dev] Changing Inline Figure Resolution Message-ID: dear all, pre 2.0 the resolution of inline plots in the notebook could be changed with figure(dpi='150') In contrast to setting figsize this would also rescale the font sizes, etc. Unfortunately in Ipython 2 passing dpi to figure() does not seem to have any effect anymore. Is there a way to get same (or similar) behavior in the current version? Best Regards, Rinaldo From rinaldo at bccn-berlin.de Fri Jun 13 10:39:59 2014 From: rinaldo at bccn-berlin.de (Rinaldo Betkiewicz) Date: Fri, 13 Jun 2014 16:39:59 +0200 Subject: [IPython-dev] Applying CSS per notebook / per cell Message-ID: dear all, what would be the recommended way to apply CSS locally, i.e. in a notebook or a single cell? The documentation states that CSS/javascript in markdown cells has been disabled in IPython 2, however HTML output (containing CSS/javascript) will be interpreted in trusted notebooks. For example, after some searching, I found a way the change the width of the cells in a notebook by executing: In [ ]: from IPython.core.display import HTML style = """ """ HTML(style) Is there a more explicit way to do that? Is it possible there a way to change the style of a single cell (e.g. changing cell size) ? Cheers, Rinaldo From burkhard at ualberta.ca Fri Jun 13 18:07:32 2014 From: burkhard at ualberta.ca (Burkhard Ritter) Date: Fri, 13 Jun 2014 16:07:32 -0600 Subject: [IPython-dev] Changing Inline Figure Resolution In-Reply-To: References: Message-ID: Hi, I use the following. Obviously, this changes the dpi for all inline figures thereafter. ``` c = %config InlineBackend.rc c['savefig.dpi'] = 100 %config InlineBackend.figure_format='png' %config InlineBackend.rc = c %matplotlib inline ``` Cheers, Burkhard On Fri, Jun 13, 2014 at 8:28 AM, Rinaldo Betkiewicz wrote: > dear all, > > pre 2.0 the resolution of inline plots in the notebook could be changed with > > figure(dpi='150') > > In contrast to setting figsize this would also rescale the font sizes, > etc. Unfortunately in Ipython 2 passing dpi to figure() does not seem > to have any effect anymore. Is there a way to get same (or similar) > behavior in the current version? > > Best Regards, > > Rinaldo > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > From damianavila at gmail.com Sat Jun 14 15:33:22 2014 From: damianavila at gmail.com (=?UTF-8?Q?Dami=C3=A1n_Avila?=) Date: Sat, 14 Jun 2014 16:33:22 -0300 Subject: [IPython-dev] Dealing with issues... Message-ID: Currently we have too many issues opened... it is not bad to have a lot of ones, if they are valid ones, but probably around 20% of them (maybe more) could be closed now because they are obsolete, or solved, or "forgotten"... etc. Narrowing the open issues space will let us focus in the currently important ones, avoid duplicated work in already solved issues (for people starting to contribute) and "clean" the space a little bit. I will try to revisit the list during the following weeks when I have some free time (probably lunch time ;-)). This will raise the noise in your github notifications, but I will try to do it in an equilibrated ans reasonable way. If anybody is against this "cleaning" idea, please raise your voice... -- *Dami?n* -------------- next part -------------- An HTML attachment was scrubbed... URL: From takowl at gmail.com Sun Jun 15 15:05:02 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Sun, 15 Jun 2014 12:05:02 -0700 Subject: [IPython-dev] Loading nbextension on widget instantiation Message-ID: I've been working on a turtle implementation using widgets (announcement to come when it's a bit more polished). If I load the nbextension for the widget view in my custom.js, it works, but I don't want to make novice users fiddle with that. I can display(Javascript('IPython.load_extensions(...)')), but if I do that just before the widget is created, the async pixies don't get the extension loaded in time, so the first widget doesn't show up. So the user has to run a 'preparation' cell before the code they want to write, to give the extension time to load. One solution I can see is to allow specifying the name of an nbextension in the widget class in the kernel. The frontend would ensure that that extension was loaded before trying to instantiate its counterpart. This would be roughly equivalent to specifying a Python object using its full importable name. There are two levels where this could work: 1. The comm manager could load the extension before looking up target_name. 2. The widget manager could load the extension before looking up view_name. 1. seems more correct and powerful, though 2. might be easier to implement, and would suffice for what I'm trying to do. This shouldn't be a security concern at the moment, because you can only create comms/widgets by running code in the kernel, but we'll need to be careful with it once widget persistence is in place, so it can't execute untrusted JS on load. Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From graffitici at yahoo.com Mon Jun 16 15:19:06 2014 From: graffitici at yahoo.com (graffitici at yahoo.com) Date: Mon, 16 Jun 2014 12:19:06 -0700 Subject: [IPython-dev] Attaching IPython console to a remote IPython notebook server Message-ID: <1402946346.19390.YahooMailNeo@web164805.mail.gq1.yahoo.com> Hi all, I am having trouble connecting to a remote IPython notebook server using IPython console. I can connect to it locally, but not remotely. Say I have two computers: Server: runs IPython Notebook Client: connects to server via both the browser interface, and ipython console I ran the Notebook using $ ipython notebook --ip='0.0.0.0' I can connect using the browser without any problems. Now I'm trying to get the IPython console connected. I took the string given by %connect_info, saved it in a JSON file c.json with the appropriate IP address: { ? "stdin_port": 54912, ? "ip": "188.59.65.59", ? "control_port": 36866, ? "hb_port": 47773, ? "signature_scheme": "hmac-sha256", ? "key": "4158c188-4c7f-400c-95c9-cdb350a12e61", ? "shell_port": 33039, ? "transport": "tcp", ? "iopub_port": 59702 } And then I run the following on the client: $ ipython console --existing c.json The connection never succeeds, and I never see the prompt. What's more interesting is that I ran tcpdump on the server for the shell_port, and I can see the requests from the client coming in, but the SYN packets are responded to by a RST flag. Does anybody know why the notebook server is not accepting connections from the IPython kernel? Am I missing a configuration option? Thanks From ellisonbg at gmail.com Mon Jun 16 15:52:05 2014 From: ellisonbg at gmail.com (Brian Granger) Date: Mon, 16 Jun 2014 12:52:05 -0700 Subject: [IPython-dev] IPython2.0: Sending data from javascript to kernel In-Reply-To: References: Message-ID: The best way of doing this is to use a custom IPython widget. Examples of this can be found here: http://nbviewer.ipython.org/github/ipython/ipython/blob/2.x/examples/Interactive%20Widgets/Index.ipynb On Fri, Jun 13, 2014 at 5:42 AM, TARUN GABA wrote: > Hi All > > I am working on a module where I need to fetch > some data(JSON) from frontend Javascript to backend Kernel. > As far as I know, we could do this via: > > IPython.kernel.execute(..) > > from Javascript side. But that is obsolete in IPython2. > > What is the best way to do pass the data > from Javascript to kernel in IPython2? > > Any help will be appreciated .. :) > > Thanks > Tarun Gaba > > > _______________________________________________ > 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 @ellisonbg on Twitter and GitHub bgranger at calpoly.edu and ellisonbg at gmail.com From fperez.net at gmail.com Mon Jun 16 20:42:01 2014 From: fperez.net at gmail.com (Fernando Perez) Date: Mon, 16 Jun 2014 17:42:01 -0700 Subject: [IPython-dev] Dealing with issues... In-Reply-To: References: Message-ID: Wonderful, thanks so much!! On Sat, Jun 14, 2014 at 12:33 PM, Dami?n Avila wrote: > Currently we have too many issues opened... it is not bad to have a lot of > ones, if they are valid ones, but probably around 20% of them (maybe more) > could be closed now because they are obsolete, or solved, or "forgotten"... > etc. > > Narrowing the open issues space will let us focus in the currently > important ones, avoid duplicated work in already solved issues (for people > starting to contribute) and "clean" the space a little bit. > > I will try to revisit the list during the following weeks when I have some > free time (probably lunch time ;-)). > > This will raise the noise in your github notifications, but I will try to > do it in an equilibrated ans reasonable way. > > If anybody is against this "cleaning" idea, please raise your voice... > > -- > *Dami?n* > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -- Fernando Perez (@fperez_org; http://fperez.org) fperez.net-at-gmail: mailing lists only (I ignore this when swamped!) fernando.perez-at-berkeley: contact me here for any direct mail -------------- next part -------------- An HTML attachment was scrubbed... URL: From wstein at gmail.com Mon Jun 16 22:51:36 2014 From: wstein at gmail.com (William Stein) Date: Mon, 16 Jun 2014 19:51:36 -0700 Subject: [IPython-dev] [sage-cloud] Keybindings cheat sheets In-Reply-To: <7577f17c-f026-4fe4-804e-92b4e051920e@googlegroups.com> References: <7577f17c-f026-4fe4-804e-92b4e051920e@googlegroups.com> Message-ID: On Mon, Jun 16, 2014 at 7:43 PM, singlets wrote: > Hello, > > Based on the recent YT videos, it looks like the latest Sage Days is off to > a great start! Nice to "see" some of the people I met last year, and the new > faces joining in. > > Quick question: it looks like William is able to zoom text with a keyboard > shortcut. What is this combo? (doesn't look to be c-+ which zooms all the > chrome). It's control+> and control+<. >Would this zooming shortcut work in SMC's IPython notebooks? No. > (Vertical real estate is getting cramped with Ipython's layout, wide-screen > laptop designs, and low-res projectors, though SMC's full-screen button > helps.) ... but we can hack on it to make something work. I've cc'd ipython-dev since maybe they have a way to use more real estate. William > > Thanks, > Steve > > -- > You received this message because you are subscribed to the Google Groups > "sage-cloud" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sage-cloud+unsubscribe at googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sage-cloud/7577f17c-f026-4fe4-804e-92b4e051920e%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- William Stein Professor of Mathematics University of Washington http://wstein.org From wstein at gmail.com Mon Jun 16 22:56:58 2014 From: wstein at gmail.com (William Stein) Date: Mon, 16 Jun 2014 19:56:58 -0700 Subject: [IPython-dev] IPython 2.1 now live on SageMathCloud Message-ID: Hi, Motivated by David Ketcheson and Fernando Perez's recent visits, I've upgraded IPython on SageMathCloud to version 2.1. A browser refresh required. This was actually pretty easy, though I thought it would be hard. It mainly involved deleting ugly code I had written that is no longer necessary. -- William -- William Stein Professor of Mathematics University of Washington http://wstein.org From vsego at vsego.org Tue Jun 17 08:55:11 2014 From: vsego at vsego.org (Vedran Sego) Date: Tue, 17 Jun 2014 13:55:11 +0100 Subject: [IPython-dev] New(ish) IPython Notebook RPMs for Fedora 20? Message-ID: Hi, all! Currently, Fedora 20 provides packages python3-ipython-notebook-0.13.2-3.fc20.noarch python-ipython-notebook-0.13.2-3.fc20.noarch However, these do not support slides. My options to get this new functionality are to: 1. install a new version without using RPM, which I dislike because I prefer keeping my software installed via a packaging system for a better maintenance; 2. install from RawHide (the development packages of the next Fedora version), which would usually be a fine approach, but in this case the package dependencies require that I practically upgrade my whole system to this test version of Fedora, which I am not comfortable to do, for obvious reasons. So, my question is: Is there a RPM of IPython Notebook (preferably for Python3) that is compatible with Fedora 20 and has the slides functionality? Alternatively, is there a "quick and dirty" way around this (for example, replacing one or two RPM-installed files that will be automatically substituted once the new RPMs become available)? I am really not familiar with making RPMs, so I cannot make one myself, and waiting for the release of Fedora 21 is not an option because I have to choose now whether to use IPython Notbook or not (and start pretty much right away, if I choose to do so). Thank you all, Vedran From nick.bollweg at gmail.com Tue Jun 17 09:37:21 2014 From: nick.bollweg at gmail.com (Nicholas Bollweg) Date: Tue, 17 Jun 2014 09:37:21 -0400 Subject: [IPython-dev] Loading nbextension on widget instantiation In-Reply-To: References: Message-ID: We have also encountered this issue: we have, for the moment, dealt with it with a mixin for our python-side widget classes that does a require against the _view_name: from IPython.display import display, Javascript > import time > > js_path = "/nbextensions/ipynbdbtk/js" > > class ViewLoaderMixin(object): > def __init__(self, *args, **kwargs): > script = """require(['%(path)s/%(view)s.js'], function(){ > console.log('%(view)s loaded'); > });""" % { > "path": js_path, > "view": self._view_name > } > display(Javascript(script)) > super(ViewLoaderMixin, self).__init__(*args, **kwargs) > I think this is equivalent to your solution (didn't know about load_extensions: that would make it more terse). I second being able to document the location of the file, but don't know enough about the specifics to have an opinion on the approach. Speaking of documentation: a template for building extensions with widgets that that embodied the baseline of knowledge spread all over the community would be great. I have used paste before, which seems kind of heavy these days. Cookiecutter looks good: > https://github.com/audreyr/cookiecutter#available-cookiecutters > or yeoman: > http://yeoman.io/ Yeoman may actually be preferable, in that one would be more inclined to use good front-end practices like bower, less/sass, linitng, etc. even while developing for python. -------------- next part -------------- An HTML attachment was scrubbed... URL: From zvoros at gmail.com Tue Jun 17 10:59:41 2014 From: zvoros at gmail.com (=?ISO-8859-1?Q?Zolt=E1n_V=F6r=F6s?=) Date: Tue, 17 Jun 2014 16:59:41 +0200 Subject: [IPython-dev] New(ish) IPython Notebook RPMs for Fedora 20? In-Reply-To: References: Message-ID: <53A057DD.4080903@gmail.com> On 06/17/2014 02:55 PM, Vedran Sego wrote: > Hi, all! > > Currently, Fedora 20 provides packages > python3-ipython-notebook-0.13.2-3.fc20.noarch > python-ipython-notebook-0.13.2-3.fc20.noarch > > However, these do not support slides. My options to get this new > functionality are to: > 1. install a new version without using RPM, which I dislike because I > prefer keeping my software installed via a packaging system for a > better maintenance; > 2. install from RawHide (the development packages of the next Fedora > version), which would usually be a fine approach, but in this case the > package dependencies require that I practically upgrade my whole > system to this test version of Fedora, which I am not comfortable to > do, for obvious reasons. > > So, my question is: > Is there a RPM of IPython Notebook (preferably for Python3) that is > compatible with Fedora 20 and has the slides functionality? > > Alternatively, is there a "quick and dirty" way around this (for > example, replacing one or two RPM-installed files that will be > automatically substituted once the new RPMs become available)? > > I am really not familiar with making RPMs, so I cannot make one > myself, and waiting for the release of Fedora 21 is not an option > because I have to choose now whether to use IPython Notbook or not > (and start pretty much right away, if I choose to do so). But you don't need a package for installing ipython, because all that happens is that the source code is copied into the appropriate directories in /usr/local/python/ So, really, the easiest, quickest and cleanest way of installing ipython is to clone the development branch from github, and then run the setup script that you can find in the root directory. Since you already have ipython 0.13 (this was ages ago) running, you probably have all dependencies installed. ipython doesn't use anything beyond what you can install with easy_install or pip. Cheers, Zolt?n From roberto.colistete at gmail.com Tue Jun 17 11:29:57 2014 From: roberto.colistete at gmail.com (Roberto Colistete Jr.) Date: Tue, 17 Jun 2014 12:29:57 -0300 Subject: [IPython-dev] New(ish) IPython Notebook RPMs for Fedora 20? In-Reply-To: <53A057DD.4080903@gmail.com> References: <53A057DD.4080903@gmail.com> Message-ID: <53A05EF5.1030502@gmail.com> Em 17-06-2014 11:59, Zolt?n V?r?s escreveu: > So, really, the easiest, quickest and cleanest way of installing ipython > is to clone the development branch from github, and then run the setup > script that you can find in the root directory. Since you already have > ipython 0.13 (this was ages ago) running, you probably have all > dependencies installed. ipython doesn't use anything beyond what you can > install with easy_install or pip. > > Cheers, > Zolt?n IPython 2.x has new dependencies which IPython 0.13 doesn't have : python-jinja2, python-markupsafe. From andrew.gibiansky at gmail.com Tue Jun 17 11:43:52 2014 From: andrew.gibiansky at gmail.com (Andrew Gibiansky) Date: Tue, 17 Jun 2014 08:43:52 -0700 Subject: [IPython-dev] Loading nbextension on widget instantiation In-Reply-To: References: Message-ID: I'm not sure, but this *sorta* looks like the same issue I raised in the thread titled "Javascript ordering semantics". Here's the solution I found then: After digging around in the frontend JS source for a while, I found a > solution. Instead of sending a display_data with mimetype text/html and an > embedded script tag, just send two display_data messages, one with mimetype > application/javascript (with required JS) which must be executed before the > comm_open and another with mimetype text/html (with required HTML to be > inserted, if any). > > This fixes the issue I have. However, it's still a bit strange that Chrome > and FF do the original thing differently, but looks like there's an easy > workaround. > Apologies if this is actually a completely different issue under the hood. On Tue, Jun 17, 2014 at 6:37 AM, Nicholas Bollweg wrote: > We have also encountered this issue: we have, for the moment, dealt with > it with a mixin for our python-side widget classes that does a require > against the _view_name: > > from IPython.display import display, Javascript >> import time >> >> js_path = "/nbextensions/ipynbdbtk/js" >> >> class ViewLoaderMixin(object): >> def __init__(self, *args, **kwargs): >> script = """require(['%(path)s/%(view)s.js'], function(){ >> console.log('%(view)s loaded'); >> });""" % { >> "path": js_path, >> "view": self._view_name >> } >> display(Javascript(script)) >> super(ViewLoaderMixin, self).__init__(*args, **kwargs) >> > > I think this is equivalent to your solution (didn't know about > load_extensions: that would make it more terse). > > I second being able to document the location of the file, but don't know > enough about the specifics to have an opinion on the approach. > > Speaking of documentation: a template for building extensions with widgets > that that embodied the baseline of knowledge spread all over the community > would be great. I have used paste before, which seems kind of heavy these > days. Cookiecutter looks good: > >> https://github.com/audreyr/cookiecutter#available-cookiecutters >> > or yeoman: > >> http://yeoman.io/ > > > Yeoman may actually be preferable, in that one would be more inclined to > use good front-end practices like bower, less/sass, linitng, etc. even > while developing for python. > > _______________________________________________ > 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 jtaylor.debian at googlemail.com Tue Jun 17 13:32:56 2014 From: jtaylor.debian at googlemail.com (Julian Taylor) Date: Tue, 17 Jun 2014 19:32:56 +0200 Subject: [IPython-dev] New(ish) IPython Notebook RPMs for Fedora 20? In-Reply-To: <53A05EF5.1030502@gmail.com> References: <53A057DD.4080903@gmail.com> <53A05EF5.1030502@gmail.com> Message-ID: <53A07BC8.2050300@googlemail.com> On 17.06.2014 17:29, Roberto Colistete Jr. wrote: > Em 17-06-2014 11:59, Zolt?n V?r?s escreveu: >> So, really, the easiest, quickest and cleanest way of installing ipython >> is to clone the development branch from github, and then run the setup >> script that you can find in the root directory. Since you already have >> ipython 0.13 (this was ages ago) running, you probably have all >> dependencies installed. ipython doesn't use anything beyond what you can >> install with easy_install or pip. >> >> Cheers, >> Zolt?n > > IPython 2.x has new dependencies which IPython 0.13 doesn't have : > python-jinja2, python-markupsafe. > it also needs tornado > 3.1 which is also not available in fedora 20, but rawhide has it. From vsego at vsego.org Tue Jun 17 13:45:51 2014 From: vsego at vsego.org (Vedran Sego) Date: Tue, 17 Jun 2014 18:45:51 +0100 Subject: [IPython-dev] New(ish) IPython Notebook RPMs for Fedora 20? In-Reply-To: <53A07BC8.2050300@googlemail.com> References: <53A057DD.4080903@gmail.com> <53A05EF5.1030502@gmail.com> <53A07BC8.2050300@googlemail.com> Message-ID: I've managed to install it (on Fedora 20 x86_64). Here is how I did it, in case someone else needs it as well. A somewhat prettier version is available at http://stackoverflow.com/a/24270071/1667018 Remove RPMs of IPython (to avoid collisions): yum remove python-ipython\* python3-ipython\* Install pip: yum install python-pip python3-pip Install additional Python dependencies (it did work for me without these, but I didn't test much, so something might break down without these): yum install python-jinja2 python-markupsafe python3-jinja2 python3-markupsafe Install IPython for both Python 2 and Python 3: pip install ipython[all] pip-python3 install ipython[all] I've read somewhere that on Ubuntu, pip-python3 is called pip3. To run for Python 2: ipython notebook To run for Python 3: ipython3 notebook To test your installation, call iptest or iptest3. These tests may fail, so you might need additional packages for them to pass. For me, PyZMQ failed. This was fixed by installing two more packages: yum install python-zmq-tests python3-zmq-tests Many thanks to Zolt?n V?r?s for pointing me in the right direction and to Roberto Colistete Jr. for additional Python dependencies. @Julian: It seems to be working fine, at least for me, with Tornado 2.2.1. Install for Python 2 from Rawhide looked fine, but the one for Python 3 went crazy on me with dependencies (it's a weird difference), so I decided to ignore it for the time being. However, thank you for the info; I'll know where to look if something goes wrong. Regards to all, Vedran From takowl at gmail.com Tue Jun 17 13:51:28 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Tue, 17 Jun 2014 10:51:28 -0700 Subject: [IPython-dev] Loading nbextension on widget instantiation In-Reply-To: References: Message-ID: On 17 June 2014 06:37, Nicholas Bollweg wrote: > We have also encountered this issue: we have, for the moment, dealt with > it with a mixin for our python-side widget classes that does a require > against the _view_name: > Ah, I was trying to load the JS by displaying HTML with a script tag. I guess displaying actual javascript directly reduces the async problem. All the same, I think a cleaner solution would definitely be good. I was discussing this with Jon yesterday, and we're thinking of changing around the current scheme a bit, so that rather than registering target types with the comm manager, and view types with the widget manager, widgets are define in modules that can be loaded by require.js. Then a widget that currently specifies a view_name will also specify a view_module. So in your case, the code would look like this: class MyWidget(Widget): view_name = 'WidgetView' view_module = '/nbextensions/ipynbdbtk/js' ... This would result in some incompatibility with existing code, but it should be possible to update extensions so that they'll work with IPython 2 and 3. Given that widgets are new, and the APIs somewhat provisional, I think that's acceptable. We intend to update all of our own widgets to use this, and get rid of the JS type registries altogether. > Speaking of documentation: a template for building extensions with widgets > that that embodied the baseline of knowledge spread all over the community > would be great. I have used paste before, which seems kind of heavy these > days. Cookiecutter looks good: > I think we're really still working out what best practices are - and updating IPython's APIs as we work out things like this. By all means create a template, though - it can evolve as our knowledge and APIs improve. Andrew: > I'm not sure, but this *sorta* looks like the same issue I raised in the thread titled "Javascript ordering semantics". Here's the solution I found then:... You're quite right, it is exactly the same issue. I wasn't using widgets then, so I didn't pay much attention to the thread. I think your solution is similar to Nicholas', except with the added publication of an HTML element. In my code, the HTML components are created in JS when the widget is displayed. I still think it's worth improving this API in IPython, but I will work in this solution to support widgets in IPython 2. Thanks, Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From takowl at gmail.com Tue Jun 17 13:55:21 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Tue, 17 Jun 2014 10:55:21 -0700 Subject: [IPython-dev] New(ish) IPython Notebook RPMs for Fedora 20? In-Reply-To: References: <53A057DD.4080903@gmail.com> <53A05EF5.1030502@gmail.com> <53A07BC8.2050300@googlemail.com> Message-ID: On 17 June 2014 10:45, Vedran Sego wrote: > Install IPython for both Python 2 and Python 3: > pip install ipython[all] > pip-python3 install ipython[all] > Heads up: IPython now installs its command as both 'ipython', and 'ipythonN', where N is the major version of Python you're using. So if you run these commands in this order, 'ipython' will run with Python 3 (because that's the one that got installed last). If you want 'ipython' to start with Python 2, then flip these commands round. Either way, 'ipython2' will launch IPython with Python 2. -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.gibiansky at gmail.com Tue Jun 17 14:33:14 2014 From: andrew.gibiansky at gmail.com (Andrew Gibiansky) Date: Tue, 17 Jun 2014 11:33:14 -0700 Subject: [IPython-dev] Loading nbextension on widget instantiation In-Reply-To: References: Message-ID: When I encountered this, it was particularly surprising, as the behaviour differed across Chrome and Firefox. Perhaps it's worthwhile to make this explicit by filtering script tags out of HTML display_data? That might be way overkill, though. Anyway, I definitely think it's worth improving this, as I expect it'll bite more people as more people start developing their own widgets. -- Andrew On Tue, Jun 17, 2014 at 10:51 AM, Thomas Kluyver wrote: > On 17 June 2014 06:37, Nicholas Bollweg wrote: > >> We have also encountered this issue: we have, for the moment, dealt with >> it with a mixin for our python-side widget classes that does a require >> against the _view_name: >> > > Ah, I was trying to load the JS by displaying HTML with a script tag. I > guess displaying actual javascript directly reduces the async problem. All > the same, I think a cleaner solution would definitely be good. > > I was discussing this with Jon yesterday, and we're thinking of changing > around the current scheme a bit, so that rather than registering target > types with the comm manager, and view types with the widget manager, > widgets are define in modules that can be loaded by require.js. Then a > widget that currently specifies a view_name will also specify a > view_module. So in your case, the code would look like this: > > class MyWidget(Widget): > view_name = 'WidgetView' > view_module = '/nbextensions/ipynbdbtk/js' > ... > > This would result in some incompatibility with existing code, but it > should be possible to update extensions so that they'll work with IPython 2 > and 3. Given that widgets are new, and the APIs somewhat provisional, I > think that's acceptable. We intend to update all of our own widgets to use > this, and get rid of the JS type registries altogether. > > >> Speaking of documentation: a template for building extensions with >> widgets that that embodied the baseline of knowledge spread all over the >> community would be great. I have used paste before, which seems kind of >> heavy these days. Cookiecutter looks good: >> > > I think we're really still working out what best practices are - and > updating IPython's APIs as we work out things like this. By all means > create a template, though - it can evolve as our knowledge and APIs improve. > > Andrew: > > I'm not sure, but this *sorta* looks like the same issue I raised in > the thread titled "Javascript ordering semantics". Here's the solution I > found then:... > > You're quite right, it is exactly the same issue. I wasn't using widgets > then, so I didn't pay much attention to the thread. I think your solution > is similar to Nicholas', except with the added publication of an HTML > element. In my code, the HTML components are created in JS when the widget > is displayed. > > I still think it's worth improving this API in IPython, but I will work in > this solution to support widgets in IPython 2. > > 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 fperez.net at gmail.com Tue Jun 17 19:54:09 2014 From: fperez.net at gmail.com (Fernando Perez) Date: Tue, 17 Jun 2014 15:54:09 -0800 Subject: [IPython-dev] IPython 2.1 now live on SageMathCloud In-Reply-To: References: Message-ID: On Mon, Jun 16, 2014 at 6:56 PM, William Stein wrote: > This was actually pretty easy, though I thought it would be hard. It > mainly involved deleting ugly code I had written that is no longer > necessary. > Very happy to hear that! And thanks for the heads-up :) f -- Fernando Perez (@fperez_org; http://fperez.org) fperez.net-at-gmail: mailing lists only (I ignore this when swamped!) fernando.perez-at-berkeley: contact me here for any direct mail -------------- next part -------------- An HTML attachment was scrubbed... URL: From fperez.net at gmail.com Tue Jun 17 19:55:31 2014 From: fperez.net at gmail.com (Fernando Perez) Date: Tue, 17 Jun 2014 15:55:31 -0800 Subject: [IPython-dev] [sage-cloud] Keybindings cheat sheets In-Reply-To: References: <7577f17c-f026-4fe4-804e-92b4e051920e@googlegroups.com> Message-ID: On Mon, Jun 16, 2014 at 6:51 PM, William Stein wrote: > > (Vertical real estate is getting cramped with Ipython's layout, > wide-screen > > laptop designs, and low-res projectors, though SMC's full-screen button > > helps.) > > ... but we can hack on it to make something work. I've cc'd > ipython-dev since maybe they have a way to use more real estate. > Toggling the header and the toolbar are two common ways of reclaiming vertical real estate, which is indeed at a premium in modern laptops.... Cheers f -- Fernando Perez (@fperez_org; http://fperez.org) fperez.net-at-gmail: mailing lists only (I ignore this when swamped!) fernando.perez-at-berkeley: contact me here for any direct mail -------------- next part -------------- An HTML attachment was scrubbed... URL: From pi at berkeley.edu Tue Jun 17 20:12:58 2014 From: pi at berkeley.edu (Paul Ivanov) Date: Tue, 17 Jun 2014 17:12:58 -0700 Subject: [IPython-dev] [sage-cloud] Keybindings cheat sheets In-Reply-To: References: <7577f17c-f026-4fe4-804e-92b4e051920e@googlegroups.com> Message-ID: <20140618001258.GE5924@HbI-OTOH.berkeley.edu> Fernando Perez, on 2014-06-17 15:55, wrote: > Toggling the header and the toolbar are two common ways of reclaiming > vertical real estate, which is indeed at a premium in modern laptops.... To do this, I have the following in my custom.js // Full-Screen via F11 (toggle header and toolbar) $([IPython.events]).on('notebook_loaded.Notebook', function(){ document.addEventListener("keydown", function(e) { if (e.keyCode == 122) { $('#toggle_header').click(); $('#toggle_toolbar').click(); console.log("toggling full screen mode"); } }); -- _ / \ A* \^ - ,./ _.`\\ / \ / ,--.S \/ \ / `"~,_ \ \ __o ? _ \<,_ /:\ --(_)/-(_)----.../ | \ --------------.......J Paul Ivanov ipython and matplotlib core developer http://pirsquared.org From damianavila at gmail.com Tue Jun 17 21:18:21 2014 From: damianavila at gmail.com (=?UTF-8?Q?Dami=C3=A1n_Avila?=) Date: Tue, 17 Jun 2014 22:18:21 -0300 Subject: [IPython-dev] [sage-cloud] Keybindings cheat sheets In-Reply-To: <20140618001258.GE5924@HbI-OTOH.berkeley.edu> References: <7577f17c-f026-4fe4-804e-92b4e051920e@googlegroups.com> <20140618001258.GE5924@HbI-OTOH.berkeley.edu> Message-ID: You can also build vertical toolbars to replace the default one... ie, this is my current setup/theme to take advantage from the horizontal space, making free more vertical one: https://twitter.com/damian_avila/status/478033494988562432/photo/1 2014-06-17 21:12 GMT-03:00 Paul Ivanov : > Fernando Perez, on 2014-06-17 15:55, wrote: > > Toggling the header and the toolbar are two common ways of reclaiming > > vertical real estate, which is indeed at a premium in modern laptops.... > > To do this, I have the following in my custom.js > > // Full-Screen via F11 (toggle header and toolbar) > $([IPython.events]).on('notebook_loaded.Notebook', function(){ > document.addEventListener("keydown", function(e) { > if (e.keyCode == 122) { > $('#toggle_header').click(); > $('#toggle_toolbar').click(); > console.log("toggling full screen mode"); > } > }); > > > -- > _ > / \ > A* \^ - > ,./ _.`\\ / \ > / ,--.S \/ \ > / `"~,_ \ \ > __o ? > _ \<,_ /:\ > --(_)/-(_)----.../ | \ > --------------.......J > Paul Ivanov > ipython and matplotlib core developer > http://pirsquared.org > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > -- *Dami?n* -------------- next part -------------- An HTML attachment was scrubbed... URL: From jason-sage at creativetrax.com Tue Jun 17 22:42:45 2014 From: jason-sage at creativetrax.com (Jason Grout) Date: Tue, 17 Jun 2014 22:42:45 -0400 Subject: [IPython-dev] IPython 2.1 now live on SageMathCloud In-Reply-To: References: Message-ID: <53A0FCA5.3050406@creativetrax.com> On 6/16/14, 22:56, William Stein wrote: > Hi, > > Motivated by David Ketcheson and Fernando Perez's recent visits, I've > upgraded IPython on SageMathCloud to version 2.1. > > A browser refresh required. > > This was actually pretty easy, though I thought it would be hard. It > mainly involved deleting ugly code I had written that is no longer > necessary. Any chance you could support the IPython Comm messages in a sage worksheet? That would go a *long* ways towards getting the IPython interacts working in the SMC worksheets (including the interactive pythreejs graphics, etc.). Thanks, Jason From max_linke at gmx.de Wed Jun 18 05:56:50 2014 From: max_linke at gmx.de (Max Linke) Date: Wed, 18 Jun 2014 11:56:50 +0200 Subject: [IPython-dev] [sage-cloud] Keybindings cheat sheets In-Reply-To: References: <7577f17c-f026-4fe4-804e-92b4e051920e@googlegroups.com> <20140618001258.GE5924@HbI-OTOH.berkeley.edu> Message-ID: <1403085410.17417.1.camel@archi> On Tue, 2014-06-17 at 22:18 -0300, Dami?n Avila wrote: > You can also build vertical toolbars to replace the default one... ie, this > is my current setup/theme to take advantage from the horizontal space, > making free more vertical one: > https://twitter.com/damian_avila/status/478033494988562432/photo/1 This is really cool. Can you post the config to do this? best Max > > > > > 2014-06-17 21:12 GMT-03:00 Paul Ivanov : > > > Fernando Perez, on 2014-06-17 15:55, wrote: > > > Toggling the header and the toolbar are two common ways of reclaiming > > > vertical real estate, which is indeed at a premium in modern laptops.... > > > > To do this, I have the following in my custom.js > > > > // Full-Screen via F11 (toggle header and toolbar) > > $([IPython.events]).on('notebook_loaded.Notebook', function(){ > > document.addEventListener("keydown", function(e) { > > if (e.keyCode == 122) { > > $('#toggle_header').click(); > > $('#toggle_toolbar').click(); > > console.log("toggling full screen mode"); > > } > > }); > > > > > > -- > > _ > > / \ > > A* \^ - > > ,./ _.`\\ / \ > > / ,--.S \/ \ > > / `"~,_ \ \ > > __o ? > > _ \<,_ /:\ > > --(_)/-(_)----.../ | \ > > --------------.......J > > Paul Ivanov > > ipython and matplotlib core developer > > http://pirsquared.org > > _______________________________________________ > > 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 ndbecker2 at gmail.com Wed Jun 18 07:19:49 2014 From: ndbecker2 at gmail.com (Neal Becker) Date: Wed, 18 Jun 2014 07:19:49 -0400 Subject: [IPython-dev] New(ish) IPython Notebook RPMs for Fedora 20? References: <53A057DD.4080903@gmail.com> <53A05EF5.1030502@gmail.com> <53A07BC8.2050300@googlemail.com> Message-ID: Thomas Kluyver wrote: > On 17 June 2014 10:45, Vedran Sego wrote: > >> Install IPython for both Python 2 and Python 3: >> pip install ipython[all] >> pip-python3 install ipython[all] >> > > Heads up: IPython now installs its command as both 'ipython', and > 'ipythonN', where N is the major version of Python you're using. So if you > run these commands in this order, 'ipython' will run with Python 3 (because > that's the one that got installed last). If you want 'ipython' to start > with Python 2, then flip these commands round. Either way, 'ipython2' will > launch IPython with Python 2. I use pip install --user This will prevent conflicts with system stuff From damianavila at gmail.com Wed Jun 18 07:40:45 2014 From: damianavila at gmail.com (=?UTF-8?Q?Dami=C3=A1n_Avila?=) Date: Wed, 18 Jun 2014 08:40:45 -0300 Subject: [IPython-dev] [sage-cloud] Keybindings cheat sheets In-Reply-To: <1403085410.17417.1.camel@archi> References: <7577f17c-f026-4fe4-804e-92b4e051920e@googlegroups.com> <20140618001258.GE5924@HbI-OTOH.berkeley.edu> <1403085410.17417.1.camel@archi> Message-ID: Yes, I will post it soon. Just want to add some other little things before pushing to public... 2014-06-18 6:56 GMT-03:00 Max Linke : > On Tue, 2014-06-17 at 22:18 -0300, Dami?n Avila wrote: > > You can also build vertical toolbars to replace the default one... ie, > this > > is my current setup/theme to take advantage from the horizontal space, > > making free more vertical one: > > https://twitter.com/damian_avila/status/478033494988562432/photo/1 > > This is really cool. Can you post the config to do this? > > best Max > > > > > > > > > > > 2014-06-17 21:12 GMT-03:00 Paul Ivanov : > > > > > Fernando Perez, on 2014-06-17 15:55, wrote: > > > > Toggling the header and the toolbar are two common ways of reclaiming > > > > vertical real estate, which is indeed at a premium in modern > laptops.... > > > > > > To do this, I have the following in my custom.js > > > > > > // Full-Screen via F11 (toggle header and toolbar) > > > $([IPython.events]).on('notebook_loaded.Notebook', function(){ > > > document.addEventListener("keydown", function(e) { > > > if (e.keyCode == 122) { > > > $('#toggle_header').click(); > > > $('#toggle_toolbar').click(); > > > console.log("toggling full screen mode"); > > > } > > > }); > > > > > > > > > -- > > > _ > > > / \ > > > A* \^ - > > > ,./ _.`\\ / \ > > > / ,--.S \/ \ > > > / `"~,_ \ \ > > > __o ? > > > _ \<,_ /:\ > > > --(_)/-(_)----.../ | \ > > > --------------.......J > > > Paul Ivanov > > > ipython and matplotlib core developer > > > http://pirsquared.org > > > _______________________________________________ > > > 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 > -- *Dami?n* -------------- next part -------------- An HTML attachment was scrubbed... URL: From tomspur at fedoraproject.org Wed Jun 18 08:36:13 2014 From: tomspur at fedoraproject.org (Thomas Spura) Date: Wed, 18 Jun 2014 14:36:13 +0200 Subject: [IPython-dev] New(ish) IPython Notebook RPMs for Fedora 20? In-Reply-To: References: Message-ID: 2014-06-17 14:55 GMT+02:00 Vedran Sego : > > Currently, Fedora 20 provides packages > python3-ipython-notebook-0.13.2-3.fc20.noarch > python-ipython-notebook-0.13.2-3.fc20.noarch > > [snip] > So, my question is: > Is there a RPM of IPython Notebook (preferably for Python3) that is > compatible with Fedora 20 and has the slides functionality? > > Alternatively, is there a "quick and dirty" way around this (for > example, replacing one or two RPM-installed files that will be > automatically substituted once the new RPMs become available)? > As I'm also on f20, I created a copr repository at [1], which currently contains the ipython from rawhide and python-tornado-3.X as the "quick and dirty" way. Just put the repo file to /etc/yum.repo.d/ and you should be able to update to it. But be aware of the possible drawbacks: It is forbidden to push a new ipython to f20, because we might break packages that rely on the old ipython, because of the major version update (see [2]). As you are doing exactly that with the copr packages, you might break other packages, that depend on ipython/tornado, such as accerciser, sagemath, python-ipdb, eclipse-pydev, to name a few.. If you don't use other packages that rely on a specific version of ipython/tornado, the copr repository should work just fine. Let me know, if you have troubles with it. Greetings, Thomas [1] http://copr.fedoraproject.org/coprs/tomspur/ipython/ [2] https://fedoraproject.org/wiki/Updates_Policy#All_other_updates -------------- next part -------------- An HTML attachment was scrubbed... URL: From tomspur at fedoraproject.org Wed Jun 18 08:49:09 2014 From: tomspur at fedoraproject.org (Thomas Spura) Date: Wed, 18 Jun 2014 14:49:09 +0200 Subject: [IPython-dev] New(ish) IPython Notebook RPMs for Fedora 20? In-Reply-To: References: <53A057DD.4080903@gmail.com> <53A05EF5.1030502@gmail.com> <53A07BC8.2050300@googlemail.com> Message-ID: 2014-06-17 19:45 GMT+02:00 Vedran Sego : > @Julian: It seems to be working fine, at least for me, with Tornado > 2.2.1. Install for Python 2 from Rawhide looked fine, but the one for > Python 3 went crazy on me with dependencies (it's a weird difference), > so I decided to ignore it for the time being. However, thank you for > the info; I'll know where to look if something goes wrong. > rawhide has python-3.4 and f20 has python-3.3. So when you try to install python3-tornado from rawhide, yum tries to update your whole python3 dependency stack (And maybe because of the changed gcc version, even your whole system.) Greetings, Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From vsego at vsego.org Wed Jun 18 08:51:04 2014 From: vsego at vsego.org (Vedran Sego) Date: Wed, 18 Jun 2014 13:51:04 +0100 Subject: [IPython-dev] New(ish) IPython Notebook RPMs for Fedora 20? In-Reply-To: References: Message-ID: On 18 June 2014 13:36, Thomas Spura wrote: > If you don't use other packages that rely on a specific version of > ipython/tornado, the copr repository should work just fine. > Let me know, if you have troubles with it. Thank you for your reply. As I have stated in my previous mail, I have already installed this manually. I'd love to go give the RPM version a try, but can you first tell me are there going to be collisions with the manually installed version, should I first uninstall that one,... anything I should know before attempting to install this, to ensure my response is a useful one. I find it strange that Google doesn't find your page, even with the terms copied from it (the same search I used before asking here): https://www.google.com/search?q=%22fedora%2B20%22%2B%22ipython-2%22 Maybe that page should be linked somewhere where Google would find it, or it should be manually reported to Google? Thank you, C. From thomas.spura at gmail.com Wed Jun 18 09:02:35 2014 From: thomas.spura at gmail.com (Thomas Spura) Date: Wed, 18 Jun 2014 15:02:35 +0200 Subject: [IPython-dev] New(ish) IPython Notebook RPMs for Fedora 20? In-Reply-To: References: Message-ID: 2014-06-18 14:51 GMT+02:00 Vedran Sego : > On 18 June 2014 13:36, Thomas Spura wrote: > > If you don't use other packages that rely on a specific version of > > ipython/tornado, the copr repository should work just fine. > > Let me know, if you have troubles with it. > > Thank you for your reply. As I have stated in my previous mail, I have > already installed this manually. I'd love to go give the RPM version a > try, but can you first tell me are there going to be collisions with > the manually installed version, should I first uninstall that one,... > anything I should know before attempting to install this, to ensure my > response is a useful one. > Actually, I'm not sure where pip installs the packages, as I'm rarely using it. And if I do with "--user"... Maybe others on this list can comment on good practices of using pip. > I find it strange that Google doesn't find your page, even with the > terms copied from it (the same search I used before asking here): > https://www.google.com/search?q=%22fedora%2B20%22%2B%22ipython-2%22 > Maybe that page should be linked somewhere where Google would find it, > or it should be manually reported to Google? > Yeah, fedora and ipython doesn't work. You need to also mention "copr", I guess. "fedora ipython copr" shows 3-4 copr repositories for ipython, but only the one of mine seems to provide ipython-2 (yet). Greetings, Tom -------------- next part -------------- An HTML attachment was scrubbed... URL: From satra at mit.edu Wed Jun 18 12:01:10 2014 From: satra at mit.edu (Satrajit Ghosh) Date: Wed, 18 Jun 2014 12:01:10 -0400 Subject: [IPython-dev] docs on tab/accordion widgets Message-ID: hi folks, are there some examples of using the tab and accordion widgets? cheers, satra -------------- next part -------------- An HTML attachment was scrubbed... URL: From doug.blank at gmail.com Wed Jun 18 12:13:11 2014 From: doug.blank at gmail.com (Doug Blank) Date: Wed, 18 Jun 2014 12:13:11 -0400 Subject: [IPython-dev] CodeMirror versions? Message-ID: We are working on making some refinements to the CodeMirror markdown in IPython, and trying to figure out exactly what version of CodeMirror is in IPython. I see that ipython-components has been updated to CodeMirror 3.24: https://github.com/ipython/ipython-components/commit/0e1db04d7ef79db0ef0cac8c78f01838d4b2ce2b What version of CodeMirror is in IPython 2.1? I was trying some of the items documented here in IPython 2.1 (like references) but they do not render: http://codemirror.net/mode/markdown/index.html What is a better help document for everything that IPython + CodeMirror supports? -Doug -------------- next part -------------- An HTML attachment was scrubbed... URL: From benjaminrk at gmail.com Wed Jun 18 14:33:22 2014 From: benjaminrk at gmail.com (MinRK) Date: Wed, 18 Jun 2014 11:33:22 -0700 Subject: [IPython-dev] CodeMirror versions? In-Reply-To: References: Message-ID: IPython 2.x uses CodeMirror 3.22 IPython 3.x will use CodeMirror 4.x (but currently 3.24) Note that CodeMirror doesn?t do anything other than input. It is not involved in rendering markdown. We use marked for this, with gfm=True. If you are interested in what markdown rendering is available, the marked docs are the place to look. -MinRK ? On Wed, Jun 18, 2014 at 9:13 AM, Doug Blank wrote: > We are working on making some refinements to the CodeMirror markdown in > IPython, and trying to figure out exactly what version of CodeMirror is in > IPython. > > I see that ipython-components has been updated to CodeMirror 3.24: > > > https://github.com/ipython/ipython-components/commit/0e1db04d7ef79db0ef0cac8c78f01838d4b2ce2b > > What version of CodeMirror is in IPython 2.1? > > I was trying some of the items documented here in IPython 2.1 (like > references) but they do not render: > > http://codemirror.net/mode/markdown/index.html > > What is a better help document for everything that IPython + CodeMirror > supports? > > -Doug > > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From will at thearete.co.uk Wed Jun 18 16:00:33 2014 From: will at thearete.co.uk (William Furnass) Date: Wed, 18 Jun 2014 21:00:33 +0100 Subject: [IPython-dev] widget.interact Message-ID: Hi, is there a way of using widgets.interact so that it only creates widgets for a subset of its arguments? This is handy for where you already have a function for which you only want widgets for a few params. Below is an example of what I'd like to be able to do. At present interact tries to create a widget from df then cries when it finds it's an enormous pandas DataFrame. Cheers, Will import matplotlib.pyplot as plt %matplotlib inline import pandas as pd from IPython.html import widgets from IPython.display import display def f1(df, a, b, c): # process pandas.DataFrame using parameters a, b and c def init_graph(df, a, b, c): f1(df, a, b, c): fig = plt.figure() # plot stuff here using the pandas.DataFrame df init_graph(a, b, c, df) i = widgets.interact(init_graph, a=widgets.BoundedFloatTextWidget(min=0., max=10., value=0.1), b=widgets.BoundedFloatTextWidget(min=0., max=10., value=0.1), c=widgets.BoundedFloatTextWidget(min=0., max=10., value=1.)) From benjaminrk at gmail.com Wed Jun 18 16:34:28 2014 From: benjaminrk at gmail.com (MinRK) Date: Wed, 18 Jun 2014 13:34:28 -0700 Subject: [IPython-dev] widget.interact In-Reply-To: References: Message-ID: Use widgets.fixed to fix a value: i = widgets.interact(init_graph, a=widgets.BoundedFloatTextWidget(min=0., max=10., value=0.1), b=widgets.BoundedFloatTextWidget(min=0., max=10., value=0.1), c=widgets.BoundedFloatTextWidget(min=0., max=10., value=1.), df=widgets.fixed(mydataframe), ) ? On Wed, Jun 18, 2014 at 1:00 PM, William Furnass wrote: > Hi, is there a way of using widgets.interact so that it only creates > widgets for a subset of its arguments? This is handy for where you > already have a function for which you only want widgets for a few > params. > > Below is an example of what I'd like to be able to do. At present > interact tries to create a widget from df then cries when it finds > it's an enormous pandas DataFrame. > > Cheers, > > Will > > > import matplotlib.pyplot as plt > %matplotlib inline > import pandas as pd > from IPython.html import widgets > from IPython.display import display > > def f1(df, a, b, c): > # process pandas.DataFrame using parameters a, b and c > > def init_graph(df, a, b, c): > f1(df, a, b, c): > fig = plt.figure() > # plot stuff here using the pandas.DataFrame df > > init_graph(a, b, c, df) > i = widgets.interact(init_graph, > a=widgets.BoundedFloatTextWidget(min=0., max=10., value=0.1), > b=widgets.BoundedFloatTextWidget(min=0., max=10., value=0.1), > c=widgets.BoundedFloatTextWidget(min=0., max=10., value=1.)) > _______________________________________________ > 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 nick.bollweg at gmail.com Wed Jun 18 19:53:43 2014 From: nick.bollweg at gmail.com (Nicholas Bollweg) Date: Wed, 18 Jun 2014 19:53:43 -0400 Subject: [IPython-dev] Loading nbextension on widget instantiation In-Reply-To: References: Message-ID: > class MyWidget(Widget): > view_name = 'WidgetView' > view_module = '/nbextensions/ipynbdbtk/js' > +1! Do want. Require.js, to me is kind of like submodules: don't use it if you don't have to, but once you do, get used to it and go with it! > Speaking of documentation: a template for building extensions with widgets >> that that embodied the baseline of knowledge spread all over the community >> would be great. I have used paste before, which seems kind of heavy these >> days. Cookiecutter looks good: >> > > I think we're really still working out what best practices are - and > updating IPython's APIs as we work out things like this. By all means > create a template, though - it can evolve as our knowledge and APIs improve. > Here's a whack at a cookiecutter pattern: I'm interested in feedback! https://github.com/bollwyvl/cookiecutter-ipython-widget Practically, cookiecutter is less mature than, say, yeoman, but it's lighter-weight than either the paste stack or the whole node stack, so for the time being, I think it's a good starting point. I call out some other patterns that I'd like to see: i've already done some d3 examples, so can probably pick up some stuff. Cheers! -------------- next part -------------- An HTML attachment was scrubbed... URL: From takowl at gmail.com Wed Jun 18 20:09:58 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Wed, 18 Jun 2014 17:09:58 -0700 Subject: [IPython-dev] Loading nbextension on widget instantiation In-Reply-To: References: Message-ID: On 18 June 2014 16:53, Nicholas Bollweg wrote: > Here's a whack at a cookiecutter pattern: I'm interested in feedback! > https://github.com/bollwyvl/cookiecutter-ipython-widget > Looks good. I frown a bit on modules doing stuff (install_nbextension in this case) at import time. I have my code install the nbextension (using the symlink option) when the widget class is instantiated. We've designed that API to be cheap when it's already installed, so you can use it as an 'ensure this is installed' mechanism. Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From nick.bollweg at gmail.com Wed Jun 18 22:25:50 2014 From: nick.bollweg at gmail.com (Nicholas Bollweg) Date: Wed, 18 Jun 2014 22:25:50 -0400 Subject: [IPython-dev] Loading nbextension on widget instantiation In-Reply-To: References: Message-ID: > I frown a bit on modules doing stuff (install_nbextension in this case) at import time. That's a good insight. I moved the install_nbextension into __init__ in a mixin: i had been meaning to do that anyway. It partially implements the pattern you mentioned earlier. Would there be a benefit to these being traitlets? I haven't spent much time with them (aside for front-end oriented widget stuff). Cheers! On Wed, Jun 18, 2014 at 8:09 PM, Thomas Kluyver wrote: > On 18 June 2014 16:53, Nicholas Bollweg wrote: > >> Here's a whack at a cookiecutter pattern: I'm interested in feedback! >> https://github.com/bollwyvl/cookiecutter-ipython-widget >> > > Looks good. I frown a bit on modules doing stuff (install_nbextension in > this case) at import time. I have my code install the nbextension (using > the symlink option) when the widget class is instantiated. We've designed > that API to be cheap when it's already installed, so you can use it as an > 'ensure this is installed' mechanism. > > 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 doug.blank at gmail.com Thu Jun 19 07:15:14 2014 From: doug.blank at gmail.com (Doug Blank) Date: Thu, 19 Jun 2014 07:15:14 -0400 Subject: [IPython-dev] CodeMirror versions? In-Reply-To: References: Message-ID: On Wed, Jun 18, 2014 at 2:33 PM, MinRK wrote: > IPython 2.x uses CodeMirror 3.22 > > IPython 3.x will use CodeMirror 4.x (but currently 3.24) > > Note that CodeMirror doesn?t do anything other than input. It is not > involved in rendering markdown. We use marked > for this, with gfm=True. If you are > interested in what markdown rendering is available, the marked docs are the > place to look. > Thanks, that is what I needed to know. I was looking for docs like: http://codemirror.net/mode/markdown/index.html (which doesn't seem to be 100% compatible with marked) But for marked, I could only find: https://github.com/chjj/marked/tree/master/test/tests Of course there is: http://nbviewer.ipython.org/github/ipython/ipython/blob/2.x/examples/Notebook/Markdown%20Cells.ipynb but is not exhaustive, and requires a running kernel to see the source markdown. It also points to: http://daringfireball.net/projects/markdown/syntax which might be 100% compatible (can't tell for certain), but is not the easiest documentation for a new student to read. For example, it assumes that the user understands HTML. We're looking for markdown documentation specific to notebooks, good for beginners, kernel agnostic, covers LaTeX etc, and gives the output in terms of rendered text. Anything like that exist? Thanks! -Doug > -MinRK > ? > > > On Wed, Jun 18, 2014 at 9:13 AM, Doug Blank wrote: > >> We are working on making some refinements to the CodeMirror markdown in >> IPython, and trying to figure out exactly what version of CodeMirror is in >> IPython. >> >> I see that ipython-components has been updated to CodeMirror 3.24: >> >> >> https://github.com/ipython/ipython-components/commit/0e1db04d7ef79db0ef0cac8c78f01838d4b2ce2b >> >> What version of CodeMirror is in IPython 2.1? >> >> I was trying some of the items documented here in IPython 2.1 (like >> references) but they do not render: >> >> http://codemirror.net/mode/markdown/index.html >> >> What is a better help document for everything that IPython + CodeMirror >> supports? >> >> -Doug >> >> >> >> _______________________________________________ >> IPython-dev mailing list >> IPython-dev at scipy.org >> http://mail.scipy.org/mailman/listinfo/ipython-dev >> >> > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bussonniermatthias at gmail.com Thu Jun 19 07:37:05 2014 From: bussonniermatthias at gmail.com (Matthias Bussonnier) Date: Thu, 19 Jun 2014 13:37:05 +0200 Subject: [IPython-dev] CodeMirror versions? In-Reply-To: References: Message-ID: > http://daringfireball.net/projects/markdown/syntax > > which might be 100% compatible (can't tell for certain), but is not the easiest documentation for a new student to read. For example, it assumes that the user understands HTML. This is the original definition of markdown. all other implementation are deviation of the original one. This is one of the issues with markdown that most extensions have slight variations. Even our way of including TeX in markdown is not teal markdown. Except for Latex, we are relatively close to GFM: https://help.github.com/articles/github-flavored-markdown -- M Le 19 juin 2014 ? 13:15, Doug Blank a ?crit : > On Wed, Jun 18, 2014 at 2:33 PM, MinRK wrote: > IPython 2.x uses CodeMirror 3.22 > > IPython 3.x will use CodeMirror 4.x (but currently 3.24) > > Note that CodeMirror doesn?t do anything other than input. It is not involved in rendering markdown. We use marked for this, with gfm=True. If you are interested in what markdown rendering is available, the marked docs are the place to look. > > Thanks, that is what I needed to know. I was looking for docs like: > > http://codemirror.net/mode/markdown/index.html > > (which doesn't seem to be 100% compatible with marked) > > But for marked, I could only find: > > https://github.com/chjj/marked/tree/master/test/tests > > Of course there is: > > http://nbviewer.ipython.org/github/ipython/ipython/blob/2.x/examples/Notebook/Markdown%20Cells.ipynb > > but is not exhaustive, and requires a running kernel to see the source markdown. It also points to: > > > We're looking for markdown documentation specific to notebooks, good for beginners, kernel agnostic, covers LaTeX etc, and gives the output in terms of rendered text. Anything like that exist? > > Thanks! > > -Doug > > -MinRK > > ? > > > On Wed, Jun 18, 2014 at 9:13 AM, Doug Blank wrote: > We are working on making some refinements to the CodeMirror markdown in IPython, and trying to figure out exactly what version of CodeMirror is in IPython. > > I see that ipython-components has been updated to CodeMirror 3.24: > > https://github.com/ipython/ipython-components/commit/0e1db04d7ef79db0ef0cac8c78f01838d4b2ce2b > > What version of CodeMirror is in IPython 2.1? > > I was trying some of the items documented here in IPython 2.1 (like references) but they do not render: > > http://codemirror.net/mode/markdown/index.html > > What is a better help document for everything that IPython + CodeMirror supports? > > -Doug > > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: From doug.blank at gmail.com Thu Jun 19 07:53:47 2014 From: doug.blank at gmail.com (Doug Blank) Date: Thu, 19 Jun 2014 07:53:47 -0400 Subject: [IPython-dev] CodeMirror versions? In-Reply-To: References: Message-ID: On Thu, Jun 19, 2014 at 7:37 AM, Matthias Bussonnier < bussonniermatthias at gmail.com> wrote: > > http://daringfireball.net/projects/markdown/syntax > > which might be 100% compatible (can't tell for certain), but is not the > easiest documentation for a new student to read. For example, it assumes > that the user understands HTML. > > > > This is the original definition of markdown. > all other implementation are deviation of the original one. > > This is one of the issues with markdown that most extensions have slight > variations. > > Even our way of including TeX in markdown is not teal markdown. > > Except for Latex, we are relatively close to GFM: > > https://help.github.com/articles/github-flavored-markdown > Great, thanks! That is very useful, as it specifies things that work that IPython's own documentation implies otherwise. For example, on page: http://nbviewer.ipython.org/github/ipython/ipython/blob/2.x/examples/Notebook/Markdown%20Cells.ipynb it says: "Because Markdown is a superset of HTML you can even add things like HTML tables" implying that the only way to get tables is through HTML, which is incorrect. Looks like we'll be writing some documentation... -Doug > > -- > M > > > Le 19 juin 2014 ? 13:15, Doug Blank a ?crit : > > On Wed, Jun 18, 2014 at 2:33 PM, MinRK wrote: > >> IPython 2.x uses CodeMirror 3.22 >> >> IPython 3.x will use CodeMirror 4.x (but currently 3.24) >> >> Note that CodeMirror doesn?t do anything other than input. It is not >> involved in rendering markdown. We use marked >> for this, with gfm=True. If you are >> interested in what markdown rendering is available, the marked docs are the >> place to look. >> > Thanks, that is what I needed to know. I was looking for docs like: > > http://codemirror.net/mode/markdown/index.html > > (which doesn't seem to be 100% compatible with marked) > > But for marked, I could only find: > > https://github.com/chjj/marked/tree/master/test/tests > > Of course there is: > > > http://nbviewer.ipython.org/github/ipython/ipython/blob/2.x/examples/Notebook/Markdown%20Cells.ipynb > > but is not exhaustive, and requires a running kernel to see the source > markdown. It also points to: > > > > > > We're looking for markdown documentation specific to notebooks, good for > beginners, kernel agnostic, covers LaTeX etc, and gives the output in terms > of rendered text. Anything like that exist? > > Thanks! > > -Doug > > >> -MinRK >> ? >> >> >> On Wed, Jun 18, 2014 at 9:13 AM, Doug Blank wrote: >> >>> We are working on making some refinements to the CodeMirror markdown in >>> IPython, and trying to figure out exactly what version of CodeMirror is in >>> IPython. >>> >>> I see that ipython-components has been updated to CodeMirror 3.24: >>> >>> >>> https://github.com/ipython/ipython-components/commit/0e1db04d7ef79db0ef0cac8c78f01838d4b2ce2b >>> >>> What version of CodeMirror is in IPython 2.1? >>> >>> I was trying some of the items documented here in IPython 2.1 (like >>> references) but they do not render: >>> >>> http://codemirror.net/mode/markdown/index.html >>> >>> What is a better help document for everything that IPython + CodeMirror >>> supports? >>> >>> -Doug >>> >>> >>> >>> _______________________________________________ >>> IPython-dev mailing list >>> IPython-dev at scipy.org >>> http://mail.scipy.org/mailman/listinfo/ipython-dev >>> >>> >> >> _______________________________________________ >> IPython-dev mailing list >> IPython-dev at scipy.org >> http://mail.scipy.org/mailman/listinfo/ipython-dev >> >> > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > > > _______________________________________________ > 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 antgonza at gmail.com Thu Jun 19 09:59:16 2014 From: antgonza at gmail.com (=?UTF-8?Q?Antonio_Gonz=C3=A1lez_Pe=C3=B1a?=) Date: Thu, 19 Jun 2014 07:59:16 -0600 Subject: [IPython-dev] running shell command from engine Message-ID: Hello, Is it possible to run a shell command from an engine? For example: result = v.map(lambda job: Popen(['/bin/sh', job]), jobs) Thanks -- Antonio From takowl at gmail.com Thu Jun 19 12:29:00 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Thu, 19 Jun 2014 09:29:00 -0700 Subject: [IPython-dev] Loading nbextension on widget instantiation In-Reply-To: References: Message-ID: On 18 June 2014 19:25, Nicholas Bollweg wrote: > Would there be a benefit to these being traitlets? I haven't spent much > time with them (aside for front-end oriented widget stuff). Sorry, to what being traitlets? -------------- next part -------------- An HTML attachment was scrubbed... URL: From nick.bollweg at gmail.com Thu Jun 19 14:08:29 2014 From: nick.bollweg at gmail.com (Nicholas Bollweg) Date: Thu, 19 Jun 2014 14:08:29 -0400 Subject: [IPython-dev] Loading nbextension on widget instantiation In-Reply-To: References: Message-ID: Sorry: I should have provided a link! _view_static, _view_module and _view_style, in the mixin . Would there be a benefit to these being traitlets? I haven't spent much >> time with them (aside for front-end oriented widget stuff). > > Sorry, to what being traitlets? > None of these will be used client-side, as opposed to _view_name, which is (in create_view), but is there still some reason for them to be traitlets? My thinking here being these rules-of-thumb (proposed): - *For a given library of widgets, put your static assets together so that they can be copied into nbextensions when needed.* - *For a given Widget+View, load a single script (and if necessary, stylesheet): handle all other things with require() and @import, respectively.* At first glance, this seems a bit restrictive: one script? But once requirejs is thrown in the mix, this actually makes good sense, as most requirejs-aware libraries (i.e. d3) won't even attach to the global scope! -------------- next part -------------- An HTML attachment was scrubbed... URL: From fperez.net at gmail.com Thu Jun 19 14:27:46 2014 From: fperez.net at gmail.com (Fernando Perez) Date: Thu, 19 Jun 2014 11:27:46 -0700 Subject: [IPython-dev] CodeMirror versions? In-Reply-To: References: Message-ID: Hey Doug, as you look into markdown questions for more academic/scientific work, it's worth keeping an eye on "Pandoc markdown": http://johnmacfarlane.net/pandoc/README.html#pandocs-markdown which is an extension in this direction, and one that was adopted by the last version of RStudio for their RMarkdown work: http://www.rstudio.com/products/rstudio/download/preview/ This requires server-side components (and pandoc, at that!), but if things gain traction in this direction, it may be better to collaborate rather than reinvent... Cheers f On Thu, Jun 19, 2014 at 4:15 AM, Doug Blank wrote: > On Wed, Jun 18, 2014 at 2:33 PM, MinRK wrote: > >> IPython 2.x uses CodeMirror 3.22 >> >> IPython 3.x will use CodeMirror 4.x (but currently 3.24) >> >> Note that CodeMirror doesn?t do anything other than input. It is not >> involved in rendering markdown. We use marked >> for this, with gfm=True. If you are >> interested in what markdown rendering is available, the marked docs are the >> place to look. >> > Thanks, that is what I needed to know. I was looking for docs like: > > http://codemirror.net/mode/markdown/index.html > > (which doesn't seem to be 100% compatible with marked) > > But for marked, I could only find: > > https://github.com/chjj/marked/tree/master/test/tests > > Of course there is: > > > http://nbviewer.ipython.org/github/ipython/ipython/blob/2.x/examples/Notebook/Markdown%20Cells.ipynb > > but is not exhaustive, and requires a running kernel to see the source > markdown. It also points to: > > http://daringfireball.net/projects/markdown/syntax > > which might be 100% compatible (can't tell for certain), but is not the > easiest documentation for a new student to read. For example, it assumes > that the user understands HTML. > > We're looking for markdown documentation specific to notebooks, good for > beginners, kernel agnostic, covers LaTeX etc, and gives the output in terms > of rendered text. Anything like that exist? > > Thanks! > > -Doug > > >> -MinRK >> ? >> >> >> On Wed, Jun 18, 2014 at 9:13 AM, Doug Blank wrote: >> >>> We are working on making some refinements to the CodeMirror markdown in >>> IPython, and trying to figure out exactly what version of CodeMirror is in >>> IPython. >>> >>> I see that ipython-components has been updated to CodeMirror 3.24: >>> >>> >>> https://github.com/ipython/ipython-components/commit/0e1db04d7ef79db0ef0cac8c78f01838d4b2ce2b >>> >>> What version of CodeMirror is in IPython 2.1? >>> >>> I was trying some of the items documented here in IPython 2.1 (like >>> references) but they do not render: >>> >>> http://codemirror.net/mode/markdown/index.html >>> >>> What is a better help document for everything that IPython + CodeMirror >>> supports? >>> >>> -Doug >>> >>> >>> >>> _______________________________________________ >>> IPython-dev mailing list >>> IPython-dev at scipy.org >>> http://mail.scipy.org/mailman/listinfo/ipython-dev >>> >>> >> >> _______________________________________________ >> IPython-dev mailing list >> IPython-dev at scipy.org >> http://mail.scipy.org/mailman/listinfo/ipython-dev >> >> > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -- Fernando Perez (@fperez_org; http://fperez.org) fperez.net-at-gmail: mailing lists only (I ignore this when swamped!) fernando.perez-at-berkeley: contact me here for any direct mail -------------- next part -------------- An HTML attachment was scrubbed... URL: From fperez.net at gmail.com Thu Jun 19 14:29:20 2014 From: fperez.net at gmail.com (Fernando Perez) Date: Thu, 19 Jun 2014 11:29:20 -0700 Subject: [IPython-dev] running shell command from engine In-Reply-To: References: Message-ID: Sure! Popen won't give you an actual result that's very useful, you'll need to decide whether to capture stdout/err, to use pipes, etc. But subprocess/popen are just python functions like any other, so you can use them all the same... f On Thu, Jun 19, 2014 at 6:59 AM, Antonio Gonz?lez Pe?a wrote: > Hello, > > Is it possible to run a shell command from an engine? For example: > result = v.map(lambda job: Popen(['/bin/sh', job]), jobs) > > Thanks > > -- > Antonio > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > -- Fernando Perez (@fperez_org; http://fperez.org) fperez.net-at-gmail: mailing lists only (I ignore this when swamped!) fernando.perez-at-berkeley: contact me here for any direct mail -------------- next part -------------- An HTML attachment was scrubbed... URL: From takowl at gmail.com Thu Jun 19 14:40:50 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Thu, 19 Jun 2014 11:40:50 -0700 Subject: [IPython-dev] Loading nbextension on widget instantiation In-Reply-To: References: Message-ID: On 19 June 2014 11:08, Nicholas Bollweg wrote: > Sorry: I should have provided a link! _view_static, _view_module and > _view_style, in the mixin > > . > > Would there be a benefit to these being traitlets? I haven't spent much >>> time with them (aside for front-end oriented widget stuff). >> >> Sorry, to what being traitlets? >> > > None of these will be used client-side, as opposed to _view_name, which > is (in create_view), but is there still some reason for them to be > traitlets? > Well, something like _view_module will be used client side once I get to the refactoring I've proposed. Other than that, you could use traitlets - it gets you some type checking - but I don't see any huge advantage of doing so. Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From antgonza at gmail.com Thu Jun 19 14:42:28 2014 From: antgonza at gmail.com (=?UTF-8?Q?Antonio_Gonz=C3=A1lez_Pe=C3=B1a?=) Date: Thu, 19 Jun 2014 12:42:28 -0600 Subject: [IPython-dev] running shell command from engine In-Reply-To: References: Message-ID: Thanks for the reply. I'm not really being able to use it, I tried: from IPython.parallel import Client rc = Client() with rc[:].sync_imports(): from subprocess import Popen v = rc.load_balanced_view() result = v.map(lambda job: Popen([job]), jobs) print list(result) but get: ValueError: Sorry, cannot pickle functions with closures Then, I tried using dill as described here: http://nbviewer.ipython.org/gist/minrk/5241793, so: from types import FunctionType import dill as pickle from IPython.utils.pickleutil import can_map from IPython.kernel.zmq import serialize from IPython.parallel import Client can_map.pop(FunctionType, None) serialize.pickle = pickle rc = Client()n with rc[:].sync_imports(): from subprocess import Popen v = rc.load_balanced_view() result = v.map(lambda job: Popen([job]), jobs) print list(result) but now it fails with: raise self._exception IPython.parallel.error.CompositeError: one or more exceptions from call to method: remote_import [0:apply]: AttributeError: 'module' object has no attribute '__main__' [1:apply]: AttributeError: 'module' object has no attribute '__main__' [2:apply]: AttributeError: 'module' object has no attribute '__main__' [3:apply]: AttributeError: 'module' object has no attribute '__main__' Any ideas? On Thu, Jun 19, 2014 at 12:29 PM, Fernando Perez wrote: > Sure! Popen won't give you an actual result that's very useful, you'll need > to decide whether to capture stdout/err, to use pipes, etc. But > subprocess/popen are just python functions like any other, so you can use > them all the same... > > f > > > On Thu, Jun 19, 2014 at 6:59 AM, Antonio Gonz?lez Pe?a > wrote: >> >> Hello, >> >> Is it possible to run a shell command from an engine? For example: >> result = v.map(lambda job: Popen(['/bin/sh', job]), jobs) >> >> Thanks >> >> -- >> Antonio >> _______________________________________________ >> IPython-dev mailing list >> IPython-dev at scipy.org >> http://mail.scipy.org/mailman/listinfo/ipython-dev > > > > > -- > Fernando Perez (@fperez_org; http://fperez.org) > fperez.net-at-gmail: mailing lists only (I ignore this when swamped!) > fernando.perez-at-berkeley: contact me here for any direct mail > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > -- Antonio From fperez.net at gmail.com Thu Jun 19 14:49:04 2014 From: fperez.net at gmail.com (Fernando Perez) Date: Thu, 19 Jun 2014 11:49:04 -0700 Subject: [IPython-dev] running shell command from engine In-Reply-To: References: Message-ID: Ah, that's just a limitation of the fact that your lambda is capturing the enclosing scope. Just define a normal function with local imports, and you're set. def mytool(): import suprocess as sp sp.popen(...) v.map(mytool, ....) Cheers f On Thu, Jun 19, 2014 at 11:42 AM, Antonio Gonz?lez Pe?a wrote: > Thanks for the reply. > > I'm not really being able to use it, I tried: > from IPython.parallel import Client > > rc = Client() > with rc[:].sync_imports(): > from subprocess import Popen > > v = rc.load_balanced_view() > > result = v.map(lambda job: Popen([job]), jobs) > print list(result) > but get: > ValueError: Sorry, cannot pickle functions with closures > > Then, I tried using dill as described here: > http://nbviewer.ipython.org/gist/minrk/5241793, so: > from types import FunctionType > import dill as pickle > from IPython.utils.pickleutil import can_map > from IPython.kernel.zmq import serialize > from IPython.parallel import Client > > can_map.pop(FunctionType, None) > serialize.pickle = pickle > > rc = Client()n > with rc[:].sync_imports(): > from subprocess import Popen > > v = rc.load_balanced_view() > > result = v.map(lambda job: Popen([job]), jobs) > print list(result) > but now it fails with: > raise self._exception > IPython.parallel.error.CompositeError: one or more exceptions from > call to method: remote_import > [0:apply]: AttributeError: 'module' object has no attribute '__main__' > [1:apply]: AttributeError: 'module' object has no attribute '__main__' > [2:apply]: AttributeError: 'module' object has no attribute '__main__' > [3:apply]: AttributeError: 'module' object has no attribute '__main__' > > Any ideas? > > On Thu, Jun 19, 2014 at 12:29 PM, Fernando Perez > wrote: > > Sure! Popen won't give you an actual result that's very useful, you'll > need > > to decide whether to capture stdout/err, to use pipes, etc. But > > subprocess/popen are just python functions like any other, so you can use > > them all the same... > > > > f > > > > > > On Thu, Jun 19, 2014 at 6:59 AM, Antonio Gonz?lez Pe?a < > antgonza at gmail.com> > > wrote: > >> > >> Hello, > >> > >> Is it possible to run a shell command from an engine? For example: > >> result = v.map(lambda job: Popen(['/bin/sh', job]), jobs) > >> > >> Thanks > >> > >> -- > >> Antonio > >> _______________________________________________ > >> IPython-dev mailing list > >> IPython-dev at scipy.org > >> http://mail.scipy.org/mailman/listinfo/ipython-dev > > > > > > > > > > -- > > Fernando Perez (@fperez_org; http://fperez.org) > > fperez.net-at-gmail: mailing lists only (I ignore this when swamped!) > > fernando.perez-at-berkeley: contact me here for any direct mail > > > > _______________________________________________ > > IPython-dev mailing list > > IPython-dev at scipy.org > > http://mail.scipy.org/mailman/listinfo/ipython-dev > > > > > > -- > Antonio > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > -- Fernando Perez (@fperez_org; http://fperez.org) fperez.net-at-gmail: mailing lists only (I ignore this when swamped!) fernando.perez-at-berkeley: contact me here for any direct mail -------------- next part -------------- An HTML attachment was scrubbed... URL: From doug.blank at gmail.com Thu Jun 19 15:11:31 2014 From: doug.blank at gmail.com (Doug Blank) Date: Thu, 19 Jun 2014 15:11:31 -0400 Subject: [IPython-dev] CodeMirror versions? In-Reply-To: References: Message-ID: On Thu, Jun 19, 2014 at 2:27 PM, Fernando Perez wrote: > Hey Doug, > > as you look into markdown questions for more academic/scientific work, > it's worth keeping an eye on "Pandoc markdown": > > http://johnmacfarlane.net/pandoc/README.html#pandocs-markdown > > which is an extension in this direction, and one that was adopted by the > last version of RStudio for their RMarkdown work: > > http://www.rstudio.com/products/rstudio/download/preview/ > Thanks for the links! The RStudio may be particularly useful, as they would be wrestling with the same constraints as IPython. As a philosophy, we'll try to keep the rendering incremental from top to bottom. This requires server-side components (and pandoc, at that!), but if things > gain traction in this direction, it may be better to collaborate rather > than reinvent... > Agreed! -Doug > > Cheers > > f > > > On Thu, Jun 19, 2014 at 4:15 AM, Doug Blank wrote: > >> On Wed, Jun 18, 2014 at 2:33 PM, MinRK wrote: >> >>> IPython 2.x uses CodeMirror 3.22 >>> >>> IPython 3.x will use CodeMirror 4.x (but currently 3.24) >>> >>> Note that CodeMirror doesn?t do anything other than input. It is not >>> involved in rendering markdown. We use marked >>> for this, with gfm=True. If you are >>> interested in what markdown rendering is available, the marked docs are the >>> place to look. >>> >> Thanks, that is what I needed to know. I was looking for docs like: >> >> http://codemirror.net/mode/markdown/index.html >> >> (which doesn't seem to be 100% compatible with marked) >> >> But for marked, I could only find: >> >> https://github.com/chjj/marked/tree/master/test/tests >> >> Of course there is: >> >> >> http://nbviewer.ipython.org/github/ipython/ipython/blob/2.x/examples/Notebook/Markdown%20Cells.ipynb >> >> but is not exhaustive, and requires a running kernel to see the source >> markdown. It also points to: >> >> http://daringfireball.net/projects/markdown/syntax >> >> which might be 100% compatible (can't tell for certain), but is not the >> easiest documentation for a new student to read. For example, it assumes >> that the user understands HTML. >> >> We're looking for markdown documentation specific to notebooks, good for >> beginners, kernel agnostic, covers LaTeX etc, and gives the output in terms >> of rendered text. Anything like that exist? >> >> Thanks! >> >> -Doug >> >> >>> -MinRK >>> ? >>> >>> >>> On Wed, Jun 18, 2014 at 9:13 AM, Doug Blank >>> wrote: >>> >>>> We are working on making some refinements to the CodeMirror markdown in >>>> IPython, and trying to figure out exactly what version of CodeMirror is in >>>> IPython. >>>> >>>> I see that ipython-components has been updated to CodeMirror 3.24: >>>> >>>> >>>> https://github.com/ipython/ipython-components/commit/0e1db04d7ef79db0ef0cac8c78f01838d4b2ce2b >>>> >>>> What version of CodeMirror is in IPython 2.1? >>>> >>>> I was trying some of the items documented here in IPython 2.1 (like >>>> references) but they do not render: >>>> >>>> http://codemirror.net/mode/markdown/index.html >>>> >>>> What is a better help document for everything that IPython + CodeMirror >>>> supports? >>>> >>>> -Doug >>>> >>>> >>>> >>>> _______________________________________________ >>>> IPython-dev mailing list >>>> IPython-dev at scipy.org >>>> http://mail.scipy.org/mailman/listinfo/ipython-dev >>>> >>>> >>> >>> _______________________________________________ >>> IPython-dev mailing list >>> IPython-dev at scipy.org >>> http://mail.scipy.org/mailman/listinfo/ipython-dev >>> >>> >> >> _______________________________________________ >> IPython-dev mailing list >> IPython-dev at scipy.org >> http://mail.scipy.org/mailman/listinfo/ipython-dev >> >> > > > -- > Fernando Perez (@fperez_org; http://fperez.org) > fperez.net-at-gmail: mailing lists only (I ignore this when swamped!) > fernando.perez-at-berkeley: contact me here for any direct mail > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jbzdak at gmail.com Fri Jun 20 05:37:34 2014 From: jbzdak at gmail.com (=?UTF-8?Q?mgr_in=C5=BC=2E_Jacek_Bzdak?=) Date: Fri, 20 Jun 2014 11:37:34 +0200 Subject: [IPython-dev] Disable output cache in notebook Message-ID: Hi, I'm using ipython notebook in cluster enviorment, and I work with rather large numpy arrays. I think that output history/cache feature makes my notebooks slow, and using excessive amounts of RAM, so I want to either disable it or cache like 20 last outputs. I'm not sure how to do this in the config file, i found following configuration options that could do this, but I'm not sure whether they apply to notebook: - InteractiveShell.cache_size - ZMQInteractiveShell.cache_size Will setting these disable cache, and if not what is the preffered way to do this? JB -------------- next part -------------- An HTML attachment was scrubbed... URL: From maximilian.albert at gmail.com Fri Jun 20 06:32:34 2014 From: maximilian.albert at gmail.com (Maximilian Albert) Date: Fri, 20 Jun 2014 11:32:34 +0100 Subject: [IPython-dev] running shell command from engine In-Reply-To: References: Message-ID: 2014-06-19 19:29 GMT+01:00 Fernando Perez : > Sure! Popen won't give you an actual result that's very useful, you'll > need to decide whether to capture stdout/err, to use pipes, etc. But > subprocess/popen are just python functions like any other, so you can use > them all the same... > On a related note, I have found the 'sh' module [1,2] *much* more convenient to use and its error messages (which are raised as exceptions when the subprocess exits with an error) much easier to debug than using subprocess directly. Cheers, Max [1] https://pypi.python.org/pypi/sh [2] http://amoffat.github.io/sh/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From bussonniermatthias at gmail.com Fri Jun 20 07:15:32 2014 From: bussonniermatthias at gmail.com (Matthias Bussonnier) Date: Fri, 20 Jun 2014 13:15:32 +0200 Subject: [IPython-dev] CodeMirror versions? In-Reply-To: References: Message-ID: Hi all, Le 19 juin 2014 ? 20:27, Fernando Perez a ?crit : > Hey Doug, > > as you look into markdown questions for more academic/scientific work, it's worth keeping an eye on "Pandoc markdown": > > http://johnmacfarlane.net/pandoc/README.html#pandocs-markdown > > which is an extension in this direction, and one that was adopted by the last version of RStudio for their RMarkdown work: > > http://www.rstudio.com/products/rstudio/download/preview/ > > This requires server-side components (and pandoc, at that!), but if things gain traction in this direction, it may be better to collaborate rather than reinvent? I cc'ed Pierre (which I know read thing on IPython dev some time). I think he has investigating compiling pandoc to javascript to have it run in browser through emscriptem. He at least some heavy hack on top of IPython to use custom rendering of markdown+latex in the notebooks. -- M -------------- next part -------------- An HTML attachment was scrubbed... URL: From pierre.gerold at laposte.net Fri Jun 20 08:18:00 2014 From: pierre.gerold at laposte.net (pierre.gerold) Date: Fri, 20 Jun 2014 14:18:00 +0200 Subject: [IPython-dev] CodeMirror versions? In-Reply-To: References: Message-ID: <53A42678.5010900@laposte.net> Le 19/06/2014 20:27, Fernando Perez a ?crit : > Hey Doug, > > as you look into markdown questions for more academic/scientific work, > it's worth keeping an eye on "Pandoc markdown": > > http://johnmacfarlane.net/pandoc/README.html#pandocs-markdown > > which is an extension in this direction, and one that was adopted by > the last version of RStudio for their RMarkdown work: > > http://www.rstudio.com/products/rstudio/download/preview/ > > This requires server-side components (and pandoc, at that!), but if > things gain traction in this direction, it may be better to > collaborate rather than reinvent... > > Cheers > > f Hi, As Matthias said, I have more or less the same purpose as Doug, namely, create academic document using IPython. If you want to replace marked markdown rendering by pandoc ones, I have investigated a bit. I have a draft of notebook with all ingredients making things works ( except the javascript linking .. but if you are interrested in I can help). Basicaly, rendering a IPython cell with Pandoc needs just a very easy filter (written in python) and , of course, put the rendering in server side. But you gain all the Pandoc markdown functionnality (A lot of !). Also, doing that, you are sure that nbconvert and interactive session render the same way. https://github.com/parleur/sandbox/blob/master/Pandoc%20markdown%20VS%20ipython%20markdown.ipynb In practice, this hack could be shaped into an IPython extension, that monkey patch the current IPython mardown renderer. About, converting pandoc in javascript, well, I tried and encountered some problem ( I am not expert in Haskwell environment, nor in emscripten ...), so right now I cannot say if possible ( I suppose anyway ) nor usable ( speed ? ). But it would be great isnt it ;-) From satra at mit.edu Fri Jun 20 11:32:25 2014 From: satra at mit.edu (Satrajit Ghosh) Date: Fri, 20 Jun 2014 11:32:25 -0400 Subject: [IPython-dev] docs on tab/accordion widgets In-Reply-To: References: Message-ID: fyi: found an example here - https://github.com/ipython/ipython/issues/5743 cheers, satra On Wed, Jun 18, 2014 at 12:01 PM, Satrajit Ghosh wrote: > hi folks, > > are there some examples of using the tab and accordion widgets? > > cheers, > > satra > -------------- next part -------------- An HTML attachment was scrubbed... URL: From takowl at gmail.com Fri Jun 20 12:59:17 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Fri, 20 Jun 2014 09:59:17 -0700 Subject: [IPython-dev] Disable output cache in notebook In-Reply-To: References: Message-ID: On 20 June 2014 02:37, mgr in?. Jacek Bzdak wrote: > I'm not sure how to do this in the config file, i found following > configuration options that could do this, but I'm not sure whether they > apply to notebook: > > - > > InteractiveShell.cache_size > > - > > ZMQInteractiveShell.cache_size > > > Yes, either of those should work. InteractiveShell will affect IPython however you use it; ZMQInteractiveShell will affect everything other than plain terminal IPython. Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From zvoros at gmail.com Fri Jun 20 14:31:01 2014 From: zvoros at gmail.com (=?ISO-8859-1?Q?Zolt=E1n_V=F6r=F6s?=) Date: Fri, 20 Jun 2014 20:31:01 +0200 Subject: [IPython-dev] notebook input cell is not resized after removing lines Message-ID: <53A47DE5.3090008@gmail.com> Hi all, I have quickly gone through the most recent issues, but haven't found this particular one, so I wanted to ask if this is a known bug. I am running the latest code from master in chrome. (Firefox doesn't seem to have this issue, nor does opera.) When I remove lines from a code cell, the cell is not resized. The problem is demonstrated in the screenshot. Both cells contained 9 lines initially, and then I deleted 5 in the second cell. However, the outline of the cell does not change. If I execute code in this cell, then there is a space of 5 lines between the input and the output. Can someone else reproduce this, or something is wrong on my end? Cheers, Zolt?n -------------- next part -------------- A non-text attachment was scrubbed... Name: ipython.png Type: image/png Size: 6469 bytes Desc: not available URL: From fperez.net at gmail.com Fri Jun 20 14:53:01 2014 From: fperez.net at gmail.com (Fernando Perez) Date: Fri, 20 Jun 2014 11:53:01 -0700 Subject: [IPython-dev] running shell command from engine In-Reply-To: References: Message-ID: this is one part of the python stdlib that I've hated for years. I really wish something like sh was in there, thanks for the reminder... On Fri, Jun 20, 2014 at 3:32 AM, Maximilian Albert < maximilian.albert at gmail.com> wrote: > 2014-06-19 19:29 GMT+01:00 Fernando Perez : > >> Sure! Popen won't give you an actual result that's very useful, you'll >> need to decide whether to capture stdout/err, to use pipes, etc. But >> subprocess/popen are just python functions like any other, so you can use >> them all the same... >> > > On a related note, I have found the 'sh' module [1,2] *much* more > convenient to use and its error messages (which are raised as exceptions > when the subprocess exits with an error) much easier to debug than using > subprocess directly. > > Cheers, > Max > > [1] https://pypi.python.org/pypi/sh > [2] http://amoffat.github.io/sh/ > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > -- Fernando Perez (@fperez_org; http://fperez.org) fperez.net-at-gmail: mailing lists only (I ignore this when swamped!) fernando.perez-at-berkeley: contact me here for any direct mail -------------- next part -------------- An HTML attachment was scrubbed... URL: From fperez.net at gmail.com Fri Jun 20 14:56:07 2014 From: fperez.net at gmail.com (Fernando Perez) Date: Fri, 20 Jun 2014 11:56:07 -0700 Subject: [IPython-dev] notebook input cell is not resized after removing lines In-Reply-To: <53A47DE5.3090008@gmail.com> References: <53A47DE5.3090008@gmail.com> Message-ID: On Fri, Jun 20, 2014 at 11:31 AM, Zolt?n V?r?s wrote: > > Can someone else reproduce this, or something is wrong on my end? > Just tested, ipython master, chrome Version 35.0.1916.153, I don't see the problem. Cell re-shrinks as expected as I delete lines... f -- Fernando Perez (@fperez_org; http://fperez.org) fperez.net-at-gmail: mailing lists only (I ignore this when swamped!) fernando.perez-at-berkeley: contact me here for any direct mail -------------- next part -------------- An HTML attachment was scrubbed... URL: From zvoros at gmail.com Fri Jun 20 15:14:22 2014 From: zvoros at gmail.com (=?ISO-8859-1?Q?Zolt=E1n_V=F6r=F6s?=) Date: Fri, 20 Jun 2014 21:14:22 +0200 Subject: [IPython-dev] notebook input cell is not resized after removing lines In-Reply-To: References: <53A47DE5.3090008@gmail.com> Message-ID: <53A4880E.1010209@gmail.com> Hi Fernando, On 06/20/2014 08:56 PM, Fernando Perez wrote: > > On Fri, Jun 20, 2014 at 11:31 AM, Zolt?n V?r?s > wrote: > > > Can someone else reproduce this, or something is wrong on my end? > > > Just tested, ipython master, chrome Version 35.0.1916.153, I don't see > the problem. Cell re-shrinks as expected as I delete lines... > > f > Odd. I have just tried again, the problem persists. I have to add though, that I am running chrome version 34.0.1847.116. Cheers, Zolt?n From bussonniermatthias at gmail.com Fri Jun 20 15:23:05 2014 From: bussonniermatthias at gmail.com (Matthias Bussonnier) Date: Fri, 20 Jun 2014 21:23:05 +0200 Subject: [IPython-dev] notebook input cell is not resized after removing lines In-Reply-To: <53A4880E.1010209@gmail.com> References: <53A47DE5.3090008@gmail.com> <53A4880E.1010209@gmail.com> Message-ID: Look in closed issues, It has definitively already been filled a few weeks back. Am on mobile so can't check. -- M Envoy? de mon iPhone > Le 20 juin 2014 ? 21:14, Zolt?n V?r?s a ?crit : > > Hi Fernando, > >> On 06/20/2014 08:56 PM, Fernando Perez wrote: >> >> On Fri, Jun 20, 2014 at 11:31 AM, Zolt?n V?r?s > > wrote: >> >> >> Can someone else reproduce this, or something is wrong on my end? >> >> >> Just tested, ipython master, chrome Version 35.0.1916.153, I don't see >> the problem. Cell re-shrinks as expected as I delete lines... >> >> f > Odd. I have just tried again, the problem persists. I have to add > though, that I am running chrome version 34.0.1847.116. > Cheers, > Zolt?n > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev From antgonza at gmail.com Fri Jun 20 17:08:39 2014 From: antgonza at gmail.com (=?UTF-8?Q?Antonio_Gonz=C3=A1lez_Pe=C3=B1a?=) Date: Fri, 20 Jun 2014 15:08:39 -0600 Subject: [IPython-dev] running shell command from engine In-Reply-To: References: Message-ID: Thank you for the help and suggestions. On Fri, Jun 20, 2014 at 12:53 PM, Fernando Perez wrote: > this is one part of the python stdlib that I've hated for years. I really > wish something like sh was in there, thanks for the reminder... > > > On Fri, Jun 20, 2014 at 3:32 AM, Maximilian Albert > wrote: >> >> 2014-06-19 19:29 GMT+01:00 Fernando Perez : >>> >>> Sure! Popen won't give you an actual result that's very useful, you'll >>> need to decide whether to capture stdout/err, to use pipes, etc. But >>> subprocess/popen are just python functions like any other, so you can use >>> them all the same... >> >> >> On a related note, I have found the 'sh' module [1,2] *much* more >> convenient to use and its error messages (which are raised as exceptions >> when the subprocess exits with an error) much easier to debug than using >> subprocess directly. >> >> Cheers, >> Max >> >> [1] https://pypi.python.org/pypi/sh >> [2] http://amoffat.github.io/sh/ >> >> _______________________________________________ >> IPython-dev mailing list >> IPython-dev at scipy.org >> http://mail.scipy.org/mailman/listinfo/ipython-dev >> > > > > -- > Fernando Perez (@fperez_org; http://fperez.org) > fperez.net-at-gmail: mailing lists only (I ignore this when swamped!) > fernando.perez-at-berkeley: contact me here for any direct mail > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > -- Antonio From moorepants at gmail.com Fri Jun 20 19:29:34 2014 From: moorepants at gmail.com (Jason Moore) Date: Fri, 20 Jun 2014 19:29:34 -0400 Subject: [IPython-dev] How to programatically check if the ipython notebook is installed and working? Message-ID: Is there an easy way to check if the ipython notebook is installed? I know how to check if IPython is installed (try: import IPython) but not quite sure how to check if the notebook is fully installed. Jason moorepants.info +01 530-601-9791 -------------- next part -------------- An HTML attachment was scrubbed... URL: From takowl at gmail.com Fri Jun 20 19:39:45 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Fri, 20 Jun 2014 16:39:45 -0700 Subject: [IPython-dev] How to programatically check if the ipython notebook is installed and working? In-Reply-To: References: Message-ID: On 20 June 2014 16:29, Jason Moore wrote: > Is there an easy way to check if the ipython notebook is installed? I know > how to check if IPython is installed (try: import IPython) but not quite > sure how to check if the notebook is fully installed. There's no official API to check that, but if you can import IPython.html.notebookapp, you've probably got all the necessary dependencies. Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From moorepants at gmail.com Fri Jun 20 20:15:19 2014 From: moorepants at gmail.com (Jason Moore) Date: Fri, 20 Jun 2014 20:15:19 -0400 Subject: [IPython-dev] How to programatically check if the ipython notebook is installed and working? In-Reply-To: References: Message-ID: Thanks. Jason moorepants.info +01 530-601-9791 On Fri, Jun 20, 2014 at 7:39 PM, Thomas Kluyver wrote: > On 20 June 2014 16:29, Jason Moore wrote: > >> Is there an easy way to check if the ipython notebook is installed? I >> know how to check if IPython is installed (try: import IPython) but not >> quite sure how to check if the notebook is fully installed. > > > There's no official API to check that, but if you can import > IPython.html.notebookapp, you've probably got all the necessary > dependencies. > > 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 benjaminrk at gmail.com Sat Jun 21 14:22:56 2014 From: benjaminrk at gmail.com (MinRK) Date: Sat, 21 Jun 2014 11:22:56 -0700 Subject: [IPython-dev] notebook input cell is not resized after removing lines In-Reply-To: References: <53A47DE5.3090008@gmail.com> <53A4880E.1010209@gmail.com> Message-ID: I think this was a browser-version thing. If I recall correctly, it was fixed in Chrome 35. On Fri, Jun 20, 2014 at 12:23 PM, Matthias Bussonnier < bussonniermatthias at gmail.com> wrote: > Look in closed issues, > It has definitively already been filled a few weeks back. > > Am on mobile so can't check. > -- > M > > Envoy? de mon iPhone > > > Le 20 juin 2014 ? 21:14, Zolt?n V?r?s a ?crit : > > > > Hi Fernando, > > > >> On 06/20/2014 08:56 PM, Fernando Perez wrote: > >> > >> On Fri, Jun 20, 2014 at 11:31 AM, Zolt?n V?r?s >> > wrote: > >> > >> > >> Can someone else reproduce this, or something is wrong on my end? > >> > >> > >> Just tested, ipython master, chrome Version 35.0.1916.153, I don't see > >> the problem. Cell re-shrinks as expected as I delete lines... > >> > >> f > > Odd. I have just tried again, the problem persists. I have to add > > though, that I am running chrome version 34.0.1847.116. > > Cheers, > > Zolt?n > > _______________________________________________ > > IPython-dev mailing list > > IPython-dev at scipy.org > > http://mail.scipy.org/mailman/listinfo/ipython-dev > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben.root at ou.edu Sat Jun 21 18:46:07 2014 From: ben.root at ou.edu (Benjamin Root) Date: Sat, 21 Jun 2014 18:46:07 -0400 Subject: [IPython-dev] Togglable input cells? Message-ID: I am preparing for my tutorial for SciPy, and I want to avoid making a particular mistake I made last year, which was to have an exercise in the notebook for students to complete, but no "solution" available. I thought I would just type up the solution live, on-the-spot, but ended up making a complete fool of myself (it is all on YouTube, too...) So, I was thinking of some sort of way to toggle an input cell that can reveal itself when I want to. I have seen some previous discussions on this topic, but I am not quite sure if they are what I am looking for. Note, I am completely clueless on how to add additional features, plugins, etc to a notebook, and really am very bad at javascript. Of couse, I am open to other suggestions that others have done for their tutorials, so long as they are documented well, and is easy to distribute to students taking an introductory course. Cheers! Ben Root -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark.voorhies at ucsf.edu Sat Jun 21 19:10:50 2014 From: mark.voorhies at ucsf.edu (Mark Voorhies) Date: Sat, 21 Jun 2014 16:10:50 -0700 Subject: [IPython-dev] Togglable input cells? In-Reply-To: References: Message-ID: <53A610FA.4030300@ucsf.edu> On 06/21/2014 03:46 PM, Benjamin Root wrote: > I am preparing for my tutorial for SciPy, and I want to avoid making a > particular mistake I made last year, which was to have an exercise in the > notebook for students to complete, but no "solution" available. I thought I > would just type up the solution live, on-the-spot, but ended up making a > complete fool of myself (it is all on YouTube, too...) > > So, I was thinking of some sort of way to toggle an input cell that can > reveal itself when I want to. I have seen some previous discussions on this > topic, but I am not quite sure if they are what I am looking for. Note, I > am completely clueless on how to add additional features, plugins, etc to > a notebook, and really am very bad at javascript. Of couse, I am open to > other suggestions that others have done for their tutorials, Low tech solution: Stage the "hidden" cell content elsewhere (e.g., an emacs buffer) and paste it in when you need it =) --Mark P.S. My experience is that if solutions to exercises are available (as part of a distributed notebook, in slides, on the course website) at least a few students will jump ahead rather than trying the exercise. Not necessarily the end of the world, but it gets in the way of seeing alternate solutions/etc... so long as > they are documented well, and is easy to distribute to students taking an > introductory course. > > Cheers! > Ben Root > > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > From asmeurer at gmail.com Sat Jun 21 19:29:47 2014 From: asmeurer at gmail.com (Aaron Meurer) Date: Sat, 21 Jun 2014 18:29:47 -0500 Subject: [IPython-dev] Togglable input cells? In-Reply-To: <53A610FA.4030300@ucsf.edu> References: <53A610FA.4030300@ucsf.edu> Message-ID: <-3189186171122173835@unknownmsgid> My advice is to stay low tech. I tried a fancy thing (ipython_doctester) at my scipy tutorial last year, and it was more trouble than it was worth. In this case, just make a separate notebook with solutions. The way I do it is I make the solutions notebook and then when I am done I copy it and clear out the answers. Aaron Meurer > On Jun 21, 2014, at 6:11 PM, Mark Voorhies wrote: > >> On 06/21/2014 03:46 PM, Benjamin Root wrote: >> I am preparing for my tutorial for SciPy, and I want to avoid making a >> particular mistake I made last year, which was to have an exercise in the >> notebook for students to complete, but no "solution" available. I thought I >> would just type up the solution live, on-the-spot, but ended up making a >> complete fool of myself (it is all on YouTube, too...) >> >> So, I was thinking of some sort of way to toggle an input cell that can >> reveal itself when I want to. I have seen some previous discussions on this >> topic, but I am not quite sure if they are what I am looking for. Note, I >> am completely clueless on how to add additional features, plugins, etc to >> a notebook, and really am very bad at javascript. Of couse, I am open to >> other suggestions that others have done for their tutorials, > > Low tech solution: > Stage the "hidden" cell content elsewhere (e.g., an emacs buffer) and > paste it in when you need it =) > > --Mark > > P.S. My experience is that if solutions to exercises are available (as > part of a distributed notebook, in slides, on the course website) at > least a few students will jump ahead rather than trying the exercise. > Not necessarily the end of the world, but it gets in the way of seeing > alternate solutions/etc... > > > so long as >> they are documented well, and is easy to distribute to students taking an >> introductory course. >> >> Cheers! >> Ben Root >> >> >> >> _______________________________________________ >> 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 zvoros at gmail.com Sun Jun 22 05:38:35 2014 From: zvoros at gmail.com (=?UTF-8?B?Wm9sdMOhbiBWw7Zyw7Zz?=) Date: Sun, 22 Jun 2014 11:38:35 +0200 Subject: [IPython-dev] notebook input cell is not resized after removing lines In-Reply-To: References: <53A47DE5.3090008@gmail.com> <53A4880E.1010209@gmail.com> Message-ID: <53A6A41B.7010101@gmail.com> Hi Matthias/MIn, I think the relevant issue is https://github.com/ipython/ipython/pull/5843, and as Min has already indicated, it is a bug in chrome 34, so I think, we should not pursue this any further. Thanks for the pointers! Cheers, Zolt?n On 06/20/2014 09:23 PM, Matthias Bussonnier wrote: > Look in closed issues, > It has definitively already been filled a few weeks back. > > Am on mobile so can't check. From mmckerns at caltech.edu Sun Jun 22 09:25:46 2014 From: mmckerns at caltech.edu (Michael McKerns) Date: Sun, 22 Jun 2014 09:25:46 -0400 (EDT) Subject: [IPython-dev] running shell command from engine In-Reply-To: References: Message-ID: <51803.67.186.183.87.1403443546.squirrel@webmail.caltech.edu> There's a shortcut for a lot of what you did. Instead of all that stuff below? After you do: rc = Client() then do rc[:].use_dill() or instead of use_dill, there's use_cloudpickle()? you can try both. I do know that recent releases of `dill` try to limit the unnecessary globals when you work within a closure. `cloudpickle` does the same, but using a different method than dill does. What Fernando suggested is a slightly less lazy, but more sure approach to working with closures. > Thanks for the reply. > > I'm not really being able to use it, I tried: > from IPython.parallel import Client > > rc = Client() > with rc[:].sync_imports(): > from subprocess import Popen > > v = rc.load_balanced_view() > > result = v.map(lambda job: Popen([job]), jobs) > print list(result) > but get: > ValueError: Sorry, cannot pickle functions with closures > > Then, I tried using dill as described here: > http://nbviewer.ipython.org/gist/minrk/5241793, so: > from types import FunctionType > import dill as pickle > from IPython.utils.pickleutil import can_map > from IPython.kernel.zmq import serialize > from IPython.parallel import Client > > can_map.pop(FunctionType, None) > serialize.pickle = pickle > > rc = Client()n > with rc[:].sync_imports(): > from subprocess import Popen > > v = rc.load_balanced_view() > > result = v.map(lambda job: Popen([job]), jobs) > print list(result) > but now it fails with: > raise self._exception > IPython.parallel.error.CompositeError: one or more exceptions from > call to method: remote_import > [0:apply]: AttributeError: 'module' object has no attribute '__main__' > [1:apply]: AttributeError: 'module' object has no attribute '__main__' > [2:apply]: AttributeError: 'module' object has no attribute '__main__' > [3:apply]: AttributeError: 'module' object has no attribute '__main__' > > Any ideas? > > On Thu, Jun 19, 2014 at 12:29 PM, Fernando Perez > wrote: >> Sure! Popen won't give you an actual result that's very useful, you'll >> need >> to decide whether to capture stdout/err, to use pipes, etc. But >> subprocess/popen are just python functions like any other, so you can >> use >> them all the same... >> >> f >> >> >> On Thu, Jun 19, 2014 at 6:59 AM, Antonio Gonz?lez Pe?a >> >> wrote: >>> >>> Hello, >>> >>> Is it possible to run a shell command from an engine? For example: >>> result = v.map(lambda job: Popen(['/bin/sh', job]), jobs) >>> >>> Thanks >>> >>> -- >>> Antonio >>> _______________________________________________ >>> IPython-dev mailing list >>> IPython-dev at scipy.org >>> http://mail.scipy.org/mailman/listinfo/ipython-dev >> >> >> >> >> -- >> Fernando Perez (@fperez_org; http://fperez.org) >> fperez.net-at-gmail: mailing lists only (I ignore this when swamped!) >> fernando.perez-at-berkeley: contact me here for any direct mail >> >> _______________________________________________ >> IPython-dev mailing list >> IPython-dev at scipy.org >> http://mail.scipy.org/mailman/listinfo/ipython-dev >> > > > > -- > Antonio > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > --- Mike McKerns California Institute of Technology TEL: (626)395-5773 or (626)590-8470 http://www.its.caltech.edu/~mmckerns mmckerns at caltech.edu From bussonniermatthias at gmail.com Sun Jun 22 09:31:58 2014 From: bussonniermatthias at gmail.com (Matthias Bussonnier) Date: Sun, 22 Jun 2014 15:31:58 +0200 Subject: [IPython-dev] Togglable input cells? In-Reply-To: <-3189186171122173835@unknownmsgid> References: <53A610FA.4030300@ucsf.edu> <-3189186171122173835@unknownmsgid> Message-ID: What about just having solution in a separate folder and just %load them ? You can then just "publish" the folder at the end of tutorial, or even at beginning. -- M Le 22 juin 2014 ? 01:29, Aaron Meurer a ?crit : > My advice is to stay low tech. I tried a fancy thing > (ipython_doctester) at my scipy tutorial last year, and it was more > trouble than it was worth. > > In this case, just make a separate notebook with solutions. The way I > do it is I make the solutions notebook and then when I am done I copy > it and clear out the answers. > > Aaron Meurer > >> On Jun 21, 2014, at 6:11 PM, Mark Voorhies wrote: >> >>> On 06/21/2014 03:46 PM, Benjamin Root wrote: >>> I am preparing for my tutorial for SciPy, and I want to avoid making a >>> particular mistake I made last year, which was to have an exercise in the >>> notebook for students to complete, but no "solution" available. I thought I >>> would just type up the solution live, on-the-spot, but ended up making a >>> complete fool of myself (it is all on YouTube, too...) >>> >>> So, I was thinking of some sort of way to toggle an input cell that can >>> reveal itself when I want to. I have seen some previous discussions on this >>> topic, but I am not quite sure if they are what I am looking for. Note, I >>> am completely clueless on how to add additional features, plugins, etc to >>> a notebook, and really am very bad at javascript. Of couse, I am open to >>> other suggestions that others have done for their tutorials, >> >> Low tech solution: >> Stage the "hidden" cell content elsewhere (e.g., an emacs buffer) and >> paste it in when you need it =) >> >> --Mark >> >> P.S. My experience is that if solutions to exercises are available (as >> part of a distributed notebook, in slides, on the course website) at >> least a few students will jump ahead rather than trying the exercise. >> Not necessarily the end of the world, but it gets in the way of seeing >> alternate solutions/etc... >> >> >> so long as >>> they are documented well, and is easy to distribute to students taking an >>> introductory course. >>> >>> Cheers! >>> Ben Root >>> >>> >>> >>> _______________________________________________ >>> 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 ben.root at ou.edu Sun Jun 22 11:39:55 2014 From: ben.root at ou.edu (Benjamin Root) Date: Sun, 22 Jun 2014 11:39:55 -0400 Subject: [IPython-dev] Togglable input cells? In-Reply-To: References: <53A610FA.4030300@ucsf.edu> <-3189186171122173835@unknownmsgid> Message-ID: Hmm, I rather like this idea. It lets me keep the solutions packaged with the tutorials (which helps students who aren't taking the class), but keeps them "out-of-sight, out-of-mind". For the %load, can I do relative paths? Cheers! Ben Root On Sun, Jun 22, 2014 at 9:31 AM, Matthias Bussonnier < bussonniermatthias at gmail.com> wrote: > What about just having solution in a separate folder and just %load them ? > > You can then just "publish" the folder at the end of tutorial, or even at > beginning. > > -- > M > > > Le 22 juin 2014 ? 01:29, Aaron Meurer a ?crit : > > > My advice is to stay low tech. I tried a fancy thing > > (ipython_doctester) at my scipy tutorial last year, and it was more > > trouble than it was worth. > > > > In this case, just make a separate notebook with solutions. The way I > > do it is I make the solutions notebook and then when I am done I copy > > it and clear out the answers. > > > > Aaron Meurer > > > >> On Jun 21, 2014, at 6:11 PM, Mark Voorhies > wrote: > >> > >>> On 06/21/2014 03:46 PM, Benjamin Root wrote: > >>> I am preparing for my tutorial for SciPy, and I want to avoid making a > >>> particular mistake I made last year, which was to have an exercise in > the > >>> notebook for students to complete, but no "solution" available. I > thought I > >>> would just type up the solution live, on-the-spot, but ended up making > a > >>> complete fool of myself (it is all on YouTube, too...) > >>> > >>> So, I was thinking of some sort of way to toggle an input cell that can > >>> reveal itself when I want to. I have seen some previous discussions on > this > >>> topic, but I am not quite sure if they are what I am looking for. > Note, I > >>> am completely clueless on how to add additional features, plugins, etc > to > >>> a notebook, and really am very bad at javascript. Of couse, I am open > to > >>> other suggestions that others have done for their tutorials, > >> > >> Low tech solution: > >> Stage the "hidden" cell content elsewhere (e.g., an emacs buffer) and > >> paste it in when you need it =) > >> > >> --Mark > >> > >> P.S. My experience is that if solutions to exercises are available (as > >> part of a distributed notebook, in slides, on the course website) at > >> least a few students will jump ahead rather than trying the exercise. > >> Not necessarily the end of the world, but it gets in the way of seeing > >> alternate solutions/etc... > >> > >> > >> so long as > >>> they are documented well, and is easy to distribute to students taking > an > >>> introductory course. > >>> > >>> Cheers! > >>> Ben Root > >>> > >>> > >>> > >>> _______________________________________________ > >>> IPython-dev mailing list > >>> IPython-dev at scipy.org > >>> http://mail.scipy.org/mailman/listinfo/ipython-dev > >> > >> > >> _______________________________________________ > >> IPython-dev mailing list > >> IPython-dev at scipy.org > >> http://mail.scipy.org/mailman/listinfo/ipython-dev > > _______________________________________________ > > IPython-dev mailing list > > IPython-dev at scipy.org > > http://mail.scipy.org/mailman/listinfo/ipython-dev > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bussonniermatthias at gmail.com Sun Jun 22 11:57:16 2014 From: bussonniermatthias at gmail.com (Matthias Bussonnier) Date: Sun, 22 Jun 2014 17:57:16 +0200 Subject: [IPython-dev] Togglable input cells? In-Reply-To: References: <53A610FA.4030300@ucsf.edu> <-3189186171122173835@unknownmsgid> Message-ID: <4BF6FA8E-41C9-40D0-A8BB-C84AB3A6360B@gmail.com> Le 22 juin 2014 ? 17:39, Benjamin Root a ?crit : > Hmm, I rather like this idea. It lets me keep the solutions packaged with the tutorials (which helps students who aren't taking the class), but keeps them "out-of-sight, out-of-mind". For the %load, can I do relative paths? WRT current kernel working directory, I think so. You can even use URL. -- M > > Cheers! > Ben Root > > > On Sun, Jun 22, 2014 at 9:31 AM, Matthias Bussonnier wrote: > What about just having solution in a separate folder and just %load them ? > > You can then just "publish" the folder at the end of tutorial, or even at beginning. > > -- > M > > > Le 22 juin 2014 ? 01:29, Aaron Meurer a ?crit : > > > My advice is to stay low tech. I tried a fancy thing > > (ipython_doctester) at my scipy tutorial last year, and it was more > > trouble than it was worth. > > > > In this case, just make a separate notebook with solutions. The way I > > do it is I make the solutions notebook and then when I am done I copy > > it and clear out the answers. > > > > Aaron Meurer > > > >> On Jun 21, 2014, at 6:11 PM, Mark Voorhies wrote: > >> > >>> On 06/21/2014 03:46 PM, Benjamin Root wrote: > >>> I am preparing for my tutorial for SciPy, and I want to avoid making a > >>> particular mistake I made last year, which was to have an exercise in the > >>> notebook for students to complete, but no "solution" available. I thought I > >>> would just type up the solution live, on-the-spot, but ended up making a > >>> complete fool of myself (it is all on YouTube, too...) > >>> > >>> So, I was thinking of some sort of way to toggle an input cell that can > >>> reveal itself when I want to. I have seen some previous discussions on this > >>> topic, but I am not quite sure if they are what I am looking for. Note, I > >>> am completely clueless on how to add additional features, plugins, etc to > >>> a notebook, and really am very bad at javascript. Of couse, I am open to > >>> other suggestions that others have done for their tutorials, > >> > >> Low tech solution: > >> Stage the "hidden" cell content elsewhere (e.g., an emacs buffer) and > >> paste it in when you need it =) > >> > >> --Mark > >> > >> P.S. My experience is that if solutions to exercises are available (as > >> part of a distributed notebook, in slides, on the course website) at > >> least a few students will jump ahead rather than trying the exercise. > >> Not necessarily the end of the world, but it gets in the way of seeing > >> alternate solutions/etc... > >> > >> > >> so long as > >>> they are documented well, and is easy to distribute to students taking an > >>> introductory course. > >>> > >>> Cheers! > >>> Ben Root > >>> > >>> > >>> > >>> _______________________________________________ > >>> IPython-dev mailing list > >>> IPython-dev at scipy.org > >>> http://mail.scipy.org/mailman/listinfo/ipython-dev > >> > >> > >> _______________________________________________ > >> IPython-dev mailing list > >> IPython-dev at scipy.org > >> http://mail.scipy.org/mailman/listinfo/ipython-dev > > _______________________________________________ > > IPython-dev mailing list > > IPython-dev at scipy.org > > http://mail.scipy.org/mailman/listinfo/ipython-dev > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev From ben.root at ou.edu Sun Jun 22 12:43:21 2014 From: ben.root at ou.edu (Benjamin Root) Date: Sun, 22 Jun 2014 12:43:21 -0400 Subject: [IPython-dev] How to escape vertical line when doing a table? Message-ID: I just ran into a problem with my Markdown table of matplotlib markers. One particular marker is denoted with a vertical bar symbol, which the markdown interpretor in ipython keeps interpreting it as a column delimiter despite me using a blackslash. Is there another way to escape this character? Thanks, Ben Root -------------- next part -------------- An HTML attachment was scrubbed... URL: From bussonniermatthias at gmail.com Sun Jun 22 13:05:41 2014 From: bussonniermatthias at gmail.com (Matthias Bussonnier) Date: Sun, 22 Jun 2014 19:05:41 +0200 Subject: [IPython-dev] =?windows-1252?q?_use_=26=23124=3B_=97=A0How_to_esc?= =?windows-1252?q?ape_vertical_line_when_doing_a_table=3F?= In-Reply-To: References: Message-ID: <91D40B76-89C8-4512-9786-12A8783BB80B@gmail.com> Le 22 juin 2014 ? 18:43, Benjamin Root a ?crit : > I just ran into a problem with my Markdown table of matplotlib markers. One particular marker is denoted with a vertical bar symbol, which the markdown interpretor in ipython keeps interpreting it as a column delimiter despite me using a blackslash. Is there another way to escape this character? > | html is your friend, until it is not anymore. -- M > Thanks, > Ben Root > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev From ben.root at ou.edu Sun Jun 22 13:20:22 2014 From: ben.root at ou.edu (Benjamin Root) Date: Sun, 22 Jun 2014 13:20:22 -0400 Subject: [IPython-dev] =?utf-8?b?dXNlICYjMTI0OyDigJQgSG93IHRvIGVzY2FwZSB2?= =?utf-8?q?ertical_line_when_doing_a_table=3F?= In-Reply-To: <91D40B76-89C8-4512-9786-12A8783BB80B@gmail.com> References: <91D40B76-89C8-4512-9786-12A8783BB80B@gmail.com> Message-ID: On Sun, Jun 22, 2014 at 1:05 PM, Matthias Bussonnier < bussonniermatthias at gmail.com> wrote: > | That worked great! Thanks! Ben Root -------------- next part -------------- An HTML attachment was scrubbed... URL: From gaitan at gmail.com Sun Jun 22 20:18:36 2014 From: gaitan at gmail.com (=?UTF-8?B?TWFydMOtbiBHYWl0w6Fu?=) Date: Sun, 22 Jun 2014 21:18:36 -0300 Subject: [IPython-dev] extension to support reStructuredText. how to start? Message-ID: Hi everybody. Last year I proposed a pull request [1] that added support to restructuredText in the notebook. This was dismissed, but with a very interesting debate of core commiters [2] The idea behind my PR isn't very elegant, but solves the main obstacle: as rst is a document wide markup (i.e. it needs to parse the whole document to add semantic to each syntax element), we can't render rst cells individually. The other point addressed was that there isn't a restructuredtext parser in javascript, so we need to render in the backend. the trick was concatenate every cell as a document adding a mark (a comment), process it in the backend via doctutils (I did in the server instead the kernel, wrongly), split the output by those marks, and then update each cell with its corresponding chunk. As I'm a heavy rst advocate [3] I would like to implement this as an extension. I was looking for some example of a "render hook" based on raw data, but I couldn't find one. I've found instead the minrk's "gist" extension [4] which use a "comm" between the notebook and the kernel, but I couldn't move forward much. So, where should I start? thanks [1] https://github.com/ipython/ipython/pull/4301 [2] https://www.youtube.com/watch?v=TB7JRe68k84#t=3028 [3] https://mgaitan.github.io/en/posts/the-reStructuredText-processor.html [4] https://raw.github.com/minrk/ipython_extensions/master/gist.py -- mgaitan.github.io textosypretextos.com.ar -------------- next part -------------- An HTML attachment was scrubbed... URL: From konrad.hinsen at fastmail.net Mon Jun 23 10:08:53 2014 From: konrad.hinsen at fastmail.net (Konrad Hinsen) Date: Mon, 23 Jun 2014 16:08:53 +0200 Subject: [IPython-dev] Event rename_notebook.Notebook Message-ID: <21416.13557.372030.462776@Konrad-Hinsens-MacBook-Pro-2.local> Hi everyone, I am trying to catch notebook rename events, using the event rename_notebook.Notebook. However, my explorations show that when this event is triggered, the notebook still has its previous name. What I did is add $([IPython.events]).on('rename_notebook.Notebook', function() { console.log("notebook renamed to " + IPython.notebook.notebook_name); }); to custom.js. This shows, very reliably, the notebook name before the change. Am I using this in the wrong way? Konrad. From andy at payne.org Mon Jun 23 10:15:08 2014 From: andy at payne.org (Andrew Payne) Date: Mon, 23 Jun 2014 10:15:08 -0400 Subject: [IPython-dev] Event rename_notebook.Notebook In-Reply-To: <21416.13557.372030.462776@Konrad-Hinsens-MacBook-Pro-2.local> References: <21416.13557.372030.462776@Konrad-Hinsens-MacBook-Pro-2.local> Message-ID: > > I am trying to catch notebook rename events, using the event > rename_notebook.Notebook. However, my explorations show that when this > event is triggered, the notebook still has its previous name. Does the notebook_renamed.Notebook event give you what you want? It looks like it's triggered after the rename. Here's the relevant fragment from notebook.js (dev head): Notebook.prototype.rename_success = function (json, status, xhr) { var name = this.notebook_name = json.name; var path = json.path; this.session.rename_notebook(name, path); $([IPython.events]).trigger('notebook_renamed.Notebook', json); }; -andy -------------- next part -------------- An HTML attachment was scrubbed... URL: From konrad.hinsen at fastmail.net Mon Jun 23 10:23:31 2014 From: konrad.hinsen at fastmail.net (Konrad Hinsen) Date: Mon, 23 Jun 2014 16:23:31 +0200 Subject: [IPython-dev] Event rename_notebook.Notebook In-Reply-To: References: <21416.13557.372030.462776@Konrad-Hinsens-MacBook-Pro-2.local> Message-ID: <21416.14435.904551.444533@Konrad-Hinsens-MacBook-Pro-2.local> Andrew Payne writes: > I am trying to catch notebook rename events, using the event > rename_notebook.Notebook. However, my explorations show that when this > event is triggered, the notebook still has its previous name. > > Does the notebook_renamed.Notebook event give you what you want? ? It looks like it's > triggered after the rename. Here's the relevant fragment from notebook.js (dev head): That one works, thanks! BTW, is there a list of events somewhere, ideally with some documentation? Konrad. From bussonniermatthias at gmail.com Mon Jun 23 10:43:28 2014 From: bussonniermatthias at gmail.com (Matthias Bussonnier) Date: Mon, 23 Jun 2014 16:43:28 +0200 Subject: [IPython-dev] Event rename_notebook.Notebook In-Reply-To: <21416.14435.904551.444533@Konrad-Hinsens-MacBook-Pro-2.local> References: <21416.13557.372030.462776@Konrad-Hinsens-MacBook-Pro-2.local> <21416.14435.904551.444533@Konrad-Hinsens-MacBook-Pro-2.local> Message-ID: <42950076-ECF3-470E-92CA-A3CDA13EBD12@gmail.com> Le 23 juin 2014 ? 16:23, Konrad Hinsen a ?crit : > Andrew Payne writes: > >> I am trying to catch notebook rename events, using the event >> rename_notebook.Notebook. However, my explorations show that when this >> event is triggered, the notebook still has its previous name. >> >> Does the notebook_renamed.Notebook event give you what you want? It looks like it's >> triggered after the rename. Here's the relevant fragment from notebook.js (dev head): > > That one works, thanks! > > BTW, is there a list of events somewhere, ideally with some documentation? No, sorry. We should already find how to document JS. And yes, there seem to be inconsistencies. -- M $ grep -r IPython.events **/*.js | cut -f2 -d\$ | grep trigger | cut -f3 -d\( | cut -f1 -d\) | sort | uniq "autosave_disabled.Notebook" "autosave_enabled.Notebook", interval "set_dirty.Notebook", {value: true} "trust_changed.Notebook", trusted 'app_initialized.NotebookApp' 'checkpoint_created.Notebook', data 'checkpoint_delete_failed.Notebook' 'checkpoint_deleted.Notebook', data 'checkpoint_failed.Notebook' 'checkpoint_restore_failed.Notebook' 'checkpoint_restored.Notebook' 'checkpoints_listed.Notebook', [data] 'command_mode.Cell', {cell: that} 'command_mode.Notebook' 'create.Cell', {'cell': cell, 'index': index} 'delete.Cell', {'cell': cell, 'index': i} 'edit_mode.Cell', {cell: that} 'edit_mode.Notebook' 'event.Namespace' 'execution_request.Kernel', {kernel: this, content:content} 'input_reply.Kernel', {kernel: this, content:content} 'list_checkpoints_failed.Notebook' 'notebook_load_failed.Notebook', [xhr, status, error] 'notebook_loaded.Notebook' 'notebook_loading.Notebook' 'notebook_rename_failed.Notebook', [xhr, status, error] 'notebook_renamed.Notebook', json 'notebook_restoring.Notebook', checkpoint 'notebook_save_failed.Notebook', [xhr, status, error] 'notebook_saved.Notebook' 'notebook_saving.Notebook' 'open_with_text.Pager', payload 'output_appended.OutputArea', [type, json[type], md, toinsert] 'output_appended.OutputArea', [type, value, md, toinsert] 'preset_activated.CellToolbar', {name: preset_name} 'preset_added.CellToolbar', {name: name} 'rebuild.QuickHelp' 'rename_notebook.Notebook', data 'select.Cell', {'cell':that} 'selected_cell_type_changed.Notebook', 'send_input_reply.Kernel', value 'sessions_loaded.Dashboard', this.sessions 'set_dirty.Notebook', {value: true} 'set_dirty.Notebook', {value: value} 'set_next_input.Notebook', data 'shell_reply.Kernel', {kernel: this, reply:reply} 'status_autorestarting.Kernel', {kernel: this} 'status_busy.Kernel' 'status_busy.Kernel', {kernel: this} 'status_dead.Kernel', {kernel: this} 'status_idle.Kernel' 'status_idle.Kernel', {kernel: this} 'status_interrupting.Kernel', {kernel: this} 'status_restarting.Kernel' 'status_restarting.Kernel', {kernel: this} 'status_started.Kernel', {kernel: this} 'websocket_closed.Kernel', > > Konrad. > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev From ellisonbg at gmail.com Mon Jun 23 16:23:28 2014 From: ellisonbg at gmail.com (Brian Granger) Date: Mon, 23 Jun 2014 13:23:28 -0700 Subject: [IPython-dev] Loading nbextension on widget instantiation In-Reply-To: References: Message-ID: I think we need to talk about the security aspects of this. Adding to our dev meeting agenda for the week. On Thu, Jun 19, 2014 at 11:40 AM, Thomas Kluyver wrote: > On 19 June 2014 11:08, Nicholas Bollweg wrote: >> >> Sorry: I should have provided a link! _view_static, _view_module and >> _view_style, in the mixin. >> >>>> Would there be a benefit to these being traitlets? I haven't spent much >>>> time with them (aside for front-end oriented widget stuff). >>> >>> Sorry, to what being traitlets? >> >> >> None of these will be used client-side, as opposed to _view_name, which is >> (in create_view), but is there still some reason for them to be traitlets? > > > Well, something like _view_module will be used client side once I get to the > refactoring I've proposed. Other than that, you could use traitlets - it > gets you some type checking - but I don't see any huge advantage of doing > so. > > Thomas > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > -- Brian E. Granger Cal Poly State University, San Luis Obispo @ellisonbg on Twitter and GitHub bgranger at calpoly.edu and ellisonbg at gmail.com From ellisonbg at gmail.com Mon Jun 23 16:35:21 2014 From: ellisonbg at gmail.com (Brian Granger) Date: Mon, 23 Jun 2014 13:35:21 -0700 Subject: [IPython-dev] extension to support reStructuredText. how to start? In-Reply-To: References: Message-ID: In the past we have said that we don't have plans on supporting rst cells. Given recent developments (especially integration with Google Drive) I think we are even further away from ever supporting rst cells. Given this, you will have to implement this yourself outside of the project. I see two ways you could do this: A. Modifying the notebook format and UI to build full blown rst cells. In general, we try to make IPython and the notebook as extensible as possible. There are two exceptions to this: 1. The kernel message spec. 2. The notebook format For these two cases our policy is to make it as difficult as possible to extend and/or modify. The reason we are doing this is that the second either of these two things change, the resulting entity is no longer "IPython". The consistency of the message spec and notebook format are the building blocks that allow the entire architecture to work together. If you want to change the notebook format to support Rst cells, then you should fork IPython and call the resulting project something entirely different to emphasize that your resulting "notebooks" are *not* compatible with IPython. Furthermore, we probably won't do anything to make this easier for you in terms of changing our architecture or APIs. B. Using raw cells with a custom UI and renderer that handles the rst logic. In this case you aren't changing the notebook format and a full blown fork is not needed. You can still call the notebooks "IPython Notebooks" and all of our tools will work with them. We *might* even be willing to add extension points to the existing UI that can be used to add the rendering logic in custom.js. I highly recommend B. at this point. On Sun, Jun 22, 2014 at 5:18 PM, Mart?n Gait?n wrote: > Hi everybody. > > Last year I proposed a pull request [1] that added support to > restructuredText in the notebook. This was dismissed, but with a very > interesting debate of core commiters [2] > > The idea behind my PR isn't very elegant, but solves the main obstacle: as > rst is a document wide markup (i.e. it needs to parse the whole document to > add semantic to each syntax element), we can't render rst cells > individually. The other point addressed was that there isn't a > restructuredtext parser in javascript, so we need to render in the backend. > > the trick was concatenate every cell as a document adding a mark (a > comment), process it in the backend via doctutils (I did in the server > instead the kernel, wrongly), split the output by those marks, and then > update each cell with its corresponding chunk. > > As I'm a heavy rst advocate [3] I would like to implement this as an > extension. I was looking for some example of a "render hook" based on raw > data, but I couldn't find one. > I've found instead the minrk's "gist" extension [4] which use a "comm" > between the notebook and the kernel, but I couldn't move forward much. > > So, where should I start? > thanks > > > [1] https://github.com/ipython/ipython/pull/4301 > [2] https://www.youtube.com/watch?v=TB7JRe68k84#t=3028 > [3] https://mgaitan.github.io/en/posts/the-reStructuredText-processor.html > [4] https://raw.github.com/minrk/ipython_extensions/master/gist.py > > -- > mgaitan.github.io > textosypretextos.com.ar > > _______________________________________________ > 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 @ellisonbg on Twitter and GitHub bgranger at calpoly.edu and ellisonbg at gmail.com From takowl at gmail.com Mon Jun 23 17:05:50 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Mon, 23 Jun 2014 14:05:50 -0700 Subject: [IPython-dev] Loading nbextension on widget instantiation In-Reply-To: References: Message-ID: On 23 June 2014 13:23, Brian Granger wrote: > I think we need to talk about the security aspects of this. Adding to > our dev meeting agenda for the week. > In discussions with people, we've said that widgets should simply be treated as unsafe output, the same way as any other HTML/JS output. So if you load an untrusted notebook, you won't see widgets until you run it. Do you think there are more subtleties? Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From gaitan at gmail.com Mon Jun 23 17:19:11 2014 From: gaitan at gmail.com (=?UTF-8?B?TWFydMOtbiBHYWl0w6Fu?=) Date: Mon, 23 Jun 2014 18:19:11 -0300 Subject: [IPython-dev] extension to support reStructuredText. how to start? In-Reply-To: References: Message-ID: On Mon, Jun 23, 2014 at 5:35 PM, Brian Granger wrote: > In the past we have said that we don't have plans on supporting rst > cells. Given recent developments (especially integration with Google > Drive) I think we are even further away from ever supporting rst > cells. > This was pretty clear in the PR thread and in the hangout meeting I linked, and the option B is what I want to do and asking about. I've did a couple of ipython extensions (magics) but anything yet involving comm/widgets. The doc at this point doesn't seem to be very complete and I really don't know how to start. For example, which would be the "event" triggered when I a raw cell is "executed" ? how can I bind that event to send the whole notebook data to a python function? how this function return the html to the notebook? How can I replace each raw cell with a "rendered" version? thanks in advance -- mgaitan.github.io textosypretextos.com.ar -------------- next part -------------- An HTML attachment was scrubbed... URL: From ellisonbg at gmail.com Mon Jun 23 17:26:40 2014 From: ellisonbg at gmail.com (Brian Granger) Date: Mon, 23 Jun 2014 14:26:40 -0700 Subject: [IPython-dev] Loading nbextension on widget instantiation In-Reply-To: References: Message-ID: Yes, I think there is more. For *today* I think it is fine treating widgets like any other unsafe output. In the future, I don't think that is entirely possible. The reason is that regular output doesn't need to touch page globals, such as the widget manager, but widget code does. In the future, we will likely have more locked down security settings in some contexts: * Google Drive * Variations of multiuser notebooks - our own, Wakari, etc. In these contexts, all output will need to be in iframes. Putting widgets in iframes will be difficult, but likely necessary as well. But, because widgets have to talk to the page global widget manager, we will have to do some serious iframe messaging craziness for widgets to talk to the global page. The core security problem related to the current discussion is that the widget definitions have to be loaded into the iframes *and* likely the global page. This is needed because all of the calls to register_widget happen on the global page. This puts us into a really difficult situation: * Widget JavaScript code could be hostile * Widget JavaScript code needs to be loaded onto the global page These two requirements conflict and we don't (as far as I know) have a way of getting around it. Until we have a security model that solves these issues and can be deployed in high security contexts, I think we have to be very careful about adding new ways of loaded widget related code onto the page. The proposed changes fall into this category as they allow arbitrary python code to give a string that contains the location of a JavaScript file that require will automatically load and run in the global scope. That can't be protected by iframes as we currently understand everything. On Mon, Jun 23, 2014 at 2:05 PM, Thomas Kluyver wrote: > On 23 June 2014 13:23, Brian Granger wrote: >> >> I think we need to talk about the security aspects of this. Adding to >> our dev meeting agenda for the week. > > > In discussions with people, we've said that widgets should simply be treated > as unsafe output, the same way as any other HTML/JS output. So if you load > an untrusted notebook, you won't see widgets until you run it. Do you think > there are more subtleties? > > Thomas > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > -- Brian E. Granger Cal Poly State University, San Luis Obispo @ellisonbg on Twitter and GitHub bgranger at calpoly.edu and ellisonbg at gmail.com From ellisonbg at gmail.com Mon Jun 23 17:36:00 2014 From: ellisonbg at gmail.com (Brian Granger) Date: Mon, 23 Jun 2014 14:36:00 -0700 Subject: [IPython-dev] extension to support reStructuredText. how to start? In-Reply-To: References: Message-ID: OK great. This work will require hacking on and using IPython JavaScript APIs that are unstable and uncodumented (in any useful way). Some pointers: * You can put files into .ipython/profile_default/static that match the name and location of those in IPython's static dir and the web app will use them instead. This will allow you to create a custom version of our internal files. * I would start by trying to create a custom version of textcell.js that adds Markdown cell like logic to the raw cells to see what is needed. The Markdown cell is a good starting place as it already knows how to manage the raw and rendered versions. * The way I would handle the rendering of the rst is to have a global "Render Rst" button in the toolbar that will render all of the cells. This button will grab all of the contents of the raw rst cells, call out to the Rst Rendering REST web service and call the proper methods on the raw cells to put the rendered version into place. * I would write and run the rst RESt service as a separate web server that sets CORS headers to allow the main notebook server to connect to it. * You will have to grab global references to the notebook instance. With changes about to be merged into master, you will have to use require.js to get this reference - it might be a bit tricky though...but we can help... Cheers, Brian On Mon, Jun 23, 2014 at 2:19 PM, Mart?n Gait?n wrote: > On Mon, Jun 23, 2014 at 5:35 PM, Brian Granger wrote: >> >> In the past we have said that we don't have plans on supporting rst >> cells. Given recent developments (especially integration with Google >> Drive) I think we are even further away from ever supporting rst >> cells. > > > This was pretty clear in the PR thread and in the hangout meeting I linked, > and the option B is what I want to do and asking about. > > I've did a couple of ipython extensions (magics) but anything yet involving > comm/widgets. The doc at this point doesn't seem to be very complete and I > really don't know how to start. > > For example, which would be the "event" triggered when I a raw cell is > "executed" ? how can I bind that event to send the whole notebook data to a > python function? how this function return the html to the notebook? How can > I replace each raw cell with a "rendered" version? > > thanks in advance > > -- > mgaitan.github.io > textosypretextos.com.ar > > _______________________________________________ > 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 @ellisonbg on Twitter and GitHub bgranger at calpoly.edu and ellisonbg at gmail.com From martin.fitzpatrick at gmail.com Tue Jun 24 08:10:05 2014 From: martin.fitzpatrick at gmail.com (Martin Fitzpatrick) Date: Tue, 24 Jun 2014 13:10:05 +0100 Subject: [IPython-dev] Pathomx: Workflow-based data analysis built on IPython notebooks Message-ID: Hello all Following up on QtIPy here is another software-release that I think may be of interest to the list: Pathomx v3.0.0a - a workflow-based data analysis application that is (as of now) built on IPython notebooks. A short bit of history: Pathomx has been under development for a year or so as a desktop-based data analysis platform using drag-and-drop analysis workflow construction. It was developed alongside my PhD to provide a way both to alternate analysis approaches quickly and have reproducible analysis. A few months ago I discovered IPython (+notebooks) and saw the great potential there for reproducibility, but still missed the automation and prototyping available from Pathomx. So I did the obvious thing and combined them. Here is a short demo video of it in action - http://www.youtube.com/watch/L5HxshxH67o With Pathomx you can now - * Build workflows using IPython-notebook based tools * Auto-display in the GUI of Matplotlib figures and pandas dataframes from workbooks * Auto-export of (selected) variables from workbooks to pass to other tools * Export figures, set standardised plot colors, etc. from within the GUI * Save and reload workflows to share analysis * Export completed workflows to compound IPython notebooks to run independently There are two expected use-cases - a) non-programmers to construct analysis workflows from standardised components provided b) rapid prototyping of different analysis approaches for export as completed standalone noteboks. I think this latter one is particularly neat. There are a few issues to address before a full release including hopefully switching to a Qt-aware kernel (it's built on PyQt5 which as I understand it isn't currently supported - but I'll work on that). Source available here: https://github.com/pathomx/pathomx Requires PyQt5 and then pip install numpy pandas scipy matplotlib biocyc pyqtconfig mplstyler yapsy runipy Feedback, comments and suggestions are most welcome Martin -------------- next part -------------- An HTML attachment was scrubbed... URL: From takowl at gmail.com Tue Jun 24 14:47:14 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Tue, 24 Jun 2014 11:47:14 -0700 Subject: [IPython-dev] IPython Office Hours - 1700 UTC, Tuesday 1st July Message-ID: Hi all, We'll be having another 'IPython Office Hours' a week from today. This is an open forum to talk about anything related to IPython development. If you're interested in developing extensions, kernels, or other integrations for IPython, or getting involved with core IPython development, come and talk to us. Tuesday 1st July, 1700 UTC (10am California, 6pm UK) https://plus.google.com/events/co5d1jthu354ejptormjeqtmjo0 We run a live video chat on Google Hangouts - if you want to join this, please send me your e-mail address. We'll also be logged into our development chat room (http://www.hipchat.com/ghtNzvmfC ), so if you don't have enough bandwidth for the video chat, or we go over the limit for hangout participants, you can join the conversation there. Thanks, Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From moorepants at gmail.com Tue Jun 24 22:49:44 2014 From: moorepants at gmail.com (Jason Moore) Date: Tue, 24 Jun 2014 22:49:44 -0400 Subject: [IPython-dev] Togglable input cells? In-Reply-To: <4BF6FA8E-41C9-40D0-A8BB-C84AB3A6360B@gmail.com> References: <53A610FA.4030300@ucsf.edu> <-3189186171122173835@unknownmsgid> <4BF6FA8E-41C9-40D0-A8BB-C84AB3A6360B@gmail.com> Message-ID: We've used the %load solution for two tutorials now and it works pretty well. See here for examples: https://github.com/pydy/pydy-tutorial-pycon-2014, solutions are in the exercise_solutions directory. The main issue is that you can't "run all" to check whether the complete notebook runs because only the %load cell runs, not the output, so testing the complete notebooks requires lots of manual ctrl-entering. Jason moorepants.info +01 530-601-9791 On Sun, Jun 22, 2014 at 11:57 AM, Matthias Bussonnier < bussonniermatthias at gmail.com> wrote: > > Le 22 juin 2014 ? 17:39, Benjamin Root a ?crit : > > > Hmm, I rather like this idea. It lets me keep the solutions packaged > with the tutorials (which helps students who aren't taking the class), but > keeps them "out-of-sight, out-of-mind". For the %load, can I do relative > paths? > > WRT current kernel working directory, I think so. > You can even use URL. > -- > M > > > > > Cheers! > > Ben Root > > > > > > On Sun, Jun 22, 2014 at 9:31 AM, Matthias Bussonnier < > bussonniermatthias at gmail.com> wrote: > > What about just having solution in a separate folder and just %load them > ? > > > > You can then just "publish" the folder at the end of tutorial, or even > at beginning. > > > > -- > > M > > > > > > Le 22 juin 2014 ? 01:29, Aaron Meurer a ?crit : > > > > > My advice is to stay low tech. I tried a fancy thing > > > (ipython_doctester) at my scipy tutorial last year, and it was more > > > trouble than it was worth. > > > > > > In this case, just make a separate notebook with solutions. The way I > > > do it is I make the solutions notebook and then when I am done I copy > > > it and clear out the answers. > > > > > > Aaron Meurer > > > > > >> On Jun 21, 2014, at 6:11 PM, Mark Voorhies > wrote: > > >> > > >>> On 06/21/2014 03:46 PM, Benjamin Root wrote: > > >>> I am preparing for my tutorial for SciPy, and I want to avoid making > a > > >>> particular mistake I made last year, which was to have an exercise > in the > > >>> notebook for students to complete, but no "solution" available. I > thought I > > >>> would just type up the solution live, on-the-spot, but ended up > making a > > >>> complete fool of myself (it is all on YouTube, too...) > > >>> > > >>> So, I was thinking of some sort of way to toggle an input cell that > can > > >>> reveal itself when I want to. I have seen some previous discussions > on this > > >>> topic, but I am not quite sure if they are what I am looking for. > Note, I > > >>> am completely clueless on how to add additional features, plugins, > etc to > > >>> a notebook, and really am very bad at javascript. Of couse, I am > open to > > >>> other suggestions that others have done for their tutorials, > > >> > > >> Low tech solution: > > >> Stage the "hidden" cell content elsewhere (e.g., an emacs buffer) and > > >> paste it in when you need it =) > > >> > > >> --Mark > > >> > > >> P.S. My experience is that if solutions to exercises are available (as > > >> part of a distributed notebook, in slides, on the course website) at > > >> least a few students will jump ahead rather than trying the exercise. > > >> Not necessarily the end of the world, but it gets in the way of seeing > > >> alternate solutions/etc... > > >> > > >> > > >> so long as > > >>> they are documented well, and is easy to distribute to students > taking an > > >>> introductory course. > > >>> > > >>> Cheers! > > >>> Ben Root > > >>> > > >>> > > >>> > > >>> _______________________________________________ > > >>> IPython-dev mailing list > > >>> IPython-dev at scipy.org > > >>> http://mail.scipy.org/mailman/listinfo/ipython-dev > > >> > > >> > > >> _______________________________________________ > > >> IPython-dev mailing list > > >> IPython-dev at scipy.org > > >> http://mail.scipy.org/mailman/listinfo/ipython-dev > > > _______________________________________________ > > > IPython-dev mailing list > > > IPython-dev at scipy.org > > > http://mail.scipy.org/mailman/listinfo/ipython-dev > > > > _______________________________________________ > > IPython-dev mailing list > > IPython-dev at scipy.org > > http://mail.scipy.org/mailman/listinfo/ipython-dev > > > > _______________________________________________ > > 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 jsseabold at gmail.com Wed Jun 25 14:03:49 2014 From: jsseabold at gmail.com (Skipper Seabold) Date: Wed, 25 Jun 2014 14:03:49 -0400 Subject: [IPython-dev] static widgets in master? Message-ID: Is there a github issue or PR for adding static notebook widgets or any code that's already in master? I'm interested in trying this out a bit, even if experimental I'm specifically referring to Jake's ipywidgets [1]. There's some talk on a few issues saying that this is going to be high up on the todo list for IPython 3.0, but I haven't found much else by searching. Thanks, Skipper [1] https://github.com/jakevdp/ipywidgets From p.f.moore at gmail.com Wed Jun 25 14:26:43 2014 From: p.f.moore at gmail.com (Paul Moore) Date: Wed, 25 Jun 2014 19:26:43 +0100 Subject: [IPython-dev] Is it possible to have a non-executable code cell? Message-ID: Hi. I have a notebook I'm writing that gets data from an external source using lupa (Lua-Python interface). However, the place I'll be hosting my notebook doesn't have lupa installed. So what I want to do is to have a code cell that contains the code I use offline to generate the data, for documentation purposes. I would like that cell to be highlighted as with any other Python code, but *not* be executed. Then below that I can add a cell that gets the data from a static copy hosted on the web (with a note explaining what's going on, and why). The rest of the notebook can then manipulate the data as normal. The problem is that I don't know of a way to mark a code cell as "don't execute this". Is that possible? Thanks, Paul From zonca at sdsc.edu Wed Jun 25 14:32:34 2014 From: zonca at sdsc.edu (Andrea Zonca) Date: Wed, 25 Jun 2014 11:32:34 -0700 Subject: [IPython-dev] Is it possible to have a non-executable code cell? In-Reply-To: References: Message-ID: Hi, you can use a markdown cell for that purpose: ```python import numpy as np a = np.arange(3) ``` cheers, Andrea On Wed, Jun 25, 2014 at 11:26 AM, Paul Moore wrote: > Hi. I have a notebook I'm writing that gets data from an external > source using lupa (Lua-Python interface). However, the place I'll be > hosting my notebook doesn't have lupa installed. So what I want to do > is to have a code cell that contains the code I use offline to > generate the data, for documentation purposes. I would like that cell > to be highlighted as with any other Python code, but *not* be > executed. Then below that I can add a cell that gets the data from a > static copy hosted on the web (with a note explaining what's going on, > and why). The rest of the notebook can then manipulate the data as > normal. > > The problem is that I don't know of a way to mark a code cell as > "don't execute this". Is that possible? > > Thanks, > Paul > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev From benjaminrk at gmail.com Wed Jun 25 14:44:28 2014 From: benjaminrk at gmail.com (MinRK) Date: Wed, 25 Jun 2014 11:44:28 -0700 Subject: [IPython-dev] static widgets in master? In-Reply-To: References: Message-ID: Jon is working on it. Step one is here , but we have several other things up in the air at the moment. -MinRK ? On Wed, Jun 25, 2014 at 11:03 AM, Skipper Seabold wrote: > Is there a github issue or PR for adding static notebook widgets or > any code that's already in master? I'm interested in trying this out a > bit, even if experimental > > I'm specifically referring to Jake's ipywidgets [1]. There's some talk > on a few issues saying that this is going to be high up on the todo > list for IPython 3.0, but I haven't found much else by searching. > > Thanks, > > Skipper > > [1] https://github.com/jakevdp/ipywidgets > _______________________________________________ > 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 Wed Jun 25 20:49:59 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Wed, 25 Jun 2014 17:49:59 -0700 Subject: [IPython-dev] Polyconf Message-ID: We heard an announcement at SFPython yesterday for Polyconf, a conference specifically about multi-language technologies. It describes it as "advanced technologies for programmers interested in polyglot approach to software development." It's in Poland at the end of October. http://polyconf.com/ Do we want to send someone to talk about IPython? In principle, submissions have already closed, but there's still a prominent 'submit proposal' button leading to an active form, so there may be some leeway. Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From mwaskom at stanford.edu Wed Jun 25 22:37:54 2014 From: mwaskom at stanford.edu (Michael Waskom) Date: Wed, 25 Jun 2014 19:37:54 -0700 Subject: [IPython-dev] Is it possible to have a non-executable code cell? In-Reply-To: References: Message-ID: Using a raw text cell is even better as you can turn it back "on" more easily when you need it. -------------- next part -------------- An HTML attachment was scrubbed... URL: From benjaminrk at gmail.com Wed Jun 25 23:05:53 2014 From: benjaminrk at gmail.com (MinRK) Date: Wed, 25 Jun 2014 20:05:53 -0700 Subject: [IPython-dev] Polyconf In-Reply-To: References: Message-ID: I spoke about IPython?s multi-language support at that conference last year (when it was called RuPy). There were some interesting talks, especially those outside our usual scientific Python scene. Let?s add to to the dev meeting tomorrow. -MinRK ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From takowl at gmail.com Thu Jun 26 01:40:05 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Wed, 25 Jun 2014 22:40:05 -0700 Subject: [IPython-dev] Polyconf In-Reply-To: References: Message-ID: Ah, I hadn't twigged that it was rupy rebranded. On 25 Jun 2014 20:06, "MinRK" wrote: > I spoke about IPython?s > multi-language support at that conference last year (when it was called > RuPy). There were some interesting talks, especially those outside our > usual scientific Python scene. Let?s add to to the dev meeting tomorrow. > > -MinRK > ? > > _______________________________________________ > 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 p.f.moore at gmail.com Thu Jun 26 02:49:42 2014 From: p.f.moore at gmail.com (Paul Moore) Date: Thu, 26 Jun 2014 07:49:42 +0100 Subject: [IPython-dev] Is it possible to have a non-executable code cell? In-Reply-To: References: Message-ID: On 25 June 2014 19:32, Andrea Zonca wrote: > you can use a markdown cell for that purpose: Thanks, that sounds like a great solution (I didn't want to use a raw cell which was also suggested because I want the syntax highlighting for readability). Paul From mark.voorhies at ucsf.edu Fri Jun 27 16:58:35 2014 From: mark.voorhies at ucsf.edu (Mark Voorhies) Date: Fri, 27 Jun 2014 13:58:35 -0700 Subject: [IPython-dev] Lineage graph for visible names Message-ID: <53ADDAFB.1080306@ucsf.edu> It just occurred to me that IPython's plumbing might make it easy to capture the lineage of the "user-generated" portion of the namespace (i.e., a (almost) bipartite directed graph where the nodes are the objects reported by the %who magic plus the visible functions responsible for generating them and the edges are object->function, indicating inputs, and function->object, indicating outputs). Has anyone written something like this? If I wanted to take a crack at it, what are the best entry points for capturing object creation? Thanks, Mark From takowl at gmail.com Fri Jun 27 17:05:27 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Fri, 27 Jun 2014 14:05:27 -0700 Subject: [IPython-dev] Lineage graph for visible names In-Reply-To: <53ADDAFB.1080306@ucsf.edu> References: <53ADDAFB.1080306@ucsf.edu> Message-ID: On 27 June 2014 13:58, Mark Voorhies wrote: > If I wanted to take a crack at it, what are the best entry points for > capturing object creation? I can see two potential ways to do it: 1. Scan the AST for assignments when we execute cells. You can add an ast.NodeVisitor instance to shell.ast_transfomers (docs here: http://ipython.org/ipython-doc/dev/config/inputtransforms.html#ast-transformations ). 2. Run with the user_ns as a dict subclass that records on __setitem__. I don't actually know whether the exec machinery will use that indirection, or add items to the dict at a lower level that bypasses that. Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From jsw at fnal.gov Fri Jun 27 18:01:53 2014 From: jsw at fnal.gov (Jon Wilson) Date: Fri, 27 Jun 2014 17:01:53 -0500 Subject: [IPython-dev] nbconvert on Scientific Linux 5 Message-ID: <53ADE9D1.1010303@fnal.gov> Hi, Because the scientific computing world moves quite slowly, many of the systems I use are still running Scientific Linux 5 (based on RHEL 5). This presents a problem for nbconvert, with its Haskell dependency. Most of these systems don't have any Haskell packages installed, and I don't have root in order to install them myself. On one system (not SL5), I was able to download the GHC binary and haskell-platform and install them in userland. But SL5 is still using GCC 2.5, so this approach fails. Is there any alternative to pandoc, or has anyone else encountered this problem and found a workaround? I don't think that I have the time to set up GHC 6.8 and bootstrap my way up to 7.6.3+ as suggested here: http://stackoverflow.com/questions/8426472/compiling-ghc-7-2-on-linux-with-libc-version-2-7 In the meantime, my workaround is to copy notebooks from the SL5 machine to the Fedora machine with working pandoc, nbconvert them there, and copy them back. It's quite painful compared to the more usual method. Suggestions? Regards, Jon From takowl at gmail.com Fri Jun 27 18:18:44 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Fri, 27 Jun 2014 15:18:44 -0700 Subject: [IPython-dev] nbconvert on Scientific Linux 5 In-Reply-To: <53ADE9D1.1010303@fnal.gov> References: <53ADE9D1.1010303@fnal.gov> Message-ID: On 27 June 2014 15:01, Jon Wilson wrote: > Is there any alternative to pandoc, or has anyone else encountered this > problem and found a workaround? > What conversion are you trying to do? If you're converting to HTML, then there's a nodejs alternative, and I have a PR open that does a pure Python conversion. If you're converting to Latex, then pandoc is the only option, as far as I know. Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From jsw at fnal.gov Fri Jun 27 18:26:13 2014 From: jsw at fnal.gov (Jon Wilson) Date: Fri, 27 Jun 2014 17:26:13 -0500 Subject: [IPython-dev] nbconvert on Scientific Linux 5 In-Reply-To: References: <53ADE9D1.1010303@fnal.gov> Message-ID: <53ADEF85.9070506@fnal.gov> Hi Thomas, Thanks for the swift reply. HTML would be fantastic. Anything else is icing on the cake. Can you point me to the node.js and pure python implementations? And do you anticipate any trouble using either of them with anaconda's IPython? Regards, Jon On 06/27/2014 05:18 PM, Thomas Kluyver wrote: > On 27 June 2014 15:01, Jon Wilson > > wrote: > > Is there any alternative to pandoc, or has anyone else encountered this > problem and found a workaround? > > > What conversion are you trying to do? If you're converting to HTML, then > there's a nodejs alternative, and I have a PR open that does a pure > Python conversion. If you're converting to Latex, then pandoc is the > only option, as far as I know. > > Thomas > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev > From takowl at gmail.com Fri Jun 27 18:39:29 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Fri, 27 Jun 2014 15:39:29 -0700 Subject: [IPython-dev] nbconvert on Scientific Linux 5 In-Reply-To: <53ADEF85.9070506@fnal.gov> References: <53ADE9D1.1010303@fnal.gov> <53ADEF85.9070506@fnal.gov> Message-ID: On 27 June 2014 15:26, Jon Wilson wrote: > HTML would be fantastic. Anything else is icing on the cake. Can you > point me to the node.js and pure python implementations? And do you > anticipate any trouble using either of them with anaconda's IPython? The node.js implementation should 'just work' if you can install nodejs (so that 'node' or 'nodejs' is on $PATH). The pure Python implementation is in a pull request here: https://github.com/ipython/ipython/pull/6028 I don't think there should be any trouble with Anaconda. Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From jsw at fnal.gov Fri Jun 27 18:44:05 2014 From: jsw at fnal.gov (Jon Wilson) Date: Fri, 27 Jun 2014 17:44:05 -0500 Subject: [IPython-dev] nbconvert on Scientific Linux 5 In-Reply-To: References: <53ADE9D1.1010303@fnal.gov> <53ADEF85.9070506@fnal.gov> Message-ID: <53ADF3B5.5060607@fnal.gov> Hi Thomas, I'm sure I'm doing something wrong. $ conda install node ... $ node -v 0.8.7 $ ipython nbconvert --to html mynotebook.ipynb ... raise PandocMissing() PandocMissing: Pandoc wasn't found. Please check that pandoc is installed: http://johnmacfarlane.net/pandoc/installing.html It doesn't seem to be using node.js. Also: $ ipython --version 2.0.0 What am I missing? Regards, Jon On 06/27/2014 05:39 PM, Thomas Kluyver wrote: > The node.js implementation should 'just work' if you can install nodejs > (so that 'node' or 'nodejs' is on $PATH). From takowl at gmail.com Fri Jun 27 18:55:09 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Fri, 27 Jun 2014 15:55:09 -0700 Subject: [IPython-dev] nbconvert on Scientific Linux 5 In-Reply-To: <53ADF3B5.5060607@fnal.gov> References: <53ADE9D1.1010303@fnal.gov> <53ADEF85.9070506@fnal.gov> <53ADF3B5.5060607@fnal.gov> Message-ID: On 27 June 2014 15:44, Jon Wilson wrote: > $ node -v > 0.8.7 > The source indicates that it needs node 0.9.12 or later. I'm not sure why conda has such an older version. Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From jsw at fnal.gov Fri Jun 27 19:00:33 2014 From: jsw at fnal.gov (Jon Wilson) Date: Fri, 27 Jun 2014 18:00:33 -0500 Subject: [IPython-dev] nbconvert on Scientific Linux 5 In-Reply-To: References: <53ADE9D1.1010303@fnal.gov> <53ADEF85.9070506@fnal.gov> <53ADF3B5.5060607@fnal.gov> Message-ID: <53ADF791.3020705@fnal.gov> Hi Thomas, Thanks for your help. I'm embarking on the task of bootstrapping GHC versions up to that needed for pandoc. So far, it is not as bad as I had feared, so that may be the best solution after all. Regards, Jon On 06/27/2014 05:55 PM, Thomas Kluyver wrote: > The source indicates that it needs node 0.9.12 or later. I'm not sure > why conda has such an older version. From asmeurer at gmail.com Fri Jun 27 19:46:20 2014 From: asmeurer at gmail.com (Aaron Meurer) Date: Fri, 27 Jun 2014 18:46:20 -0500 Subject: [IPython-dev] nbconvert on Scientific Linux 5 In-Reply-To: <53ADE9D1.1010303@fnal.gov> References: <53ADE9D1.1010303@fnal.gov> Message-ID: Good luck. I tried for a while to get pandoc compiled on CentOS 5 (which I guess is basically the same), and I never got it to work. I was able to make it work on Debian 6. The important thing is the version of libc that you have on the system. If you want to try it, you can get it with conda. Install Miniconda (http://conda.pydata.org/miniconda.html) if you don't already have it, and conda install -c asmeurer pandoc And try running pandoc. If you get errors about the glibc version, then it's too old. It would be great if nbconvert could completely remove its dependency on pandoc. It's one of the hardest things to get compiled for a "full ipython stack" (arguably harder than qt even, at least if you care about RHEL 5 flavors of Linux). Aaron Meurer On Fri, Jun 27, 2014 at 5:01 PM, Jon Wilson wrote: > Hi, > Because the scientific computing world moves quite slowly, many of the > systems I use are still running Scientific Linux 5 (based on RHEL 5). > This presents a problem for nbconvert, with its Haskell dependency. > > Most of these systems don't have any Haskell packages installed, and I > don't have root in order to install them myself. On one system (not > SL5), I was able to download the GHC binary and haskell-platform and > install them in userland. But SL5 is still using GCC 2.5, so this > approach fails. > > Is there any alternative to pandoc, or has anyone else encountered this > problem and found a workaround? I don't think that I have the time to > set up GHC 6.8 and bootstrap my way up to 7.6.3+ as suggested here: > > http://stackoverflow.com/questions/8426472/compiling-ghc-7-2-on-linux-with-libc-version-2-7 > > In the meantime, my workaround is to copy notebooks from the SL5 machine > to the Fedora machine with working pandoc, nbconvert them there, and > copy them back. It's quite painful compared to the more usual method. > > Suggestions? > Regards, > Jon > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev From jsw at fnal.gov Fri Jun 27 19:50:50 2014 From: jsw at fnal.gov (Jon Wilson) Date: Fri, 27 Jun 2014 18:50:50 -0500 Subject: [IPython-dev] nbconvert on Scientific Linux 5 In-Reply-To: References: <53ADE9D1.1010303@fnal.gov> Message-ID: <53AE035A.5080408@fnal.gov> Hi Aaron, Thanks for the tips and your support. I'll keep you posted on my progress. So far, I've installed GHC 6.8, and have successfully gotten "quickest" builds of 6.12, and 7.4. A "perf" build of 7.8 (latest version) is running now (but will take "hours"), and then I'll try to get Haskell-platform, and eventually pandoc. I agree regarding removing the pandoc dependency -- it's just too hard to get pandoc going. Regards, Jon On 06/27/2014 06:46 PM, Aaron Meurer wrote: From asmeurer at gmail.com Fri Jun 27 19:51:15 2014 From: asmeurer at gmail.com (Aaron Meurer) Date: Fri, 27 Jun 2014 18:51:15 -0500 Subject: [IPython-dev] nbconvert on Scientific Linux 5 In-Reply-To: References: <53ADE9D1.1010303@fnal.gov> Message-ID: Oh, I missed that you are already using Anaconda. In that case, you already have conda. By the way, here's the conda recipe I used for pandoc: https://github.com/conda/conda-recipes/tree/master/pandoc. It's kind of hacky (i.e., it installs things into the local cabal, because I didn't feel like building up a true conda package stack for Haskell packages just for the sake of pandoc). It depends on gmp 4, libffi, and zlib, all of which are also in that same repo. The notes.md unfortunately doesn't do justice to the pain I went through trying to get things to work. For instance, it matters if you have profiling enabled in the haskell-platform, and you have to do it from the start, because you can't build against dependencies unless they also have it enabled. At one point, I ended up manually recompiling about 100 recursive dependencies of pandoc. And I think in the end it didn't even work for some reason... Aaron Meurer On Fri, Jun 27, 2014 at 6:46 PM, Aaron Meurer wrote: > Good luck. I tried for a while to get pandoc compiled on CentOS 5 > (which I guess is basically the same), and I never got it to work. > > I was able to make it work on Debian 6. The important thing is the > version of libc that you have on the system. If you want to try it, > you can get it with conda. Install Miniconda > (http://conda.pydata.org/miniconda.html) if you don't already have it, > and > > conda install -c asmeurer pandoc > > And try running pandoc. If you get errors about the glibc version, > then it's too old. > > It would be great if nbconvert could completely remove its dependency > on pandoc. It's one of the hardest things to get compiled for a "full > ipython stack" (arguably harder than qt even, at least if you care > about RHEL 5 flavors of Linux). > > Aaron Meurer > > On Fri, Jun 27, 2014 at 5:01 PM, Jon Wilson wrote: >> Hi, >> Because the scientific computing world moves quite slowly, many of the >> systems I use are still running Scientific Linux 5 (based on RHEL 5). >> This presents a problem for nbconvert, with its Haskell dependency. >> >> Most of these systems don't have any Haskell packages installed, and I >> don't have root in order to install them myself. On one system (not >> SL5), I was able to download the GHC binary and haskell-platform and >> install them in userland. But SL5 is still using GCC 2.5, so this >> approach fails. >> >> Is there any alternative to pandoc, or has anyone else encountered this >> problem and found a workaround? I don't think that I have the time to >> set up GHC 6.8 and bootstrap my way up to 7.6.3+ as suggested here: >> >> http://stackoverflow.com/questions/8426472/compiling-ghc-7-2-on-linux-with-libc-version-2-7 >> >> In the meantime, my workaround is to copy notebooks from the SL5 machine >> to the Fedora machine with working pandoc, nbconvert them there, and >> copy them back. It's quite painful compared to the more usual method. >> >> Suggestions? >> Regards, >> Jon >> _______________________________________________ >> IPython-dev mailing list >> IPython-dev at scipy.org >> http://mail.scipy.org/mailman/listinfo/ipython-dev From asmeurer at gmail.com Fri Jun 27 19:53:30 2014 From: asmeurer at gmail.com (Aaron Meurer) Date: Fri, 27 Jun 2014 18:53:30 -0500 Subject: [IPython-dev] nbconvert on Scientific Linux 5 In-Reply-To: <53AE035A.5080408@fnal.gov> References: <53ADE9D1.1010303@fnal.gov> <53AE035A.5080408@fnal.gov> Message-ID: GHC is actually the easiest part. It compiles just fine. It's when you start compiling haskell-platform, and pandoc itself that you start running into pain. I don't want to knock Haskell. My personal opinion is that any system that uses source installs is doomed to be painful to users (apparently even if you are super rigorous and type safe). Aaron Meurer On Fri, Jun 27, 2014 at 6:50 PM, Jon Wilson wrote: > Hi Aaron, > Thanks for the tips and your support. I'll keep you posted on my > progress. So far, I've installed GHC 6.8, and have successfully gotten > "quickest" builds of 6.12, and 7.4. A "perf" build of 7.8 (latest > version) is running now (but will take "hours"), and then I'll try to > get Haskell-platform, and eventually pandoc. > > I agree regarding removing the pandoc dependency -- it's just too hard > to get pandoc going. > Regards, > Jon > > On 06/27/2014 06:46 PM, Aaron Meurer wrote: > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev From jsw at fnal.gov Sat Jun 28 13:58:14 2014 From: jsw at fnal.gov (Jon Wilson) Date: Sat, 28 Jun 2014 12:58:14 -0500 Subject: [IPython-dev] nbconvert on Scientific Linux 5 In-Reply-To: References: <53ADE9D1.1010303@fnal.gov> Message-ID: <53AF0236.4050004@fnal.gov> Hi Aaron, I seem to have succeeded. I installed the GHC 6.8 binary, which I used to compile ("quickest" build mode) GHC 6.12, which I used to compile GHC 7.4, which I used to compile GHC 7.6.3 ("perf" build mode). I then used GHC 7.6.3 to compile haskell-platform from source. I ran into minor difficulties here, because the system I'm on lacks GLUT. But following instructions from [1], I removed all the OpenGL stuff from the build. Then I had cabal, so I could run cabal install cabal and then cabal install pandoc. Now I just have to re-do `make install` for GHC 7.6.3 and for haskell-platform with a prefix that puts it inside my anaconda distribution. I initially ran into problems with haskell-platform, because I got ambitious and built the latest GHC, rather than GHC 7.6.3. This compiler failed to build the platform. But when I went back to the recommended version, all was well. I'm happy to share binaries or whatever with anybody else who is having difficulties getting pandoc going on an older system. Regards, Jon [1]: http://stackoverflow.com/a/18116508/2539647 On 06/27/2014 06:51 PM, Aaron Meurer wrote: > Oh, I missed that you are already using Anaconda. In that case, you > already have conda. > > By the way, here's the conda recipe I used for pandoc: > https://github.com/conda/conda-recipes/tree/master/pandoc. It's kind > of hacky (i.e., it installs things into the local cabal, because I > didn't feel like building up a true conda package stack for Haskell > packages just for the sake of pandoc). It depends on gmp 4, libffi, > and zlib, all of which are also in that same repo. > > The notes.md unfortunately doesn't do justice to the pain I went > through trying to get things to work. For instance, it matters if you > have profiling enabled in the haskell-platform, and you have to do it > from the start, because you can't build against dependencies unless > they also have it enabled. At one point, I ended up manually > recompiling about 100 recursive dependencies of pandoc. And I think in > the end it didn't even work for some reason... > > Aaron Meurer > From takowl at gmail.com Sat Jun 28 14:37:18 2014 From: takowl at gmail.com (Thomas Kluyver) Date: Sat, 28 Jun 2014 11:37:18 -0700 Subject: [IPython-dev] nbconvert on Scientific Linux 5 In-Reply-To: <53AF0236.4050004@fnal.gov> References: <53ADE9D1.1010303@fnal.gov> <53AF0236.4050004@fnal.gov> Message-ID: On 28 June 2014 10:58, Jon Wilson wrote: > I seem to have succeeded. I installed the GHC 6.8 binary, which I used > to compile ("quickest" build mode) GHC 6.12, which I used to compile GHC > 7.4, which I used to compile GHC 7.6.3 ("perf" build mode). I then used > GHC 7.6.3 to compile haskell-platform from source. I ran into minor > difficulties here, because the system I'm on lacks GLUT. But following > instructions from [1], I removed all the OpenGL stuff from the build. > Then I had cabal, so I could run cabal install cabal and then cabal > install pandoc. > Kudos for your patience with all this! Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From jsw at fnal.gov Sat Jun 28 14:50:27 2014 From: jsw at fnal.gov (Jon Wilson) Date: Sat, 28 Jun 2014 13:50:27 -0500 Subject: [IPython-dev] nbconvert on Scientific Linux 5 In-Reply-To: References: <53ADE9D1.1010303@fnal.gov> <53AF0236.4050004@fnal.gov> Message-ID: <53AF0E73.2010701@fnal.gov> I spoke too soon: cabal install pandoc was still running, and it failed trying to build "cipher-aes" [aside: why does pandoc need AES crypto??] Now I seem to have broken my haskell-platform in trying to fix it whatever problem was occurring. I feel like I'm back in RPM hell from the 90s. Regards, Jon On 06/28/2014 01:37 PM, Thomas Kluyver wrote: > Kudos for your patience with all this! From asmeurer at gmail.com Sat Jun 28 20:48:59 2014 From: asmeurer at gmail.com (Aaron Meurer) Date: Sat, 28 Jun 2014 19:48:59 -0500 Subject: [IPython-dev] nbconvert on Scientific Linux 5 In-Reply-To: <53AF0E73.2010701@fnal.gov> References: <53ADE9D1.1010303@fnal.gov> <53AF0236.4050004@fnal.gov> <53AF0E73.2010701@fnal.gov> Message-ID: What was the error message? As I mentioned, Pandoc has a ton of recursive dependencies. cipher-aes is probably a dependency of a dependency. Aaron Meurer On Sat, Jun 28, 2014 at 1:50 PM, Jon Wilson wrote: > I spoke too soon: cabal install pandoc was still running, and it failed > trying to build "cipher-aes" [aside: why does pandoc need AES > crypto??] Now I seem to have broken my haskell-platform in trying to > fix it whatever problem was occurring. I feel like I'm back in RPM hell > from the 90s. > Regards, > Jon > > On 06/28/2014 01:37 PM, Thomas Kluyver wrote: >> Kudos for your patience with all this! > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev From jsw at fnal.gov Sun Jun 29 01:04:06 2014 From: jsw at fnal.gov (Jon Wilson) Date: Sun, 29 Jun 2014 00:04:06 -0500 Subject: [IPython-dev] nbconvert on Scientific Linux 5 In-Reply-To: References: <53ADE9D1.1010303@fnal.gov> <53AF0236.4050004@fnal.gov> <53AF0E73.2010701@fnal.gov> Message-ID: <53AF9E46.6060409@fnal.gov> Hi Aaron, I solved that problem. The issue was that cipher-aes uses the AESNI instruction set, but the CPUs in the machine I'm on predate that instruction set. Luckily there was a C flag that I could unset in order to force the use of a software-only implementation. The question of AES crypto as a dependency of pandoc is symptomatic of what is my growing opinion of Haskell packages: insufficient modularity. Haskell-platform won't build unmodified without OpenGL, yet there are many things one might want to do with Haskell that work fine without OpenGL. Similarly, pandoc doesn't use crypto, but its build fails if unrelated packages won't build. Quite frustrating. Now my problem is with the builtin regex library, which complains of undefined symbols at the linker stage. I thought that it couldn't find the PCRE C library, but that is apparently not the case. I found an issue on github, so we'll see if any solutions are forthcoming from the developer. Regards, Jon On 06/28/2014 07:48 PM, Aaron Meurer wrote: > What was the error message? > > As I mentioned, Pandoc has a ton of recursive dependencies. cipher-aes > is probably a dependency of a dependency. > > Aaron Meurer From max_linke at gmx.de Sun Jun 29 09:39:26 2014 From: max_linke at gmx.de (Max Linke) Date: Sun, 29 Jun 2014 15:39:26 +0200 Subject: [IPython-dev] writing notebook extensions compatible with IPython.load_extensions Message-ID: <1404049166.6680.1.camel@archi> Hi I'm trying to write an extension that adds a new button the the toolbar. I can't figure out how to use any IPython specific js functions when I loading an extension with `IPython.load_extensions('test');`. This is the code I have in ~/.ipython/nbextensions/test.js IPython.toolbar.add_buttons_group([ { 'label' : 'test', 'icon' : 'icon-moon', 'id' : 'test-button' } ]); When I use this the js-console of chromium gives the following error Uncaught TypeError: Cannot read property 'add_buttons_group' of undefined But if I load test.js in custom.js like this it works. $([IPython.events]).on('app_initialized.NotebookApp',function(){ require(['nbextensions/test.js']); }); What do I have to add to test.js so that the js functions in the IPython namespace are not undefined? best Max From bussonniermatthias at gmail.com Sun Jun 29 11:07:03 2014 From: bussonniermatthias at gmail.com (Matthias Bussonnier) Date: Sun, 29 Jun 2014 17:07:03 +0200 Subject: [IPython-dev] writing notebook extensions compatible with IPython.load_extensions In-Reply-To: <1404049166.6680.1.camel@archi> References: <1404049166.6680.1.camel@archi> Message-ID: Hi Max Le 29 juin 2014 ? 15:39, Max Linke a ?crit : > `IPython.load_extensions('test');`. Where do you do that ? > > This is the code I have in ~/.ipython/nbextensions/test.js > > IPython.toolbar.add_buttons_group([ > { > 'label' : 'test', > 'icon' : 'icon-moon', > 'id' : 'test-button' > } > ]); > > When I use this the js-console of chromium gives the following error This works for me in master when copied past into Chrome console on IPython 3.0-dev. > > Uncaught TypeError: Cannot read property 'add_buttons_group' of > undefined > > But if I load test.js in custom.js like this it works. > > $([IPython.events]).on('app_initialized.NotebookApp',function(){ > require(['nbextensions/test.js']); > }); > > What do I have to add to test.js so that the js functions in the IPython > namespace are not undefined? It is probably just a race condition : > $([IPython.events]).on('app_initialized.NotebookApp',function(){ > IPython.load_extensions('test'); > }); Should work as IPython.load_extensions is just a simple wrapper around require. -- M From max_linke at gmx.de Sun Jun 29 11:26:38 2014 From: max_linke at gmx.de (Max Linke) Date: Sun, 29 Jun 2014 17:26:38 +0200 Subject: [IPython-dev] writing notebook extensions compatible with IPython.load_extensions In-Reply-To: References: <1404049166.6680.1.camel@archi> Message-ID: <1404055598.10463.1.camel@archi> On Sun, 2014-06-29 at 17:07 +0200, Matthias Bussonnier wrote: > Hi Max > > Le 29 juin 2014 ? 15:39, Max Linke a ?crit : > > > `IPython.load_extensions('test');`. > > Where do you do that ? in ~/.ipython/profile_default/static/custom/custom.js > It is probably just a race condition : > > > $([IPython.events]).on('app_initialized.NotebookApp',function(){ > > IPython.load_extensions('test'); > > }); > > > > Should work as IPython.load_extensions is just a simple wrapper around require. For this 'Table of Content' extension I just need to load it with `IPython.load_extensions('toc')` https://github.com/minrk/ipython_extensions/blob/master/nbextensions/toc.js#L125 I see that he also has the IPython.event in here but I don't really understand what he is doing. Does this define IPython.toolbar if it is undefined and then calls `toc_button` again afterwards? Any explanation for what he is defining in L17 would also be nice. Sorry if these questions are dump. I've never used javascript before. From jsw at fnal.gov Sun Jun 29 16:49:48 2014 From: jsw at fnal.gov (Jon Wilson) Date: Sun, 29 Jun 2014 15:49:48 -0500 Subject: [IPython-dev] nbconvert on Scientific Linux 5 In-Reply-To: <53AF9E46.6060409@fnal.gov> References: <53ADE9D1.1010303@fnal.gov> <53AF0236.4050004@fnal.gov> <53AF0E73.2010701@fnal.gov> <53AF9E46.6060409@fnal.gov> Message-ID: <53B07BEC.9080702@fnal.gov> Total victory! Nbconvert now works on the SUF cluster at SLAC! It's a totally ad-hoc install, but I don't care. Ok, I explained how I solved the crypto problem, by modifying the C code. I opened an issue for that on github [1]. The regex problem, after a brief discussion with the developers via another github issue [2], was solved by installing the PCRE C library from source (or from distro's package manager probably would have worked as well), and then telling cabal (the Haskell installer-thing) to use a different regex library than the default. cabal install --reinstall --force-reinstalls pandoc hightlighting-kate -fpcre-light Maybe I'll write a blog post about my troubles. Of course to do that I'd have to start a blog... Regards, Jon On 06/29/2014 12:04 AM, Jon Wilson wrote: > Hi Aaron, > I solved that problem. The issue was that cipher-aes uses the AESNI > instruction set, but the CPUs in the machine I'm on predate that > instruction set. Luckily there was a C flag that I could unset in order > to force the use of a software-only implementation. > > The question of AES crypto as a dependency of pandoc is symptomatic of > what is my growing opinion of Haskell packages: insufficient > modularity. Haskell-platform won't build unmodified without OpenGL, yet > there are many things one might want to do with Haskell that work fine > without OpenGL. Similarly, pandoc doesn't use crypto, but its build > fails if unrelated packages won't build. Quite frustrating. > > Now my problem is with the builtin regex library, which complains of > undefined symbols at the linker stage. I thought that it couldn't find > the PCRE C library, but that is apparently not the case. I found an > issue on github, so we'll see if any solutions are forthcoming from the > developer. > Regards, > Jon > From asmeurer at gmail.com Sun Jun 29 17:32:20 2014 From: asmeurer at gmail.com (Aaron S. Meurer) Date: Sun, 29 Jun 2014 16:32:20 -0500 Subject: [IPython-dev] nbconvert on Scientific Linux 5 In-Reply-To: <53B07BEC.9080702@fnal.gov> References: <53ADE9D1.1010303@fnal.gov> <53AF0236.4050004@fnal.gov> <53AF0E73.2010701@fnal.gov> <53AF9E46.6060409@fnal.gov> <53B07BEC.9080702@fnal.gov> Message-ID: <95A7B9E6-D752-4537-9F42-DAC641ABD714@gmail.com> You forgot to include the links. Aaron Meurer > On Jun 29, 2014, at 3:49 PM, Jon Wilson wrote: > > Total victory! Nbconvert now works on the SUF cluster at SLAC! It's a > totally ad-hoc install, but I don't care. > > Ok, I explained how I solved the crypto problem, by modifying the C > code. I opened an issue for that on github [1]. > > The regex problem, after a brief discussion with the developers via > another github issue [2], was solved by installing the PCRE C library > from source (or from distro's package manager probably would have worked > as well), and then telling cabal (the Haskell installer-thing) to use a > different regex library than the default. > > cabal install --reinstall --force-reinstalls pandoc hightlighting-kate > -fpcre-light > > Maybe I'll write a blog post about my troubles. Of course to do that > I'd have to start a blog... > Regards, > Jon > > >> On 06/29/2014 12:04 AM, Jon Wilson wrote: >> Hi Aaron, >> I solved that problem. The issue was that cipher-aes uses the AESNI >> instruction set, but the CPUs in the machine I'm on predate that >> instruction set. Luckily there was a C flag that I could unset in order >> to force the use of a software-only implementation. >> >> The question of AES crypto as a dependency of pandoc is symptomatic of >> what is my growing opinion of Haskell packages: insufficient >> modularity. Haskell-platform won't build unmodified without OpenGL, yet >> there are many things one might want to do with Haskell that work fine >> without OpenGL. Similarly, pandoc doesn't use crypto, but its build >> fails if unrelated packages won't build. Quite frustrating. >> >> Now my problem is with the builtin regex library, which complains of >> undefined symbols at the linker stage. I thought that it couldn't find >> the PCRE C library, but that is apparently not the case. I found an >> issue on github, so we'll see if any solutions are forthcoming from the >> developer. >> Regards, >> Jon > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > http://mail.scipy.org/mailman/listinfo/ipython-dev From jsw at fnal.gov Sun Jun 29 17:38:00 2014 From: jsw at fnal.gov (Jon Wilson) Date: Sun, 29 Jun 2014 16:38:00 -0500 Subject: [IPython-dev] nbconvert on Scientific Linux 5 In-Reply-To: <95A7B9E6-D752-4537-9F42-DAC641ABD714@gmail.com> References: <53ADE9D1.1010303@fnal.gov> <53AF0236.4050004@fnal.gov> <53AF0E73.2010701@fnal.gov> <53AF9E46.6060409@fnal.gov> <53B07BEC.9080702@fnal.gov> <95A7B9E6-D752-4537-9F42-DAC641ABD714@gmail.com> Message-ID: <53B08738.1030901@fnal.gov> So I did. My apologies. [1]: https://github.com/vincenthz/hs-cipher-aes/issues/25 [2]: https://github.com/jgm/pandoc/issues/1380 Regards, Jon On 06/29/2014 04:32 PM, Aaron S. Meurer wrote: > You forgot to include the links. > > Aaron Meurer > >> On Jun 29, 2014, at 3:49 PM, Jon Wilson wrote: >> >> Total victory! Nbconvert now works on the SUF cluster at SLAC! It's a >> totally ad-hoc install, but I don't care. >> >> Ok, I explained how I solved the crypto problem, by modifying the C >> code. I opened an issue for that on github [1]. >> >> The regex problem, after a brief discussion with the developers via >> another github issue [2], was solved by installing the PCRE C library >> from source (or from distro's package manager probably would have worked >> as well), and then telling cabal (the Haskell installer-thing) to use a >> different regex library than the default. >> >> cabal install --reinstall --force-reinstalls pandoc hightlighting-kate >> -fpcre-light >> >> Maybe I'll write a blog post about my troubles. Of course to do that >> I'd have to start a blog... >> Regards, >> Jon >> >> >>> On 06/29/2014 12:04 AM, Jon Wilson wrote: >>> Hi Aaron, >>> I solved that problem. The issue was that cipher-aes uses the AESNI >>> instruction set, but the CPUs in the machine I'm on predate that >>> instruction set. Luckily there was a C flag that I could unset in order >>> to force the use of a software-only implementation. >>> >>> The question of AES crypto as a dependency of pandoc is symptomatic of >>> what is my growing opinion of Haskell packages: insufficient >>> modularity. Haskell-platform won't build unmodified without OpenGL, yet >>> there are many things one might want to do with Haskell that work fine >>> without OpenGL. Similarly, pandoc doesn't use crypto, but its build >>> fails if unrelated packages won't build. Quite frustrating. >>> >>> Now my problem is with the builtin regex library, which complains of >>> undefined symbols at the linker stage. I thought that it couldn't find >>> the PCRE C library, but that is apparently not the case. I found an >>> issue on github, so we'll see if any solutions are forthcoming from the >>> developer. >>> Regards, >>> Jon >> _______________________________________________ >> 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 fperez.net at gmail.com Sun Jun 29 22:05:52 2014 From: fperez.net at gmail.com (Fernando Perez) Date: Sun, 29 Jun 2014 19:05:52 -0700 Subject: [IPython-dev] nbconvert on Scientific Linux 5 In-Reply-To: <53B07BEC.9080702@fnal.gov> References: <53ADE9D1.1010303@fnal.gov> <53AF0236.4050004@fnal.gov> <53AF0E73.2010701@fnal.gov> <53AF9E46.6060409@fnal.gov> <53B07BEC.9080702@fnal.gov> Message-ID: On Sun, Jun 29, 2014 at 1:49 PM, Jon Wilson wrote: > Total victory! Nbconvert now works on the SUF cluster at SLAC! It's a > totally ad-hoc install, but I don't care. > Wow. You get the tenacity award of the month for this one... :) -- Fernando Perez (@fperez_org; http://fperez.org) fperez.net-at-gmail: mailing lists only (I ignore this when swamped!) fernando.perez-at-berkeley: contact me here for any direct mail -------------- next part -------------- An HTML attachment was scrubbed... URL: