[Tutor] Curses example on Linux?

Danny Yoo dyoo at hkn.eecs.berkeley.edu
Mon Aug 8 20:27:02 CEST 2005



On Mon, 8 Aug 2005, Hossein Movahhedian wrote:

>    I have copied the following example from "Learning to Program by Alan
>  Gauld (section: Event Driven Programming)". To run it on Linux
>  (Redhat 8.0; Python 2.4) the tutorial says to replace 'msvcrt'
>  with 'curses.stdscr'.


Hi Hossein,


According to:

    http://www.amk.ca/python/howto/curses/


Alan probably meant to say to replace:

######
import msvcrt
######

with:

######
import curses
msvcrt = curses.initscr()
######

as a quick hack to replace 'msvcrt' with something that works on Linux.


It sounded that you wanted to look at other examples of curses
programming?  A long time ago, I wrote a quick-and-dirty demo program that
uses curses here:

    http://hkn.eecs.berkeley.edu/~dyoo/python/circularwriting.py


Good luck to you!



More information about the Tutor mailing list