This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients dtrodrigues, fxcoudert, gregory.p.smith, hroncok, petr.viktorin, twouters, vstinner
Date 2021-02-15.10:07:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1613383676.37.0.494898727306.issue42819@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-02-15 10:07:56vstinnersetrecipients: + vstinner, twouters, gregory.p.smith, petr.viktorin, hroncok, fxcoudert, dtrodrigues
2021-02-15 10:07:56vstinnersetmessageid: <1613383676.37.0.494898727306.issue42819@roundup.psfhosted.org>
2021-02-15 10:07:56vstinnerlinkissue42819 messages
2021-02-15 10:07:55vstinnercreate