Skip to content

Moving cursor to some position exits the program with Assertion Error. #985

Open
@SATYADAHAL

Description

@SATYADAHAL

Code:

import sys
sys.stdout.write("\033[1;1H")

Output:

Welcome to bpython! Press <F1> for help.                                                                                                                       
Traceback (most recent call last):
  File "/home/spd/.local/bin/bpython", line 8, in <module>
    sys.exit(main())
  File "/home/spd/.local/lib/python3.10/site-packages/bpython/curtsies.py", line 248, in main
    repl.mainloop(True, paste)
  File "/home/spd/.local/lib/python3.10/site-packages/bpython/curtsies.py", line 178, in mainloop
    self.process_event_and_paint(e)
  File "/home/spd/.local/lib/python3.10/site-packages/bpython/curtsies.py", line 151, in process_event_and_paint
    array, cursor_pos = self.paint()
  File "/home/spd/.local/lib/python3.10/site-packages/bpython/curtsiesfrontend/repl.py", line 1782, in paint
    assert cursor_row >= 0 and cursor_column >= 0, (
AssertionError: (-1, 152, '\x1b[1;1H>>> ', '', 0)

Isn't cursor movement available in the bpython shell?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions