Color, "DOS" programs, locate...

Alan Gauld alan.gauld at gssec.bt.co.uk
Fri Jul 28 12:22:43 EDT 2000


Jim Hribar wrote:
> Where can I get information on using Python for text based programs,
> specifically formatting the screen, changing colors, etc.  

In DOS mode you need to write ANSI control codes to the screen

> I'm using Python for Windows. 

If you want to do it in real windows you need the winall package
and use the MFC GDI capability in the Windows API. - Thats hard!

Alternatively use Tkinter which has seveal ways to display text.

See my online tutor for some examples. Look at the end of the
event driven chapter and also the end of the case study. Then
check the Tkinter documentation on the Python web site for
details of setting color.

http://www.crosswinds.net/~agauld/

> I saw something called the "curses" module, but doesn't seem to
> be for Windows.

There is a DOS version but you don't want it, Tkinter 
is your best bet. IMHO...

Alan G

-- 
=================================================
This post represents the views of the author 
and does not necessarily accurately represent 
the views of BT.



More information about the Python-list mailing list