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
#7
This happen for any code i'd paste, even the most trivial one, so I don't think it's a problem with the syntax, for example:
print('a')
i = 1
doesn't work. The weird thing is:
- copypasting with an empty line at the beginning gives the error (which is what usually happens when i select code)
- copypasting with no empty line only execute the first line (i is not defined, also apparent when pasting two "print" instructions)

When pasted, the code is highlighted and i need to press enter, it wasn't like that when I used to copy paste several lines and it worked (I've been doing this for a long time before that, including or not including an empty line in the paste, all the code was executed and not just the first line, also the pasted code was not highlighted as it is now)

I'll try the breakpoint() thing for debugging, thanks for the suggestion.

Added: so maybe that's just either some configuration or a compilation option that changed for the version available on my Linux distribution?
Reply


Messages In This Thread
RE: How to paste several lines of codes to the Python console - by 22_alias - Dec-16-2020, 04:07 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Problem with Spyder IDE: Clear console doesn't actually clear the console GalacticStarfish 2 6,573 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