Davide Lasagna | 4 Jul 16:39 2014

Persistent storage of cell computations

Hi all!

Have a question. Is there any built-in cell magic that gives sort of persistent storage for the computations in the cell itself? Basically, my notebooks tend to be split in computation and visualisation parts, and I would like some robust and built-in way to save computations between runs, something similar to what Joblib Memory class provides,just within IPython. I think It would be great to have it. How difficult is to program it, BTW? 

Also, Can you point me in the right spot in the docs where I can get a basic idea of the API for creating this sort of magic by myself? 


IPython-User mailing list
IPython-User <at> scipy.org
Konrad Hinsen | 23 Jun 12:31 2014

"Connection failed" after updating to IPython 2.1

Hi everyone,

I just updated my Anaconda installation, which included an update from
IPython 2.0 to IPython 2.1. Since then, I cannot access my notebooks
with Firefox or Chrome any more ("connection failed"), though Safari
continues to work. Further system details: MacOS 10.9.3, Python 2.7.7,
and thanks to Anaconda all the dependencies should be up to date.

Since many packages were updated together with IPython, I did a test
install in a different (very plain) Python 2.7 installation, and
verified that it is indeed IPython 2.1 that makes the difference.

Does anyone have an idea what to do about this?

Xīcò | 21 Jun 01:12 2014

Random failures and write errors in tornado

Dear ipython-user,

I am trying to setup a notebook accessible via http on a FreeBSD server. 
Unfortunately, I am having quite a bit of trouble in getting a decently 
working installation. Indeed, there seem to be some problems in getting 
the notebook and the kernels working together, from time to time, the 
cells are not evaluated, or new notebooks cannot be created, and the 
kernel become unaccessible. It appears to be related to this log 

   WARNING:tornado.general:Write error on 24: [Errno 1] Operation not 

where the 24 is an arbitrary variable part.

I am not able to get more useful information by setting 

   DEBUG:tornado.access:200 PUT /api/notebooks/Untitled0.ipynb 
( 238.73ms
   2014-06-20 22:58:25.966 [NotebookApp] Polling kernel...
   2014-06-20 22:58:28.934 [NotebookApp] Polling kernel...
   *** MESSAGE TYPE:execute_request***
   [IPKernelApp]    Content: {'store_history': True, 'user_variables': 
[], 'allow_stdin': True, 'user_expressions': {}, 'code': "n, tau = 8, 
85.0  [TRUNCATED FOR THE EMAIL]", 'silent': False}

   [IPKernelApp] {'msg_id': 'aea6748f-d4e2-426d-b639-1c74b15208cf', 
'metadata': {'dependencies_met': True, 'started': 
datetime.datetime(2014, 6, 20, 22, 58, 31, 452209), 'engine': 
'acc96002-65c5-47aa-949e-0c9cb74b87a3', 'status': 'ok'}, 
'parent_header': {'msg_id': 'F7A5EBC0FBE349FF882A92950C64FC25', 
'username': 'username', 'session': '1B6F8561F91246BA9928B5A5DEBA6132', 
'msg_type': 'execute_request'}, 'content': {'payload': [], 
'execution_count': 10, 'status': 'ok', 'user_variables': {}, 
'user_expressions': {}}, 'header': {'msg_id': 
'aea6748f-d4e2-426d-b639-1c74b15208cf', 'username': 'kernel', 'date': 
datetime.datetime(2014, 6, 20, 22, 58, 31, 720530), 'session': 
'919e9995-ad23-436e-a059-01c42b3b2faf', 'msg_type': 'execute_reply'}, 
'msg_type': 'execute_reply', 'tracker': 
<zmq.sugar.tracker.MessageTracker object at 0x8082515c0>}
   WARNING:tornado.general:Write error on 23: [Errno 1] Operation not 
   2014-06-20 22:58:31.886 [NotebookApp] Polling kernel...
   2014-06-20 22:58:35.053 [NotebookApp] Polling kernel...
   2014-06-20 22:58:38.013 [NotebookApp] Polling kernel...

As for the configuration of the notebook, I simply used the command 
"ipython profile create" and updated ipython_notebook_config.py to avoid 
getting another kind of unsupported protocol errors (the notebook wanted 
to got ipv6). Basically, I simply set:

   c.NotebookApp.ip = ''
   c.NotebookApp.port = 9200
   c.KernelManager.ip = ''

I also tried with SSL, password and different log_levels, without luck. 
If anyone could give me some hints on how to get more debugging, that 
would be greatly appreciated.

Best regards,

IPython-User mailing list
IPython-User <at> scipy.org
Christoph Groth | 6 Jun 16:13 2014

autoscrolling such that the selected cell remains visible

Dear all,

Thank you for the recent changes that made the ipython notebook 
much more keyboard-friendly.

I would like to make a suggestion that IMHO would make interaction 
with the notebook even more fluid: The notebook window could 
scroll such that the selected cell always remains completely 
visible (whenever possible, i.e. whenever that cell fits into the 

Already now when moving from cell to cell with the keyboard the 
browser window scrolls to make cells visible.  But this is not 
true for _partially_ visible cells.  (At least not for me with 
IPython 2.1 and Firefox 24.)  Imagine the case where the user 
moves through the notebook with the keyboard and arrives at the 
last cell.  Currently, to make it completely visible, one needs to 
press another key (either page-down, or insert cell below).

The selected=visible principle could be also applied to cells in 
evaluation:  Once the output of the selected cell appears, I think 
it would make sense to scroll such that the now larger cell 
remains completely visible.

Another application: Currently, appearing output of inactive cells 
can move the selected cell out of view.  Would it be possible to 
scroll to keep the selected cell visible also in this case?

All the best,
Christoph Groth | 6 Jun 12:48 2014

Enabling codemirror addons in the ipython notebook


So far I've been unable to enable codemirror addons for the 
ipython notebook.  I suppose that it should be possible to do it 
inside custom.js somehow.  How to enable trailingspace.js for 

Irwin Zaid | 4 Jun 19:37 2014

Set maximum size of widgets in ContainerWidget?

Hi all,

I've been playing around with IPython 2.0, and I think the new widgets 
are great! I'm now starting to customize some of them to my needs, which 
brings me to my question...

If I make a ContainerWidget that contains a bunch of, say, 
FloatTextBoxWidgets, each FloatTextBoxWidget is a different length 
depending on the length of the description. I'd like to harmonise them, 
is there a way to do this?

I thought setting 'max-width' in the css would do it, but it seems to be 
ignored for widgets in a ContainerWidget.


gary ruben | 2 Jun 07:28 2014

IPython-notebook 2.x.x crashing on Windows 32


Since IPython 2.x.x I haven't been able to run IPython notebook on my work machine, which is running Anaconda Python 32 bit in Windows7 enterprise 64 bit.

I think it is this issue with ZMQ causing the problem

because I see
windows ZMQError: Permission denied
in the crashed console window. The proposed solution according to a couple of threads I've found online is to add a loopback address exception to the Windows firewall, but this hasn't solved the problem for me (although I may have done this incorrectly). It is possible that McAfee is causing problems too. At home I'm running Anaconda Python 64 bit in Windows7 Pro 64 bit with no such problem, but I'm not using McAfee at home.

Any ideas?

Gary R.
IPython-User mailing list
IPython-User <at> scipy.org
Akim Demaille | 29 May 14:29 2014

Runtime selection of the default pretty display

[reresent, I guess you need to be member, but I never received
any message about this]
[resent, the message didn't show up and I received no message
from mailman about needed membership]


I'm working on an environment for automata, and render them
as SVG inside an IPython console (typically web based).  Automata
can be really large, in which case rendering them is useless.
However the user is the one who should decide.

So I have a number of different output formats, SVG being one
of them, and I'd like to be able to select the appropriate
output format based on some metrics on the automaton.

I know I can have _repr_svg_ return None for instance if I
think the automaton is too big, in which case another format
will be chosen.  However, the user should be free to call
_repr_svg_ on such a large automaton, and get a real result,
not a None.

So what I'd like is a means to control which _repr_ IPython's
display will chose.  Is there such a feature?  What is the best
practice to do what I what?  Should I consider the user should
not be able to depend upon _repr_svg_?  Where is the piece of
documentation I missed?

I have a different question, but which is connected, so I should
probably pack my second question here too.

I would like to offer the user a means to select the display
for my automata.  So I use interact to this end:

def _automaton_display(self, mode):
    """Display automaton `self` with a local menu to propose different
    if mode == "dot" or mode == "tooltip":
        dot = _one_epsilon(self.format("dot"))
        if mode == "tooltip":
            dot = re.sub(r'label = (".*?"), shape = box, style = rounded',
                         r'tooltip = \1',
        svg = _dot_to_svg(dot)
    elif mode == "info":
    elif mode == "type":
        raise(ValueError("invalid display format: " + mode))

# Requires IPython 2.0.
    from IPython.html.widgets import interact
    automaton.display = \
        lambda self: interact(lambda mode: _automaton_display(self, mode),
                              mode = ['dot', 'info', 'tooltip', 'type'])
except ImportError:

I have two issues:

- this requires that the user run 'myautomaton.display()' although
  I would like this to be the default output for automata, how can
  I do that?  (i.e., have something like _repr_widget_).

- when called, this piece of code displays

   Out [3]: <function vcsn.automaton.<lambda>>

  How can I get rid of this?

Thanks in advance for the answers, and in retrospect for this
brilliant piece of software!


IPython-User mailing list
IPython-User <at> scipy.org
linny | 27 May 11:44 2014


Hei, I'm trying to get ipython anacoda set up with notepad++ instead of notepad in windows. So that %edit is referring to notepad++... For this I have to alter the file ipython_config in my default profile. The problem is that I get the following error name 'get_config' is not defined where can I install the get_config function ? should this not be installed by default?

View this message in context: get_config
Sent from the IPython - User mailing list archive at Nabble.com.
IPython-User mailing list
IPython-User <at> scipy.org
Jean-Francois.Moulin | 26 May 15:41 2014

changing color theme for paired brackets in notebook


could anyone point me to a way to tune the color scheme of the ipython notebook? In particular I want to change
the color used to highlight paired brackets when the cursor is on one of them (On my machine and with my light
colorblindness, the color used is almost indistinguishable from the background)

Many thanks in advance
Helmholtz-Zentrum Geesthacht 
Zentrum für Material- und Küstenforschung GmbH 
Max-Planck-Straße 1 I 21502 Geesthacht I Deutschland/Germany 

Geschäftsführer/Board of Management: Prof. Dr. Wolfgang Kaysser, Dipl.-Ing. Michael Ganß 
Vorsitzender des Aufsichtsrates/Chairman of the Supervisory Board: MinDirig Wilfried Kraus 
Amtsgericht Lübeck HRB 285 GE (Register Court) 
Internet: http://www.hzg.de  
Vasco | 24 May 19:46 2014

remote X DISPLAY

Dear all,
more than 1 year ago (20130226) a discussion came across (on 
ipython-user) how to run ipython notebook on a remote machine. The 
solution than was to create a ssh connection, and run the notebook 
inside "screen".

Now I want to use X forwarding show gtk matplotlib windows. This works 
as long as I keep the original SSH connection open. However, when I 
create a new ssh connection, the "DISPLAY" environment variable should 
change. Is there I way I can tell the %matplotlib gtk magic to pass a 
certain DISPLAY to gtk?

Kind regards,