Q: How does one 'page' through auto-complete results (whether it's a list of modules, classes, functions, or a doc string)? ...

50 views
Skip to first unread message

Noelle Milton Vega

unread,
Jul 6, 2014, 10:21:00 PM7/6/14
to bpy...@googlegroups.com
Hello Friends:

This question must have been asked but I can't find the answer to it in the documentation or via search.
Maybe I'm just not searching with the right terms. :-/

See the attached screen shot. Notice that the auto-complete output is truncated (as necessary due to
space limitation, of course).

How does one 'page' through auto-complete results (backwards and forwards preferably)
whether the auto-complete represents a list of modules, classes, functions, or a doc string?

How do to this?

Thank you! =:)

NMV
2.png

Thomas Ballinger

unread,
Jul 6, 2014, 10:35:12 PM7/6/14
to bpy...@googlegroups.com
It's not currently implemented - seems like it'd be useful though - someone else asked me this last week.

Have keybinds to suggest? Would you expect your current match to update as you scrolled up and down, or remain offscreen (and therefore not visible)? 

As a workaround, the way to accomplish this right now would be a good old dir(np) and then F9 to page through these results. (or your terminal's native scrolling with bpython-curtsies or page-up/page-down with bpython-urwide) You might be able to undo (ctrl-R) then to get rid of this space taken up by the dir command.

Alternatively, you could use help(np), which doesn't exactly do the same thing - but does show up in a page by default.


--
You received this message because you are subscribed to the Google Groups "bpython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bpython+u...@googlegroups.com.
To post to this group, send email to bpy...@googlegroups.com.
Visit this group at http://groups.google.com/group/bpython.
For more options, visit https://groups.google.com/d/optout.

Noelle Milton Vega

unread,
Jul 7, 2014, 9:55:04 AM7/7/14
to bpy...@googlegroups.com
Hi Thomas:

Thank you.


>> Have keybinds to suggest? Would you expect your current match to update as you scrolled up and down, or remain offscreen (and therefore not visible)?
>>
Let me defer on this for a now as it usually requires carefully considered UI/UX thought. =:)

>> ... or your terminal's native scrolling with bpython-curtsies or page-up/page-down with bpython-urwide
>>
Ah okay: I wasn't aware of the existence of 'urwid' and 'curtsies' terminal wrappers (nor of the provided 'bpython-urwid' or
'bpython-curtsies' wrapper scripts that employ them. I just found those in '~/.local/bin' after reading your note below).

Feedback on a quick test of each:
 (1) I found that bpython-urwid doesn't work for python3.3 (so I won't be able to use that one until resolved).
A quick Google confirmed this: https://bitbucket.org/bobf/bpython/issue/243/bpython-urwid-fails-with-python-331

(2) bpython-curtsies works for python2 and python3.

For both terminal 'Terminator' and KDE 'Konsole' I wasn't able to figure out how to scroll through auto-completed
output (urwid or curtsies). But I haven't looked deeply into it either (it was a quick check). I tried Page-Up/Page-Down, but to no avail.
Perhaps I have to set something up for that to work (environment variable or preferences). If anyone has any tips
on that, that would be grand and appreciated.

Thank you! =:)

Thomas Ballinger

unread,
Jul 8, 2014, 12:58:49 PM7/8/14
to bpy...@googlegroups.com
Sorry, I was unclear - scrolling doesn't work for autocompletion entries, it's just that normal scrolling works (differently in each frontend), so you could run the command 
>>> dir(module_or_object)
and scroll through the output of that command.

In bpython, use the pager key (F9 by default) to look through outputs greater than a whole screen
In bpython-curtsies, use native terminal scrolling.
In bpython-urwid, use page-up and page-down.

I'm particularly interested in feedback on bpython-curtsies, because after a bit more work it may become the primary bpython (what you get when you type "bpython")

Tom

--
Reply all
Reply to author
Forward
0 new messages