curses: x, y positioning
Tim Roberts
timr at probo.com
Sun Sep 16 22:41:59 EDT 2007
7stud <bbxx789_05ss at yahoo.com> wrote:
>I can't see to get any y, x coordinates to work with curses. Here is
>an example:
>
>import curses
>
>def my_program(screen):
> while True:
> ch = screen.getch()
> if ch == ord("q"):
> break
> if ch <= 255:
> screen.addstr(30, 10, "*%s*" % chr(ch))
> screen.refresh()
>
>curses.wrapper(my_program)
Don't you want mvaddstr? (And remember that y comes first.)
--
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the Python-list
mailing list