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


在操作,美的很

相关推荐
aqi005 分钟前
15天学会AI应用开发(二十)使用LangChain实现RAG检索功能
人工智能·python·ai编程
-银雾鸢尾-14 分钟前
C#中的协变和逆变
开发语言·c#
阿米亚波14 分钟前
【C++ 异常处理】try-catch
开发语言·c++·笔记·try-catch
本地化文档17 分钟前
skbuild-docs-l10n
python·github·gitcode·sphinx
旖旎夜光23 分钟前
C++(内存管理)
开发语言·c++·学习
≮傷£≯√35 分钟前
QT配置FFmpeg
开发语言·qt·ffmpeg
事缓则圆37 分钟前
从零推导 Python 装饰器:不用背语法,看完这篇就懂了
python
鬼手点金40 分钟前
Hermes‑Agent 使用教程
python·ubuntu·powershell·cmd·ai agent·opencode·hermes
Gu Gu Study43 分钟前
【agent认知】宏观Agent的基本两层架构(Agent Loop与Agent Harness)
python·架构