DOS console control

Alex Martelli aleaxit at yahoo.com
Thu Oct 19 15:09:43 EDT 2000


"Gilles Lenfant" <glenfant at equod.com.nospam> wrote in message
news:8sn6ij$pve$1 at reader1.imaginet.fr...
> Hi everybody,
>
> Does any of you experts know how to have a control of the cursor position,
> text/background colors, clearing screen (...) of a DOS console.
> An additional iint to have a control of the keyboard (ctrl and alt
> modifiers, cursor keys, function keys...) is welcome !
> You'd say "wrong newsgroup". I reply "No, it's in Python".

Running ANSI.SYS makes your DOS console an ANSI terminal, so
you can use ANSI escape codes (e.g. via curses).  I don't think
that works under NT or other Win32's, only under DOS, but, if
it's DOS you want, as you say, then ANSI.SYS is my advice.

If it's not DOS, but win32, then I think the win32api or the calldll
package may let you get at the Win32 Console api's.  But that's
another issue.


Alex






More information about the Python-list mailing list