Is Google Docs integration with iPython Notebooks a good idea?

Google Docs should integrate iPython Notebooks, period. It would be so great to run python inside a Google Doc / Notebook. It would make Google Docs the Lab Notebook of many scientists.

Ok, but first, what are iPython Notebooks? A Notebook is basically a web-based user interface for authoring and running Python code and rich text. It saves everything in JSON format and is therefor very portable and useful for experimenting, prototyping, data exploration, and teaching. It is very useful because you don’t have to rerun your entire python script, or if you’re in a python repl you don’t have to retype everything. You just change what you need in the cell you want and rerun that cell. See an example of the output of one iPython Notebook.

Why Google Docs should integrate iPython Notebooks? Google is one of the big boys of python. It also provides appengine that allows you to run your python apps on their servers. So I’d say that 90% of the infrastructure is already in place for Google Docs to support iPython Notebooks. Obviously Google doesn’t want to give you access to some low level parts of Python but they could implement Notebooks in with the same kind of sandbox they have in Appengine.

Now imagine that google can go even further and integrate iPython Notebooks with their collaborative Google Docs environment in a way that many contributors could be working on the same document and in the case of Notebooks we are talking about running code in the same document, simultaneously. Imagine several users sharing a python session within a Google document. Obviously sandboxed and secured and all that. Imagine remotely working in this way with partners across the globe.

Imagine teaching programming on a ancient Blackboard Notebook while your students experimented live and you’d be monitoring and helping them in the same document? The results of their actions would be immediately available and they could see what worked and what didn’t. How great would that be?

Also imagine the potential of using google infrastructure to run some pretty tough simulations. All from within a Google document and with results available immediately at the right place in the document you’re writing. In the end you’d just be exporting the document to a PDF and sending it to the journal… :)

Google Docs + iPython Notebooks could become a revolution in the way you write documents and run software. They would stop being two separate activities and become mixed in a way that would become natural. (obviously there are some attempts to do this in other softwares: for example R + Sweave or R + knitr, or Mathematica Notebooks, but none has the potential to spread as a combination Google Docs + iPython Notebooks).

With all this potential, I believe that if Google integrates iPython Notebooks as a native supported format in Google Docs, they will get a lot of love from my mom many scientist all over the world. Go ahead Google, just do it!

iPython Notebooks

Google Docs

Notebook Example for VAT simulation in portuguese

Python is slow! Videos on python’s high-performance

Is python slow? Some say it is, some say it isn’t. All we know is that at the last PyCon 2012 conference there were some talks on how fast you can push python! Check out this list of videos (in no particular order) related to high-performance python.