[IPython-dev] How to paste large code text using %cpaste in ipython?

Thomas Kluyver takowl at gmail.com
Wed Oct 1 13:03:20 EDT 2014


Hi Oren,

We have very limited control over what happens when you paste in the
terminal, because it looks just like that text is being typed in very
quickly. I can't see how that would cause the symptoms you describe, though.

Thomas

On 1 October 2014 04:35, Oren <oren.a4 at gmail.com> wrote:

> I am having the same problem as the one described in the following link
>
>
>
> http://stackoverflow.com/questions/23765349/how-to-paste-large-code-text-using-cpaste-in-ipython
>
> "I'm trying to paste code into ipython using %cpaste, but whenever the
> pasted code is too large (almost 100-150 lines of code), it stops actually
> reading the input buffer and therefore gives me an error similar to:
>
>   File "<ipython-input-2-f23a5343110f>", line 133
>     return(SyntaxError: unexpected EOF while parsing
>
> If it matters, I'm using a bash inside an emacs and running ipython3 -i from
> there.
>
> *EDIT:* interestingly if I paste half of the code, hit enter, paste the
> second half, press enter, then --, then enter, it processes it properly.
>
> "
>
> Is there a way to fix it?
>
> Thank You,
> Oren.
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20141001/d3bbc226/attachment.html>


More information about the IPython-dev mailing list