Python Forum
How to paste several lines of codes to the Python console
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to paste several lines of codes to the Python console
#1
I'm not sure in which part of the forum to post this (as this is not really code related).

I used to be able to do this until very recently. Now when I try to paste several lines at once I get the error message:
Quote:SyntaxError: multiple statements found while compiling a single statement
My current version of Python is 3.9.0 which might be the version where this behaviour changed. I tried to search the internet about this and it looked like you were never meant to be able to paste several lines at once on the console...?

Being able to paste several lines at once is quite convenient when testing ideas and code snippets, especially since if anything goes wrong you get to investigate directly your variables etc. I feel like I really need this feature, pasting line by line is very time consuming and using trick such as putting everything in a big string and calling exec also feels cumbersome.

Is there some configuration to change this? Is this version related?

For a little of context: I'm using Python on Linux.
Reply


Messages In This Thread
How to paste several lines of codes to the Python console - by 22_alias - Dec-16-2020, 11:05 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Problem with Spyder IDE: Clear console doesn't actually clear the console GalacticStarfish 2 5,616 Sep-03-2017, 09:01 PM
Last Post: dvs1

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020