Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
SATYADAHAL opened this issue Apr 2, 2023 · 0 comments
Open

Comments

@SATYADAHAL
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants