Python like the old-time batch files.

Michal Wallace sabren at manifestation.com
Thu Jan 31 13:52:35 EST 2002


On Thu, 31 Jan 2002, MDK wrote:

> I was thinking back to years ago when I wrote batch files
> and I was able to make these real nice double-line
> borders, change the color of things, and, one of my
> favorite things, move the cursor up, down, left, or right
> in order to write text or put lines anywhere.
>
> In Windows when I double click on a Python.py file it runs
> in a DOS-like box.  Is it possible in Python to make those
> neat double-line borders, change colors, and move the
> cursor to the exact position you want?


I don't see why not. :) You'd probably have to hunt down a
modern equivalent of ANSI.sys. Looks like there are a few
here:

       http://www.computerhope.com/ansisys.htm


It looks like there are at least two ansi related python
modules, too:

   http://www.vex.net/parnassus/apyllo.py?find=ansi


As someone already mentioned, you can also use the curses
library. It's quite a bit higher-level than ANSI, and runs
on *nixes too.


Cheers,

- Michal   http://www.sabren.net/   sabren at manifestation.com
------------------------------------------------------------
Give your ideas the perfect home: http://www.cornerhost.com/
 cvs - weblogs - php - linux shell - perl/python/cgi - java
------------------------------------------------------------





More information about the Python-list mailing list