When I try to run the following code...
from telnetsrvlib import * if __name__ == \'__main__\': \"Testing - Accept a single connection\" class TNS(SocketSer
Install the UniCurses module from here: https://pypi.python.org/pypi/UniCurses
You may need to alter some of your code in order to use it, as it provides the functionality of NCurses, not the vanilla curses library.
Unfortunately, no direct Python for Windows port of curses exists.