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


在操作,美的很

相关推荐
Data_agent1 分钟前
1688获得1688店铺详情API,python请求示例
开发语言·爬虫·python
妖灵翎幺30 分钟前
C++ 中的 :: 操作符详解(一切情况)
开发语言·c++·ide
Halo_tjn1 小时前
虚拟机相关实验概述
java·开发语言·windows·计算机
star _chen1 小时前
C++实现完美洗牌算法
开发语言·c++·算法
周杰伦fans1 小时前
pycharm之gitignore设置
开发语言·python·pycharm
weixin_462446232 小时前
【原创实践】python 获取节假日列表 并保存为excel
数据库·python·excel
计算机毕设匠心工作室2 小时前
【python大数据毕设实战】全球大学排名数据可视化分析系统、Hadoop、计算机毕业设计、包括数据爬取、数据分析、数据可视化、机器学习、实战教学
后端·python·mysql
别叫我->学废了->lol在线等2 小时前
演示 hasattr 和 ** 解包操作符
开发语言·前端·python
VX:Fegn08952 小时前
计算机毕业设计|基于Java人力资源管理系统(源码+数据库+文档)
java·开发语言·数据库·vue.js·spring boot·后端·课程设计
free-elcmacom2 小时前
机器学习入门<6>BP神经网络揭秘:从自行车摔跤到吃一堑长一智的AI智慧
人工智能·python·深度学习·神经网络·机器学习