[issue43432] Add function `clear` to the `os` module

2021-03-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If you write a flexible Text ui program, you should use functions provided by a text ui library which you use to clear the screen or a part of screen. If you want to call an external command, use os.system(), os.popen() or more flexible subprocess module.

[issue43432] Add function `clear` to the `os` module

2021-03-08 Thread parsa mpsh
parsa mpsh added the comment: Well, some times we are writing a flexible Text ui program. we may use `clear` lot of times. This should be used when we haven't any valuable data on the screen. Also, who that uses this function, knows this will clear valuable data :). Sometimes also i use this

[issue43432] Add function `clear` to the `os` module

2021-03-08 Thread Eryk Sun
Eryk Sun added the comment: The idea of adding some kind of clear_screen() function in the os or shutil module was discussed extensively on python-ideas a few months ago: https://mail.python.org/archives/list/python-id...@python.org/thread/EWQ2BOL3WVZAU2V2MT3HLXN3AEBHANNZ https://mail.python.

[issue43432] Add function `clear` to the `os` module

2021-03-08 Thread parsa mpsh
Change by parsa mpsh : -- keywords: +patch pull_requests: +23550 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24784 ___ Python tracker ___ _

[issue43432] Add function `clear` to the `os` module

2021-03-08 Thread parsa mpsh
New submission from parsa mpsh : I wanna add a new function named `clear` to the os module. This function runs the `clear` command in the os. but this function checks that is os windows, if yes, runs `cls`. I'm working on my patch. -- components: Library (Lib) messages: 388262 nosy: par