Useful or not, from you.
vscode-python Send selection to REPL should read from stdin instead of sys.argv, or it'll fail on a large file

from @int19h:

We use sys.argv to pass input, which will break if somebody does Ctrl+A and then Send to Terminal on a large file:

  • max command line length on Windows is 32767 characters
  • on linux the max command size (in bytes) is ARG_MAX (its value can be retrieved with getconf ARG_MAX), and any argument must not exceed MAX_ARG_STRLEN (in bytes too)

We should be reading it from stdin instead.

That's a useful answer
Without any help

This should also solve encoding issues on Python 2. As things are, if you try to send this:


you get this:

>>> print('??')