Re: curses: x, y positioning

2007-09-17 Thread Ian Clark
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

Re: curses: x, y positioning

2007-09-17 Thread 7stud
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

Re: curses: x, y positioning

2007-09-17 Thread 7stud
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

Re: curses: x, y positioning

2007-09-17 Thread 7stud
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

Re: curses: x, y positioning

2007-09-16 Thread Tim Roberts
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

curses: x, y positioning

2007-09-15 Thread 7stud
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