Message386994
https://lists.gnu.org/archive/html/bug-readline/2020-11/msg00010.html
says that bracketed mode is turned off if the terminal type is "dumb".
Setting TERM env var to dumb gives me a surprising behavior when I paste "1+1\n2+2" in Python REPL:
---
$ TERM=dumb python3
Python 3.9.1 (default, Jan 20 2021, 00:00:00)
>>> ^J1+1^J2+2^J
---
If I press ENTER, I get:
---
>>> ^J1+1^J2+2^J
File "<stdin>", line 1
1+1
2+2
^
SyntaxError: multiple statements found while compiling a single statement
>>>
---
Note: if I redirect Python output into a file ("python3 > output"), I get a different behavior since stdout is no longer a TTY. |
|
Date |
User |
Action |
Args |
2021-02-15 10:07:56 | vstinner | set | recipients:
+ vstinner, twouters, gregory.p.smith, petr.viktorin, hroncok, fxcoudert, dtrodrigues |
2021-02-15 10:07:56 | vstinner | set | messageid: <1613383676.37.0.494898727306.issue42819@roundup.psfhosted.org> |
2021-02-15 10:07:56 | vstinner | link | issue42819 messages |
2021-02-15 10:07:55 | vstinner | create | |
|