Windows Python 指令补全方法

网络上搜集的补全代码

python 复制代码
# 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

保存成文件导入到 python 库的路径下就可以
先导入初始化


在操作,美的很

相关推荐
cnxy1881 小时前
围棋对弈Python程序开发完整指南:步骤1 - 棋盘基础框架搭建
开发语言·python
落叶,听雪1 小时前
河南建站系统哪个好
大数据·人工智能·python
极客小云2 小时前
【生物医学NLP信息抽取:药物识别、基因识别与化学物质实体识别教程与应用】
python·机器学习·nlp
南_山无梅落2 小时前
12.Python3函数基础:定义、调用与参数传递规则
python
程序员-周李斌2 小时前
Java 死锁
java·开发语言·后端
JasmineWr3 小时前
CompletableFuture相关问题
java·开发语言
零雲3 小时前
java面试:知道java的反射机制吗
java·开发语言·面试
Jeremy爱编码3 小时前
实现 Trie (前缀树)
开发语言·c#
laocooon5238578863 小时前
插入法排序 python
开发语言·python·算法
你的冰西瓜4 小时前
C++中的list容器详解
开发语言·c++·stl·list