profile
viewpoint

Ask questionsSend 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.

microsoft/vscode-python

Answer questions int19h

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

print('🔨')

you get this:

>>> print('??')
??
useful!
source:https://uonfu.com/
Github User Rank List