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


在操作,美的很

相关推荐
gCode Teacher 格码致知1 小时前
Pandas教学-18:number与numeric的区别
python·pandas
梦想不只是梦与想4 小时前
Python 中subprocess 模块:执行外部命令
python·subprocess·调用外部命令
懂点Tech4 小时前
ctfshow MISC入门图片篇(信息附加):misc41解题思路
开发语言·python
catchadmin5 小时前
PHP 8.7 协程新提案 让跨协程代码共享请求身份
开发语言·php
念何架构之路6 小时前
go-grpc设计思想
开发语言·后端·golang
酷炫码神6 小时前
Day 10|Pinia 状态管理:把散落在各组件的数据,收进一个全局仓库
android·开发语言·javascript
Elastic 中国社区官方博客7 小时前
我们如何通过 70 多个拉取请求,将 OpenTelemetry Java agent 迁移到 invokedynamic
java·大数据·开发语言·elasticsearch·搜索引擎·全文检索·es
tyn1887 小时前
记录本地安装nacos服务的方法及异常
java·开发语言
步行cgn8 小时前
Spring MVC 视图机制的核心接口与类
java·开发语言·后端·spring·mvc
传奇开心果编程8 小时前
【Rust入门练中学】第5课:引用与借用
开发语言·rust·引用·编程语言理论·通用编程语言·借用