Scratching my head

Jon Ellis lightseeker at hotmail.remove.com
Thu Mar 30 16:49:36 CEST 2000


Redhat 6.1
Python 1.5.2 with new cursesmodule.

I have run into a problem when using the "somewhat new" cursesmodule.

import curses,traceback,time
try:
    stdscr=curses.initscr()
    stdscr.addch(0,0,curses.ACS_ULCORNER)
    for i in range(40):
        stdscr.addch(0,i+1,curses.ACS_HLINE)
    stdscr.addch(0,42,curses.ACS_URCORNER)
    stdscr.refresh()
    time.sleep(3)
    curses.endwin()
except:
    curses.endwin()
    traceback.print_exc()

*I know that there are other ways to display the top portion of a box
but this example is used for discussion.

When I use the included cursesmodule that came with 1.5.2 the above
code displays as expected.  But when I use the new cursesmodule it
displays all ACS_* characters as "^@". The above code executes and
displays like this:

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^@

I have not found any other anomolies with the new cursesmodule.  Any
ideas would be appreciated.

TIA,
Jon 



More information about the Python-list mailing list