[Tutor] Interpreter pasting Question

Alan Gauld alan.gauld at yahoo.co.uk
Fri Dec 28 07:52:06 EST 2018


On 28/12/2018 05:58, Avi Gross wrote:
> This is a serious question. I have tried things and searched and remain
> stumped. It is about python and perhaps just the interpreter.
> 
> Copying and pasting multiple lines into the interpreter fails in mysterious
> ways, unless they are a logical single entity.

That will depend on the interpreter. Which one are you using?

> Is there a way to change this behavior, or perhaps an editor/environment
> that feeds multiple lines more carefully to the interpreter?

IDLE does what you say but IDLEX accepts multiple lines.

The vanilla command line >>> accepts multiple lines (on Linux at least)

PyCharm has multiple options for how it processes pasted lines/blocks.

There are even IDEs that will evaluate/execute selected text
without the need to paste.

It all depends on the tool.



-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list