PythonScript icon indicating copy to clipboard operation
PythonScript copied to clipboard

[Feature] Be able to paste multiple lines at once at the >>> prompt

Open alankilborn opened this issue 1 year ago • 4 comments

Consider these lines of text in a Notepad++ tab:

a=3
b=4
c=5

I'd like to be able to select these lines, copy them via Ctrl+c, move input focus to the PythonScript console window's >>> prompt box, and paste via Ctrl+v, with the intention that when I press Enter after that, all three of these lines would be executed, one after the other.

Currently when I attempt to paste those lines, all that gets placed in the prompt box is a=3.

Behavior current to the 3.019 pre-release.

alankilborn avatar Nov 13 '24 16:11 alankilborn

And I assume that the prompt field should be empty afterwards and have the input focus?

Ekopalypse avatar Dec 27 '24 14:12 Ekopalypse

And I assume that the prompt field should be empty afterwards and have the input focus?

Well, someone (Yaron10, I believe) came up with "interesting" behavior for what should appear in the prompt box and when, and it was adopted, but IMO it is fubared, so... I don't know how to answer your question. :-)

EDIT: But the >>> box should have input focus afterward

alankilborn avatar Dec 27 '24 14:12 alankilborn

But it is your feature request and from my point of view something completely different than writing something manually in the prompt box, so I think this can/should work according to your own criteria. From my point of view, I would use this kind of mechanism if I want to test something against constant values, but don't want to run the script over and over again, just the function that manipulates those values.

Ekopalypse avatar Dec 27 '24 15:12 Ekopalypse

It's a minor feature request, I guess. I probably made the request when I wanted to do exactly what the opening comment of this issue says.

In general, I think the >>> box input has bigger problems. I cringe whenever I do something where the Python interpreter thinks I need to supply a second line to something.

alankilborn avatar Dec 27 '24 15:12 alankilborn