Skip to content

Formatting fails when value-to-print is very large #607

Description

@BenWiederhake

Reproduce with:

  • Start bpython (happens in both bpython version 0.15 on top of Python 3.5.1+ /usr/bin/python3 and bpython version 0.15 on top of Python 2.7.11+ /usr/bin/python)
  • Do something that has at least two screenfuls of output when printed. Example: ["Hello"] * 1000

Expected result: boring stuff. Just the printed "value" of a list that contains a thousand "hello"s.

Actual result: The value, and then some formatting related characters that got garbled:

>>> ["Hello"] * 1000
['Hello', 'Hello', 'Hello', 'Hello', 'Hello', 'Hello', 'Hello', 'Hello', 'Hello', 'Hello', 'Hello', 'Hello', 'Hello', 'Hello',
 'Hello', 'Hello', 'Hello', 'Hello', 'Hello', 'Hello', 'Hello', 'Hello', 'Hello', 'Hello', 'Hello', 'Hello', 'Hello', 'Hello',
[... SNIP ...]
 'Hello', 'Hello', 'Hello', 'Hello', 'Hello', 'Hello', 'Hello', 'Hello', 'Hello', 'Hello', 'Hello', 'Hello', 'Hello', 'Hello',
 'Hello', 'Hello', 'Hello', 'Hello', 'Hello', 'Hello']�[-26;1H
>>>

Note the trailing U+001B which smells like formatting gone wrong.

I'm not sure whether this is a bug in xfce4-terminal 0.6.3, bpython, bpython-curtsies, curtsies, or maybe something else entirely. However, bpython is the only program exhibiting this behavior, so I reported it here.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions