[IPython-User] "Unexpected indent" when using ipython -wthread
Alvaro Collet
acollet@cs.cmu....
Tue Jul 6 12:11:17 CDT 2010
Hi,
I am having a problem with "Unexpected indents" in ipython 0.10. It
works well with regular ipython, but as soon as I add the -wthread or
-pylab options, it does not let me type any indented commands.
Example 1
---------
If I execute an iPython terminal normally:
$ ipython
Python 2.5.2 (r252:60911, Jul 22 2009, 15:35:03)
Type "copyright", "credits" or "license" for more information.
IPython 0.10 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.
In [1]: print 'hello, world!'
...:
hello, world!
In [2]:
Example 2
---------
Now, if I execute it with -wthread (same behavior with -pylab):
$ ipython -wthread
Python 2.5.2 (r252:60911, Jul 22 2009, 15:35:03)
Type "copyright", "credits" or "license" for more information.
IPython 0.10 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.
In [1]: print 'hello, world!'
------------------------------------------------------------
IndentationError: unexpected indent (<ipython console>, line 1)
In [2]:
What am I doing wrong? The indentation issue is really annoying if I'm
trying to copy and paste some commands (from a larger script) into
ipython.
I am using Ubuntu 8.04, but have observed the same behavior in ubuntu
10.04 (fresh install).
Thanks,
Alvaro
More information about the IPython-User
mailing list