7stud wrote:
> However, now I am having a problem trying to set the color of the text
> that is output:
import curses
def example(screen):
if curses.has_colors():
curses.init_pair(1, curses.COLOR_GREEN, curses.COLOR_BLACK)
curses.init_pair(2, curses.COLOR_YELLOW, curses.COL
On Sep 17, 9:50 am, 7stud <[EMAIL PROTECTED]> wrote:
> Ok. This works:
>
> import curses
> import curses.wrapper
Oops. That second import statement isn't necessary.
--
http://mail.python.org/mailman/listinfo/python-list
On Sep 17, 7:21 am, 7stud <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Thanks for the response.
>
> On Sep 16, 8:41 pm, Tim Roberts <[EMAIL PROTECTED]> wrote:
>
> > Don't you want mvaddstr?
>
> import curses
>
> def my_program(screen):
> while True:
> ch = screen.getch()
>
> if ch == or
Hi,
Thanks for the response.
On Sep 16, 8:41 pm, Tim Roberts <[EMAIL PROTECTED]> wrote:
> Don't you want mvaddstr?
>
import curses
def my_program(screen):
while True:
ch = screen.getch()
if ch == ord("q"):
break
if ch <= 255:
screen.mvaddstr
7stud <[EMAIL PROTECTED]> 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.a
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))
sc