Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

bpython (master) dies on underscore input: #488

Copy link
Copy link

Description

@amorozov
Issue body actions

I've just installed bpython from master and now sometimes experience crashes like this (I tried to start typing __init__ method):

>>> class Test(str):
...     def 
Traceback (most recent call last):
    File "/home/work/users/alex/DispatchersTests/Tests/bin/bpython", line 9, in <module> load_entry_point('bpython==0.15.dev43', 'console_scripts', 'bpython')()
    File "/home/work/users/alex/DispatchersTests/Tests/lib/python2.7/site-packages/bpython/curtsies.py", line 81, in main
        interactive=(not exec_args))
    File "/home/work/users/alex/DispatchersTests/Tests/lib/python2.7/site-packages/bpython/curtsies.py", line 182, in mainloop
        process_event(e)
    File "/home/work/users/alex/DispatchersTests/Tests/lib/python2.7/site-packages/bpython/curtsies.py", line 150, in process_event
        array, cursor_pos = repl.paint()
    File "/home/work/users/alex/DispatchersTests/Tests/lib/python2.7/site-packages/bpython/curtsiesfrontend/repl.py", line 1283, in paint
        self.matches_iter.completer.format if self.matches_iter.completer else None)
    File "/home/work/users/alex/DispatchersTests/Tests/lib/python2.7/site-packages/bpython/curtsiesfrontend/replpainter.py", line 170, in paint_infobox
        if matches else []) +
    File "/home/work/users/alex/DispatchersTests/Tests/lib/python2.7/site-packages/bpython/curtsiesfrontend/replpainter.py", line 68, in matches_lines
        for i in range(0, len(matches), words_wide)]
    File "/home/work/users/alex/DispatchersTests/Tests/lib/python2.7/site-packages/curtsies/formatstring.py", line 253, in join
        for i, s in enumerate(iterable):
    File "/home/work/users/alex/DispatchersTests/Tests/lib/python2.7/site-packages/bpython/curtsiesfrontend/replpainter.py", line 67, in <genexpr>
        for m in matches[i:i+words_wide])
    File "/home/work/users/alex/DispatchersTests/Tests/lib/python2.7/site-packages/curtsies/formatstring.py", line 615, in fmtstr
        string = FmtStr.from_str(string)
    File "/home/work/users/alex/DispatchersTests/Tests/lib/python2.7/site-packages/curtsies/formatstring.py", line 169, in from_str
        return FmtStr(Chunk(s))
    File "/home/work/users/alex/DispatchersTests/Tests/lib/python2.7/site-packages/curtsies/formatstring.py", line 70, in __init__
        raise ValueError("unicode string required, got %r" % string)

curtsies-0.2.2, python-2.7.8. Likely it's related to the recent "unicode" commit and support of curtsies >= 0.2.0.

Also I should note that in the default curtsies frontend Home and End keys don't work in several different terminals (konsole, gnome-terminal, both use TERM=xterm) (C-a & C-e do)

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.