Curses Python Programming - statusline

Michael Hudson mwh at python.net
Mon Mar 3 16:34:30 CET 2003


Eliran Gonen <eg at rootshell.be> writes:

> Hello!
> 
> I just started messing with curses programming and now I'm trying
> to use a feature which C curses programs use: the statusline.
> 
> I want my program to have a line of text at the bottom of the screen,
> regardless of the size of the terminal like in the 'mutt' mail client.
> 
> Is this possible?

Probably :-)

> I heard several other curses functions that were implemented in C aren't
> implemented in Python.

There's a list of these at the top of Modules/_cursesmodule.c.

> I also saw several C curses programs that use a 'struct' to get the screen
> size - this way they "calculate" the position of the statusline.

The 'getmaxyx()' method on window objects -- in particular the one
returned by initscr() -- would seem to be a good start

Cheers,
M.

-- 
  Enlightenment is probably antithetical to impatience.
                                        -- Erik Naggum, comp.lang.lisp




More information about the Python-list mailing list