Why is there no platform independent way of clearing a terminal?

Tim Harig usernet at ilthio.net
Tue Jul 27 17:12:50 EDT 2010


On 2010-07-27, John Nagle <nagle at animats.com> wrote:
> On 7/27/2010 7:44 AM, Bruno Desthuilliers wrote:
>> Grant Edwards a écrit :
>>> On 2010-07-27, Bruno Desthuilliers
>>> <bruno.42.desthuilliers at websiteburo.invalid> wrote:
>>>> Daniel Fetchinson a ?crit :
>> (snip)
>>>>> Why was clearing a terminal left out?
>>>>>
>>>> What you're talking about is a shell, not a terminal (a terminal is a
>>>> physical device).
>>>
>>> No, what he's talking about is clearing a terminal (or a terminal
>>> emulator). They both work the same, the only difference is whether
>>> the terminal software is running on dedicated hardware or on
>>> general-purpose hardware.
>>
>> (snip)
>>
>> I stand corrected.
>
>      I immediately thought of using the "curses" module, but that's
> UNIX-only, or at least it's not in the ActiveState Python distro.

pdcurses:

	http://pdcurses.sourceforge.net/

is a cross platform curses implementation that is available for Windows.
I wonder how difficult it would be to embed into the Python curses module
as a backup for systems where curses is not natively available.  This would
allow Python to provide cross platform charactor mode manipulation.



More information about the Python-list mailing list