[IPython-user] cannot paste indented code

frank h. frank.hoffsummer at gmail.com
Wed Jan 4 17:14:29 CST 2006


hello,
i am new to ipython (using it on mac os x)

I cannot seem to be able to paste indented code
below is the transcript of a session where I am trying to paste a
print statement into ipython that has a tab in front of it.
the same problem occurs when the print statement is preceeded with
spaces. it also occurs independent of the editor i am using to copy
from

the line I am pasting:

    print "ho"


the result after copying that line into ipython:
======================================================
$ ipython
Python 2.4.1 (#2, Mar 31 2005, 00:05:10)
Type "copyright", "credits" or "license" for more information.

IPython 0.6.15 -- An enhanced Interactive Python.
?       -> Introduction to IPython's features.
%magic  -> Information about IPython's 'magic' % functions.
help    -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.

In [1]:     print "ho"
Display all 200 possibilities? (y or n)

In [1]:     print "ho"
------------------------------------------------------------
   File "<console>", line 1
     print "ho"
     ^
SyntaxError: invalid syntax


In [2]:



what am i doing wrong? this is surely supposed to work, no?
thanks for any insight you might have
-frank




More information about the IPython-user mailing list