list of subwindows(curses)

Mike Rovner mike at bindkey.com
Mon Dec 2 13:27:01 EST 2002


"rabbits77" <rus20376 at NO_SPAMsalem.mass.edu> wrote in message
news:rus20376-F8496D.18503801122002@[10.1.1.174]...
> When I do the following on a single subwindow called field this works.
> When I try to create multiple subwindows in a list nothing happens.
> Why? Any help is much appreciated!!
> Here is the code which does nothing
>         numFields=7
>         i=0
>         while (i < numFields):
>                 field[i]=curses.newwin(2,2,1,i+4)
>                 field[i].addstr("H")
>                 field[i].refresh()
>                 i=i+1
> --

Have you initialized field with
    field= [None] * numFields
?








More information about the Python-list mailing list