开发者

python help() function shortcuts

What are shortcuts of Python help() function used in Pytho开发者_运维知识库n interpreter?

I'm interested for help content that doesn't fit to window and shows "-- More --" at the bottom. I found q quits help(). What is a shortcut to show the whole article w/o pressing Enter many times?


On my (Linux) machine help seems to be using "less". Press "h" when in help to see a complete list of shortcuts/commands. I'm not sure if this will work on Windows though.


The help() function in Python interactive interpreter is based on the pydoc module. There's a function called getpager() in this module that decides what to use to display the help depending on various factors.

In most cases it will use the less command on Linux and more on Windows.


One shortcut is the space bar - it displays the next page of the help text (instead of the next line like Enter).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜