我正在使用InteractiveShellEmbed
fromIPython.terminal.embed
在我的应用程序中嵌入 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()