Julien Schueller | PHIMECA | 16 Dec 12:28 2014

graph displayed twice while overloading _repr_svg_ for notebook


I'm having trouble overloading _repr_svg_ for graph inlining in the notebook; my object is displayed
twice if I call plt.plot just before.
I assumed a figure was left open or something, but even if I call plt.close('all') between the matplotlib
calls, the result remains the same.

I did some imports first:
import numpy as np
import matplotlib.pyplot as plt
import matplotlib
from scipy.stats import norm
import sys
import io
print('matplotlib version %s' % matplotlib.__version__)
import IPython
print('IPython version %s' % IPython.__version__)

Here'my object:
class NormGraph(object):
    def __init__(self):
        super(NormGraph, self).__init__()
    def _repr_svg_(self):
        if sys.version_info[0] >= 3:
            output = io.StringIO()
            output = io.BytesIO()
        self._fig = plt.figure()
        axes_kwargs = {}
(Continue reading)

John ZuHone | 11 Dec 05:18 2014

Trouble with configuration file in notebook


I used 

ipython profile create 

to create the default configuration file, and then I uncommented a few lines in
.ipython/profile_default/ipython_notebook_config.py to set different configuration options, e.g.:

c.NotebookApp.open_browser = False
c.NotebookApp.log_level = 20

However, none of them seem to be actually changing:

ipython notebook —debug

2014-12-10 23:15:50.654 [NotebookApp] Config changed:
2014-12-10 23:15:50.654 [NotebookApp] {'Application': {'log_level': 10}}
2014-12-10 23:15:50.655 [NotebookApp] IPYTHONDIR set to: /Users/jzuhone/.ipython
2014-12-10 23:15:50.659 [NotebookApp] Using existing profile dir: u'/Users/jzuhone/.ipython/profile_default'
2014-12-10 23:15:50.660 [NotebookApp] Searching path [u'/Users/jzuhone',
u'/Users/jzuhone/.ipython/profile_default'] for config files
2014-12-10 23:15:50.660 [NotebookApp] Attempting to load config file: ipython_config.py
2014-12-10 23:15:50.661 [NotebookApp] Loaded config file: /Users/jzuhone/.ipython/profile_default/ipython_config.py
2014-12-10 23:15:50.661 [NotebookApp] Attempting to load config file: ipython_notebook_config.py
2014-12-10 23:15:50.662 [NotebookApp] Loaded config file: /Users/jzuhone/.ipython/profile_default/ipython_notebook_config.py
2014-12-10 23:15:50.669 [NotebookApp] Using MathJax from CDN: https://cdn.mathjax.org/mathjax/latest/MathJax.js
2014-12-10 23:15:50.684 [NotebookApp] The port 8888 is already in use, trying another random port.
2014-12-10 23:15:50.685 [NotebookApp] Serving notebooks from local directory: /Users/jzuhone
2014-12-10 23:15:50.685 [NotebookApp] 0 active kernels 
(Continue reading)

Tony Cappellini | 6 Dec 06:37 2014

Peculiar problem with requests module

On OSX 10.9.5, Python 2.7.8 (32 Bit), iPython 2.2.0

when I execute these lines in the iPython console (cmd prompt)
they execute normally

import requests

When I execute the requests.get() in the notebook, it throws a huge exception.
This makes no sense to me. How can it work in the console, but not in the notebook?

Here is the exception traceback

Would someone explain what happened, and if there is a way to fix it?


IPython-User mailing list
IPython-User <at> scipy.org
Jonno | 3 Dec 23:07 2014

Custom css through nbviewer

I'm trying to figure out if it's yet possible to use a custom css when displaying pages via nbviewer.ipython.org.

IPython-User mailing list
IPython-User <at> scipy.org
Kirstie Whitaker | 1 Dec 12:48 2014

Standard cells at the beginning of a new ipython notebook

Hi IPythoners,

I have a few standard cells that I like to put at the beginning of each new notebook. Mostly they're standard imports and a few definitions that I use a lot. (For example the first cell is always: %load_ext autoreload, %autoreload 2, %matplotlib inline).

Does anyone have any good suggestions for how to have this appear automatically in a new notebook? At the moment I just open an old one and copy over each cell individually....but it seems like maybe there's a better way....


Kirstie Whitaker, PhD
Research Associate

Department of Psychiatry
University of Cambridge

Mailing Address
Brain Mapping Unit
Department of Psychiatry
Sir William Hardy Building
Downing Street
Cambridge CB2 3EB

Phone: +44 7583 535 307
Website: www.kirstiewhitaker.com
IPython-User mailing list
IPython-User <at> scipy.org
Phillip Feldman | 1 Dec 06:27 2014

in ipython notebook, possible to create a table without a border?

Whenever I create a table in the ipython notebook, a black border is drawn around it.  I would like to be able to eliminate this border, but <table border="0"> has no effect.  Any suggestions will be appreciated.

Phillip M. Feldman
IPython-User mailing list
IPython-User <at> scipy.org
Emanuele Olivetti | 28 Nov 16:46 2014

Qt issue in IPython 0.12: workaround?


We are developing a Qt application that we run from the IPython console
(ipython --gui=qt). A part of our users still uses Ubuntu 12.04,
which ships IPython 0.12.1. Unfortunately there is a bug in that version, that
was fixed after releasing 0.12.1:

As described in the link above, the bug prevents some dialogs from displaying.
So our Ubuntu 12.04 users cannot see, for example, the QColorDialog.

It is a bit impractical to ask our users to upgrade ubuntu in order to
upgrade IPtyhon. Moreover asking them to manually install a newer IPython
may not be easy. Is there a way to solve the issue with a workaround
from the (our) application side? (like monkey patching?)
What would you suggest?


Behzad Tabibian | 27 Nov 16:09 2014

Icon for latex convertion


I have been trying to specify a logo for the latex produced by nbconvert but without success. 

Currently I have a .tplx file which specifies parameters of the template but I have no clue how to specify the
path for an icon.

My tplx file looks like following:

((*- extends 'article.tplx' -*))
% Disable input cells
((* block input_group *))
((* endblock input_group *))

((* block author *))
((* endblock author *))


I will appreciate if someone could point me to the right direction for how I can configure the exported latex.

IPython-User mailing list
IPython-User <at> scipy.org
Aaron Reabow | 15 Nov 06:11 2014

Re: IPython notebook formatting (Thomas Kluyver)

Guys, can I just say that the installation of ipython notebook is amazing these days.  Bundling all of the dependencies makes this process so simple.

Great user experience

On Wed Nov 05 2014 at 12:59:45 AM Shaobo <zerocolar <at> gmail.com> wrote:

IPython-User mailing list
IPython-User <at> scipy.org
IPython-User mailing list
IPython-User <at> scipy.org
Phillip Feldman | 4 Nov 02:04 2014

IPython notebook formatting

When playing with the IPython notebook, I recently discovered by chance that enclosing something in double underscores causes it to be displayed in bold.  I suspect that there are more formatting options that I don't know about.  Is there a place where this sort of thing is documented?

IPython-User mailing list
IPython-User <at> scipy.org
Jack Zentner | 31 Oct 19:56 2014

Non-blocking QT window from the notebook

I've been using the notebook to play around with PySide and in general
everything works beautifully.  From it, I can create arbitrarily complex QT
UIs, launch them and interact with them. However, in playing with PySide I
thought it would be really useful if I could prototype UI elements from the
notebook without having to load and then close the QT window to evaluate and
make changes.  I'm thinking of a non-blocking UI that allows for interactive
building and updating kind of like you can do with matplotlib plots that are
launched from the notebook.  

To try to recreate the matplotlib functionality, I've dug through the
matplotlib src to see how they do it when using a QT backend but I can't
seem to recreate their non-blocking functionality. It seems the basic
matplotlib pattern is to create a QApplication instance, create a
QMainWindow, add a central widget to it, show the main window and run exec_
on the qApp.  However when I implement this pattern it creates a blocking QT
window that won't return control back to the notebook until the window is
closed.  Clearly I'm missing something in how matplotlib is able to create a
non-blocking window.

Does anyone have some insight into how I might achieve a non-blocking QT
window from the notebook?  Or can tell me how matplotlib is able to do this?

Thank you in advance,


View this message in context: http://python.6.x6.nabble.com/IPython-User-Non-blocking-QT-window-from-the-notebook-tp5076285.html
Sent from the IPython - User mailing list archive at Nabble.com.