Skip to content

click.echo() and click.secho() failed under ipython notebook #840

@berniey

Description

@berniey

I am using ipython notebook to run some of the terminal based code I wrote and found click.echo() and click.secho() will failed...

Any suggestion for a quick fix?

import click
click.echo('hello')

---------------------------------------------------------------------------
UnsupportedOperation                      Traceback (most recent call last)
<ipython-input-3-f575ef2d5c44> in <module>()
----> 1 click.echo('hello')

~/.virtualenvs/bernardyue.com/lib/python3.6/site-packages/click/utils.py in echo(message, file, nl, err, color)
    257 
    258     if message:
--> 259         file.write(message)
    260     file.flush()
    261 

UnsupportedOperation: not writable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions