本文整理汇总了Python中rlcompleter.html方法的典型用法代码示例。如果您正苦于以下问题:Python rlcompleter.html方法的具体用法?Python rlcompleter.html怎么用?Python rlcompleter.html使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类rlcompleter
的用法示例。
在下文中一共展示了rlcompleter.html方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: configureCompletion
# 需要导入模块: import rlcompleter [as 别名]
# 或者: from rlcompleter import html [as 别名]
def configureCompletion(self) -> None:
try:
from jedi.utils import setup_readline
setup_readline()
except ImportError:
# Fallback to the stdlib readline completer if it is installed.
# Taken from http://docs.python.org/2/library/rlcompleter.html
runtime.ui.info("jedi is not installed, falling back to readline"
" for completion")
try:
import readline
import rlcompleter
readline.parse_and_bind("tab: complete")
except ImportError:
runtime.ui.info("readline is not installed either."
" No tab completion is enabled.")