【发布时间】:2017-04-27 17:15:21
【问题描述】:
我正在使用IPython.terminal.embed 中的InteractiveShellEmbed 将IPython 嵌入到我的应用程序中。一切正常,但自动完成不适用于模块。例如:import rand[TAB] 未完成到 import random。
我该怎么做才能解决这个问题?
我的代码:
# -*- coding: utf-8 -*-
#!/usr/bin/env python
def main():
from IPython.terminal.embed import InteractiveShellEmbed
ipshell = InteractiveShellEmbed(banner1 = 'Loading\n',
exit_msg = 'Leaving')
ipshell('Hit Ctrl-D to exit interpreter.\n')
if __name__ == "__main__":
main()
【问题讨论】:
标签: python autocomplete ipython interactive-shell