[New-bugs-announce] [issue44879] How to insert newline characters as normal characters while input()?

chen-y0y0 report at bugs.python.org
Tue Aug 10 10:28:16 EDT 2021


New submission from chen-y0y0 <cyy144881 at icloud.com>:

# Ɪ know, if Ɪ press enter key while input(), the method will be completed and return a str value.
# Ɪ am trying to insert newline characters as normal characters while input() method.
# The “normal characters” means:
# 1. It can be deleted by backspace(“\x7b”) or EOF or delete key.
# 2. It can be interprered as a normal byte.
# Ɪ tried by the readline module, it did work. But it may crash, like:
# Traceback (most recent call last):
#   File "<stdin>", line 1, in <module>
# SyntaxError: multiple statements found while compiling a single statement

----------
components: Argument Clinic, FreeBSD, IO, Interpreter Core, Windows
messages: 399327
nosy: koobs, larry, paul.moore, prasechen, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: How to insert newline characters as normal characters while input()?
type: crash
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44879>
_______________________________________


More information about the New-bugs-announce mailing list