import rlcompleter,readline readline.parse_and_bind('tab:complete') 转载于:https://www.cnblogs.com/Dev0ps/p/7778613.html