urwid / urwid/urwid

Curses Screen on pypy messes up LineBox

Open
#134 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
3k
Forks
344
Avg merge
2h 5m
Merged PRs (30d)
79

Description

LineBox on the curses screen in PyPy looks funny:

linebox-wonky

The easiest way I've found to reproduce this with core Urwid is to hack the terminal.py example to use the curses screen:

diff --git a/examples/terminal.py b/examples/terminal.py
index 18edba1..f709131 100755
--- a/examples/terminal.py
+++ b/examples/terminal.py
@@ -43,9 +43,11 @@ def main():

     urwid.connect_signal(term, 'title', set_title)
     urwid.connect_signal(term, 'closed', quit)
+    from urwid.curses_display import Screen

     loop = urwid.MainLoop(
         mainframe,
+        screen=Screen(),
         handle_mouse=False,
         unhandled_input=handle_key)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with examples/terminal.py and its use of urwid.curses_display.Screen, then reproduce the LineBox rendering problem under PyPy using the shown change. Trace the curses screen path involved in drawing LineBox and compare its output with the expected rendering. Done means the LineBox displays correctly on the curses screen under PyPy.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.