[IPython-dev] Regression in .embed()

Ondřej Čertík ondrej.certik@gmail....
Fri Aug 3 13:19:15 CDT 2012


Hi,

Before this commit:

b70ac127e2c3698ea643b15af7d6bb5783ff3e7e is the first bad commit
commit b70ac127e2c3698ea643b15af7d6bb5783ff3e7e
Author: Bradley M. Froehle <brad.froehle@gmail.com>
Date:   Wed Jul 4 15:02:21 2012 -0700

    embed(): Default to the future compile flags of the calling frame.


This is how things used to work in Qsnake (http://qsnake.com/):

$ qsnake
----------------------------------------------------------------------
| Qsnake Version 0.9.12, Release Date: May 7, 2011                   |
| Type lab() for the GUI.                                            |
----------------------------------------------------------------------

In [1]: 4 / 3.
Out[1]: 1.3333333333333333


After that commit, this is how it works now:


$ qsnake
----------------------------------------------------------------------
| Qsnake Version 0.9.12, Release Date: May 7, 2011                   |
| Type lab() for the GUI.                                            |
----------------------------------------------------------------------

In [1]: 4 / 3.
TypeError: unsupported operand type(s) for |: 'NoneType' and 'int'



Here is how I call .embed():

    banner = "..."
    namespace = {"lab": run_lab}
    c = IPython.config.loader.Config()
    c.InteractiveShell.confirm_exit = False
    IPython.frontend.terminal.embed.InteractiveShellEmbed(config=c,
            user_ns=namespace, banner1=banner).mainloop(local_ns={})


Would anyone know what the problem is?

Many thanks,
Ondrej


More information about the IPython-dev mailing list