Skip to content

Output not visible inside IPython notebook #52

@takluyver

Description

@takluyver

When ipdb.set_trace() is called, it calls this function:

def update_stdout():
    # setup stdout to ensure output is available with nose
    io.stdout = sys.stdout = sys.__stdout__

This results in output being written back to the terminal where the notebook was launched, instead of appearing in the notebook itself. It will do the wrong thing in any context where you want the output to be redirected. Commenting out the call to this function makes it behave as expected.

I'm not sure what's the right heuristic to guess whether output should be redirected or not.

Reported as ipython/ipython#5247.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions