Being able to weave together text|markdown, tabular data (in almost any format you want) and images ( whether from matplotlib, raw captures, or synthetic assemblies ) in one environment is very powerful.
I suspect that with some additional tools IPython notebook will become the integrators workbench par excellence, useful in many contexts.
I'm sure the iPython Notebook could be useful in my day to day Python/Django usage but I haven't figured out how yet.
That said, I thought it was quite straightforward to setup and use the IPython Notebook.
There are those who will find it useful but others will find that there are better desktop tools for these purposes. Individual developers are free to pick and choose.
Fortunately, neither this announcement not the Ipython roadmap emphasises development of the web-based notebook.
I'm even wondering: if there was a way for notebooks to import each other, would I still bother with modules?
1. In ipython_notebook_config.py, set the following:
# Save .py for each notebook for import elsewhere
c.NotebookManager.save_script = True
2. Restart your notebook server. 3. Save any notebooks you'd like to import under module friendly names. (They wind up in the same dir as the ipynb files.) 4. In your interactive notebook, import your_other_notebook.
This works well when all your notebooks are in the same folder, which is the default. I haven't given much thought to how you might create packages this way, but perhaps with a few code changes you could?
The "run" command for running python scripts:
* -t to print timing information
* -p to print profiling info from profiler module
* -d run the script under pdb interactively (with -b to set line breakpoints)
* -n to set __name__
All of these things can be done fairly easily on their own, but doing it through IPython makes the output so much easier to read and work with.
Whenever I'm working with data I need to visualize, I like to use:
ipython qtconsole --pylab=inline
to get a terminal-like window that has inline graphs from matplotlib functions.%run -n foo.py
You can't set __name__ to arbitrary values. It's either '__main__' like when running a script, or (with -n) the module name, like when performing an import.
I like the qtconsole feature but i find it less than perfect to install:
1. pip install ipython 2. <system package manager> install qt4 3. pip install pyside / qt4 bindings
The better feature, for me anyway, is the notebook interface (it starts a local web server and gives you a rich web guy, somewhat like a Mathematica idea of interactive notebook editing with inline charting etc.)
But, that's a whole other bunch of dependencies that aren't in scope when installing ipython.
Not sure of the best fix, offer ipython and ipython-full-stack on PyPI?
(disclaimer, I work for Enthought, which sells EPD)
CDEPEND="dev-python/decorator
dev-python/pexpect
dev-python/pyparsing
dev-python/simplegeneric
virtual/python-argparse
emacs? ( app-emacs/python-mode virtual/emacs )
matplotlib? ( dev-python/matplotlib )
mongodb? ( dev-python/pymongo )
octave? ( dev-python/oct2py )
smp? ( dev-python/pyzmq )
wxwidgets? ( dev-python/wxpython )"
RDEPEND="${CDEPEND}
notebook? ( >=www-servers/tornado-2.1
dev-python/pygments
dev-python/pyzmq )
qt4? ( || ( dev-python/PyQt4 dev-python/pyside )
dev-python/pygments
dev-python/pyzmq )"
DEPEND="${CDEPEND}
test? ( dev-python/nose )"I'm surprised to be honest but maybe I'm missing something.
Give it a proper whirl, you'll never go back.
Proper python REPL history across sessions (not hacking up a substitute using a $PYTHONSTARTUP file to load readline history and register an at exit handler to dump history). History becomes as useful as a large shell history (i'm sure i did something similar last year, what was it?...)
In line charting, makes visualising any random thing (runtime of function, memory usage etc.) so easy you'll start doing it all the time.
The webserver notebook can stream line collaboration with co-workers. I like the ability to make "interactive documentation", although truth be told i haven't used this as much as i could yet.
I don't want to go back to a shell without tab completion. Is tab completion extremely useful? Functionally, no. I can live without it. But I will avoid that if at all possible, and that's not something I felt before I used tab-completion.
I get the sense that IPython is the same way. It's not essential, but after many have used it they have the sense that they don't ever want to be without again.
I can imagine living without it in the same way I can imagine writing code in Notepad. Technically feasible but unacceptably painful.
Although I hear more and more people talk about bpython[1]. I understand why it's different, but it's just not as awesome as IPython, especially since IPython 0.11+
This is big news for the Python community :)
Also, PiCloud (http://www.picloud.com) has a notebooks tab for launching an IPython Notebook as a job. That's useful because it means you can use their compute and data facilities with it easily.
- Will bpython allow me to control a cluster of python processes to perform my scientific computation?
- Will bpython allow me to create executable documents mixing markdown as well as LaTeX so that I can display mathematical equations?
- Does bpython have integrated matplotlib support, so that the GUI thread of matplotlib runs in a separate thread and won't block the interpreter?
IPython is much more than just an interactive shell, even though the name doesn't suggest more than that.
It's also been around longer than bpython. IPython started in 2001 while bpython is from 2009.
The current IPython has several GUI interfaces, including through a web browser, with the goal of supporting a graphical notebook with embedded plots and other images. bpython does not support that.
There are very few tools in the extended REPL space. I think software developers don't spend as much time on the interactive shell as computational scientists, and those developers that do may augment the shell with, say, the emacs shell rather than develop a new interactive interface. So an early tool which works reasonably well, which has been around for a while, with few competitors, and has outreach and updates based on user needs, will tend to be more widely used.
If bpython does what you want, that's great. But the equivalent functionality is just one part of IPython.
Thus (anecdotally) proving your point, I suppose.
If creating forms on the same was a bit more simpler, then it would be biggest boon to a data analyst since excel sheets...dare i say. It would lead to quick fix applications, rapid prototyping for reporting applications. And it can be hosted and shared directly: http://nbviewer.ipython.org/
ipython has a client/server model with multiple gui frontends including a qt one that lets you print out inline graphs and ipython notebook which lets you generate documents with code and data analysis/visualization. I believe the last part is what the grant is for.
Python has been used in scientific and statistical fields a lot lately and ipython notebook is quite useful for that.
Basically it's the Python terminal on steroids.
(Would also be nice if building ipython on OS X was easier!)
for ruby cf https://github.com/ipython/ipython/pull/2643
What issue do you face? Genuinely curious, because I use Mountain Lion, and installing IPython for me simply involves doing
pip install ipython
I installed Python from source though. brew install python # or just download and install from source
pip install numpy
pip install matplotlib
pip install ipython[zmq,qtconsole,notebook,test]
Actually, for qtconsole you need to install Qt and
pip install pysideBut the latter failed to build on my machine... (Given that Apple's gcc version is ancient and clang is the default compiler on OS X -- it's a wonder the other tools were built correctly)
The related features in Org-mode are known as Org-babel, uniting disparate languages under the single umbrella of Org-mode. The support for language evaluation in Org-mode is slightly more cumbersome than that offered in IPython, but also arguably more flexible and powerful. Plus you get to edit your notebook in a powerful editor with best outliner ever, plus all of Org-mode's many other features (I'm a Vim person but I give credit where credit is due).
Org-babel is a rich and deep niche of Org-mode, and one of the areas under the most constant development. You can read some docs on it here, but it can be hard to wrap your head around all of it until you actually use it:
http://orgmode.org/manual/Working-With-Source-Code.html#Work...
It's a great project, and lack of funding has prevented them from delivering on Py3k.
Love iPython, except for one thing I can't seem to figure out.
print "Hello World"
hit up arrow to recall previous line, press ctrl+a to try and jump to the beginning of the line but instead my cursor jumps to a new empty line on the right side of the screen?What is going on?! I don't get how this split is supposed to work and it always throws me in it when I least expect it. I just want to do a simple edit to my previous command :(
The notebook does not care wether or not the language is python,ruby.. or else. As we are mainly python developer the notebook is known for it's python bindings, but the ability to run ruby code is on its way.
Cf instruction here https://github.com/ipython/ipython/pull/2643
We really would love ruby devs help into packaging and make it seamless to run for user, and any other languages that would wish to join.
I actually working on writing a Julia kernel which will be my first encounter with Julia.