Merge pull request #1295 from minrk/btree

Add binary-tree engine interconnect example.

This implements a parallel [all]reduce as used in traditional MapReduce scenarios; this is a useful example showing how the IPython.parallel tools can be configured with a different interconnect topology in addition to the default view of N engines connected to 1 controller in a simple star topology.
only get the default encoding one time

for the encode/decode functions, use a module-level cached value of the
default encoding given by encoding.getdefaultencoding(). This presumes
the value returned by getdefaultencoding isn't going to change over time.
handle pyout messages in test_message_spec

and wait for kernel to start, so side effects of startup do not
pollute the first test.
Merge pull request #1669 from minrk/pyout

handle pyout messages in test_message_spec

and wait for kernel to start, so side effects of startup do not pollute the first test.

closes #1668
closes #1667
works->work
%pastebin pastes to Github gist using API v3.
%pastebin -d option for custom description.
Merge pull request #1670 from takluyver/pastebin-gist

Point %pastebin to gist.github.com.

Unfortunately http://paste.pocoo.org has closed down. This updates the %pastebin magic to use gists instead, and adds a -d flag for the user to provide a gist description string.

We don't try to use any of the advanced features of gist, such as authenticating to make gists associated with your account. That could be added if there's demand for it, but for now we just send some content and return a URL.
revert PR #1659

caused critical problems with subprocess output.

See `!ls` for an example.
add qt config option to clear_on_kernel_restart

Previously, restarting a kernel in the qtconsole always cleared the
entire session. Since qtconsole has a %clear command, it makes sense to
allow users to decouple the two activities - the restarting of kernels,
and clearing the console.  This commit adds a configuration option which
allows for the restarting of kernels without losing console history. The
default value for clear_on_kernel_restart is set to True to stay
consistent with the way things worked before this functionality was
added.

To test, run:

    ipython qtconsole --IPythonWidget.clear_on_kernel_restart=False

Here's what it looks like when the user restarts the kernel on In[3]:

 Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41)
 Type "copyright", "credits" or "license" for more information.

 IPython 0.13.dev -- An enhanced Interactive Python.
 ?         -> Introduction and overview of IPython's features.
 %quickref -> Quick reference.
 help      -> Python's own help system.
 object?   -> Details about 'object', use 'object??' for extra details.
 %guiref   -> A brief reference about the graphical user interface.

 In [1]: 0x42
 Out[1]: 66

 In [2]: 042
 Out[2]: 34

 In [3]: # restarting kernel...
 #------------------------------------------
 In [1]:
CLN: Remove redundant function definition.

The same function has been redefined a few lines below this code.
Add script to test pull request
Merge pull request #1684 from punchagan/minor-cleanup

CLN: Remove redundant function definition.
import Binary from bson instead of pymongo
Merge pull request #1616 from Carreau/coreImage

Make IPython.core.display.Image less notebook-centric

embed images by default when only given as Image('url'), as opposed to Image(url='url').
Fix sys.path missing '' as first entry in `ipython kernel`.

The comment is copied from the corresponding code in TerminalIPythonApp.

Closes #1240.
Merge pull request #1687 from minrk/binary

import Binary from bson instead of pymongo
Print missing libraries and platform.
prompt_count should be unconditional in pyout messages
PR tester can now post results to Github as a comment.