Skip to content

Commit

Permalink
[demo] Test out long prompt with plain Python module
Browse files Browse the repository at this point in the history
Calling raw_input() doesn't exhibit the bug - it erases the prompt
correctly

Related to issue #2081
  • Loading branch information
Andy C committed Sep 27, 2024
1 parent 8e17502 commit 14e91b3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion demo/cpython/readline_mod.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,15 @@


def main(argv):
try:
prompt_str = argv[1]
except IndexError:
prompt_str = '! '
import os
readline.parse_and_bind("tab: complete")
print('PID %d' % os.getpid())
while True:
x = raw_input('! ')
x = raw_input(prompt_str)
print(x)


Expand Down

0 comments on commit 14e91b3

Please sign in to comment.