Implement a clear() function directly into Python so that os doesn't have to be imported and become overkill for a project
未关闭
还没有人认领这个 Issue。
interpreter-core
type-feature
- 主要语言
- Python
- 星标
- 77.2k
- 派生
- 36k
- 平均合并
- 1 天 9 小时
- 30 天内合并 PR
- 558
描述
Feature or enhancement
OS shouldn't need to be imported whenever you need to clear the screen. Why not just make a built-in Python function to clear the screen
Pitch
It should be able to be executed using a simple function such as clear() or cls(). It can be done for any OS using os.system('cls||clear')
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
未指定任何 CPython 源文件或测试。首先调查内置函数和跨平台终端行为是如何处理的,并以提出的 os.system('cls||clear') 方法作为背景。只有确定了 clear() 或 cls() API,并定义了各操作系统上的行为,才算完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- cli, operating-systems
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 30/100