windows 10 解决python / ipyhton cmd 不能tab补全
windows 10 解决python cmd 不能tab补全
方法一:
1.1 win+R 输入regedit
1.2输入 regedit 打开注册表,
进入HKEY_LOCAL_MACHINESOFTWAREMicrosoftCommandProcessorCompletionChar
1.3 cmd 输入python 就可以tab补全
方法二: 写一个tab代码放到python模块下
2.1新建一个tab.py文件
代码如下:
# python startup file
import sys
import readline
import rlcompleter
import atexit
import os
# tab completion
readline.parse_and_bind('tab: complete')
# history file
histfile = os.path.join(os.environ['HOMEPATH'], '.pythonhistory')
try:
readline.read_history_file(histfile)
except IOError:
pass
atexit.register(readline.write_history_file, histfile)
del os, histfile, readline, rlcompleter
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
2.2 cmd中import sys, sys.path找到python存放默认模块的路径
2.3将第一步写好的tab.py文件放到默认模块路径下
2.4 cmd 输入python 就可以tab补全
windows 10 解决ipython cmd 不能tab补全
1.1下载该文件就好了
pip install --upgrade jedi==0.17.2
- 1
推荐阅读