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 库的路径下就可以
先导入初始化


在操作,美的很

相关推荐
RSABLOCKCHAIN1 小时前
AI Agents in LangGraph-2
人工智能·python
WA内核拾荒者2 小时前
WhatsApp 账号异常检测的自动化告警系统设计
数据库·python·自动化
码流怪侠3 小时前
【GitHub】Bend:让 GPU 并行编程像写 Python 一样简单
python·github
魔力女仆3 小时前
分享一个 JS 鼠标跟随贪吃蛇背景库
开发语言·javascript·计算机外设
2401_894915534 小时前
GEO 搜索优化完整源码从零部署:环境配置、集群搭建全流程
开发语言·python·tcp/ip·算法·unity
麻瓜老宋4 小时前
AI开发C语言应用按步走,表达式计算器calc的第二十二步,分号赋值链式修复、TOKEN_ASSIGN
c语言·开发语言·atomcode
zhiSiBuYu05175 小时前
Python3 模块开发与应用实战指南
python
颜x小6 小时前
[C#] C++与c#语法对比
开发语言·c++·c#
databook6 小时前
用方差阈值过滤掉“惰性特征”
python·机器学习·scikit-learn