Skip to content

-wthread breaks indented top-level statements #573

wRAR opened this Issue Jul 13, 2011 · 3 comments

3 participants

wRAR commented Jul 13, 2011

In ipython you can enter statements with leading whitespace and they will be accepted:

In [1]:   1
Out[1]: 1

But if ipython was launched with -wthread, they cause IndentationErrors:

In [1]:   1
IndentationError: unexpected indent (<ipython console>, line 1)
IPython member

Thanks for the bug report, Andrey. All development is now focussed on the imminent release of version 0.11. In fact, we've decided not to handle leading whitespace in the terminal for the time being - the main use case is copying and pasting code, and you can use the %paste magic to correctly handle indentation.

Also, the new Qt console can handle pasted code with leading whitespace, because it's not subject to the limitations of the terminal.

@takluyver takluyver closed this Jul 13, 2011
bshanks commented Jan 19, 2012

+1: i very frequently enter indented lines of code in the terminal over an ssh session, this makes ipython much less useful for me

IPython member

@bshanks : I'm not sure which version you're using, but have you tried %cpaste ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.