57 comments

[ 3.9 ms ] story [ 127 ms ] thread
Can't wait to see what people come up with using the new widgets capabilities. Here's a demo of Excel-like grid editing for Pandas: http://nbviewer.ipython.org/gist/rossant/9463955
I'm hugely excited to work with the new widgets framework. It might be slightly outside the designed use-case of the IPython notebook, but I'm interested in doing live plotting inside of a notebook and using a notebook as a sort of analytics dashboard.
Bokeh (http://bokeh.pydata.org) has excellent IPython notebook support, and provides interactive, live plots inside the notebook.

It also has matplotlib support, so you can trivially turn Matplotlib figures into interactive web plots (e.g. this interactive plot built via Seaborn, which is a statistical plotting package that uses matplotlib): http://bokeh.pydata.org/docs/gallery/violin.html

How do the interactive bokeh plots work? Is it necessary to start up a separate server, or can it work through the widget communication channels?
Actually, Bokeh plots are not (yet) integrated with the widget infrastructure at all, and work in IPython 1.x. There is a fully embeddable javascript library (BokehJS) which handles all the interactivity entirely in the browser. Data can be directly and fully embedded in the DOM.

If you want to view larger data, access the downsampling capabilities of the Bokeh plot server, coordinate views between multiple instances of the notebook, or do streaming and animated plots, then you will need to run the bokeh server.

The "technical vision" document is really off-putting. It starts with some BS about photography and then asks me

What are the best perceptual approaches to honestly and accurately represent the data to domain experts and SMEs so they can apply their intuition to the data?

I dunno mate, what's an SME for fucking starters?

Yes! This is precisely the use case I have been waiting for. I just used days to implement a simple bar chart and a map visualization in Notebook. In IPython 1.0 this requires matplotlib know-how, the whole Python GIS library system to get shapefiles into Python format, not to mention changing projections and such to our somewhat peculiar needs.

Now I can just create widgets from my D3 visualizations, connect the Pandas dataframe and it is done. Also, I can continue to refine my standalone D3 visualizations and the widgets will benefit. All of this I used to do by hand, in a separate multistage process, I can now do directly and interactively.

Getting a real table view from Dataframe is the missing link. Now to search for the JS table plugin that can handle multi-index, hierarchical tables...

I'd love a drop-down filter mechanism on pandas similar to the one Excel has. That's the one thing that makes me open Excel when I'm working on a new dataset on python. It's just so much easier to inspect data that way....
(comment deleted)
Some Drake University students and I have been working on wrapping the three.js library for 3d webgl graphics and are nearly complete [0]. We also implemented a simple webcam widget [1]. Here's a live demo illustrating both, using the Sage Cell Server: http://sagecell.sagemath.org/?q=qjjurl (you may need to click Evaluate once, and you'll need to click the permission notification to allow the browser to use your webcam)

[0] https://github.com/jasongrout/pythreejs

[1] https://github.com/jasongrout/ipywidgets

It took some searching to find the "What's New" page: http://ipython.org/ipython-doc/dev/whatsnew/version2.0.html

    The principal milestones of 2.0 are:
    - interactive widgets for the notebook
    - directory navigation in the notebook dashboard
    - persistent URLs for notebooks
    - a new modal user interface in the notebook
    - a security model for notebooks
I've noticed more and more projects are not making it easy for people to find what changed in a new release. It's extremely annoying. A pointer to a changelog or what's new page used to be standard in all announcements.
Thanks. I changed it.
Awesome.

If you're in the mood to fix something else: the changelog doesn't currently agree with itself about whether Python 3.2 is supported.

for the record: dang is Daniel Gackle, an HN moderator, not an ipython person
Right. While I would be honored to be an IPython person, all I meant was that I changed the url to be the better one suggested by shoyer. Clerical staff at your service.
Any idea when will it be available on Anaconda?
Can you not do "conda update ipython"?
If I do "conda search ipython" then for each of ipython, ipython-notebook and ipython-qtconsole it shows that I'm at version 1.1.0 on python 2.7. It also shows other previous or later versions available (but not 2.0.0).

So I think the answer to your question may be "not today."

Probably the simplest thing is to wait until a version of Anaconda with the new ipython is available, then update Anaconda itself.

Someone please correct me, I'm a newish Anaconda user.

Good news: a moment ago, I was just able to install IPython 2.0.0 with `conda update ipython`. I'm excited -- it looks great.

Interestingly, if I then do `conda update anaconda`, it unlinks IPython 2.0.0 and re-links 1.1.0 after confirmation (which I decline, of course).

Interesting. I just did that, got ipython 2.0.0 installed, then searched again and saw 2.0.0 for ipython, but 1.1.0 for the other two. When I then tried to update notebook it said that it would revert ipython back to 1.1.0, so I said no.

Then I started ipython notebook and got the new interface. So cool, but not sure what conda search is telling me now. Anyway, thanks for that, I'll use it with care and eyes open.

Anaconda is a meta-package with exact versions of packages that work well together. Any packages that are listed in Anaconda will be set to those exact versions (upgraded or downgraded).
You can always create a new environment and then pip install packages if you can't find the latest in the Anaconda repos.
Weird, I don't see anything on their homepage yet: http://ipython.org/ There is of course a link to the 2.0 version in development--perhaps you just stumbled on the current in development 2.0 bits on pypi?
Stable is up on pypi.
The remapping of shortcuts was mildly annoying, but it looks good.
I really really really want some robust multiuser interactive support...time to try and help...
I've always hovered around iPython with a vague sense that it could be used in a really cool way, but have never managed to make the jump to incorporate it into my daily workflow despite some fun experiments.

It is much more clear how those using Python for scientific work would use it, but does anyone have some great examples on how you use it when building apps or other projects?

A use case that is related to to (data) science work is scraping data from Web sites, which can of course be useful in other cases too. I got used to start and test those kind of scripts in IPython Notebook and once they work save them as a standalone script.
My primary use of IPython is as an interactive environment, but I've used it in production in a couple ways:

- I have a script that runs at midnight to fetch the last day's data and run an IPython notebook with runipy (https://pypi.python.org/pypi/runipy). I render the notebook to HTML with nbconvert with a template that hides the Python code, and emails me the output.

- I have a model that needs to be trained occasionally as part of a workflow. Rather than writing a python script, I use a notebook. After training the model I plot some graphs to evaluate/validate the model and these become part of an HTML report that gets generated alongside the model. I use runipy to automate the pipeline.

I use it as a better shell. Scripting in bash or sh is a horrible experience, and pure Python lacks the conciseness of bash for simple exploration and manipulation of a file system hierarchy (cd, cp, mv, ls...).

For example, you can write stuff like

  files = !ls -a
  for f in files:
    !diff $f "some_file"
    if _exit_code != 0:
      some_function(f)
and it even correctly handles spaces in file names. (what sorcery is this?!)
This changes everything!
Not at all to pick a nit, but that still depends on bash or sh (the bang commands).

Does anyone have any experience reports on using ipython as a better shell on top of cmd.exe rather than on top of a *nix shell?

> Not at all to pick a nit, but that still depends on bash or sh (the bang commands).

That's a good point, and not nit-picky at all. However, I think the dependency is on the Unix commands (mv, cp, ...), not bash or sh, which still makes this mixed approach unsuitable for truly platform-independent scripting.

Of course, this point is moot when you use it as your personal shell, or when scripting for your Unix servers, etc.

Neat, works with #!/usr/bin/env ipython

I'm using fish <http://fishshell.com/> for both scripting (saner syntax, space handling) and interactive (multiline syntax highlighted prompt) and never looked back.

But this makes me consider ipython again, perhaps even as main shell. Hmm, after %rehashx I can use commands without !, e.g. git diff. <http://ipython.org/ipython-doc/stable/interactive/shell.html... Moreover, this means I can have a notebook experience for my shell. Together with the new directory navigation and friendly URLs this is becoming very attractive!

There is however a deal-breaker: no smart completion for shell commands. But it'd be clearly possible to implement it by harnessing bash (or zsh or fish) for completions.

Wow. The one thing that makes bash scripting better than Python for certain things is that using the subprocess module makes your code really verbose. This fixes that.
ipdb

    import ipdb
Later:

    ipdb.set_trace()
Look around. Inspect some stuff. Change some values. Write some prototype code.

I have no idea how I debugged before ipdb, and my node suffers because node inspector isn't anywhere near as powerful.

Seriously, it's awesome.

Just grabbed it off pip. Turns out a simple `pip install ipython` doesn't pull in all the dependencies for iPython Notebook. To grab all of those as well, run:

  pip install ipython pyzmq jinja2 tornado
And then:

  ipython notebook
should open the web UI in your default browser.

    pip install ipython[notebook]
I just woke up and, after seeing this announcement, I know it's going to be a great day. I do statistical research for my university, and I just found ipython notebook a couple weeks ago. I don't remember being so excited about a piece of software since I first installed sublime. Although I've been doing data-heavy software engineering for several years now, this one tool has already completely revolutionalized the way I do day-to-day data mining. Props to everyone involved in this release!

I'm especially excited about the notebook subfolders. Ah, the little things in life.

The widget capability in this release might give the interactive side of Mathematica notebooks a run for their money.
I'm confused ... is it (declared) stable? or is this a beta?
It's a release, so you can "presume" it "stable", depending on the reputation of the project.
Congrats, ipython is an very usefull tool,especially for teaching when one cant afford Mathlab or paid software.It's simple and fun to use. thanks again,cant wait to try that new version.
For me, IPython will always be a double-edged sword. On the one hand I love what the project brings in terms of scientific exploration and ease of use. On the other hand it is annoyingly hard to integrate the shell into my own application: the API changes way too often and the source is a very complex and tangled mess.
Just a quick heads up -- if you are using Vimium for Chrome or Vimperator on Firefox, make sure to exclude iPython Notebook from the plugin. Otherwise the majority of "Command Mode" keyboard shortcuts won't work.
I must admit that I never saw that much value in ipython. Of course I understand that you can create a nice notebook with embedded plots, etc. but apart from that what does ipython give me? How does it compare to Vim + Jedi (autocompletion) + QuickRun (running the script with a single key)?