To get an ascii value of a char we have the ascii(c) function in curses.ascii module...
but in the curses module _curses module is imported... which is not there in the library hence
exception is being generated...

can anyone kindly help.. or suggest any other method for conversion...

Use the ord function. print ord('A') Prints the number 65 to the console.

Hope this helps.