#! /usr/bin/python
import curses
import curses.textpad as textpad
try:
mainwindow = curses.initscr()
textpad.Textbox(mainwindow).edit()
finally:
curses.endwin()
the problem is that I type one character,but two characters display on screen.
Echoing is on by default. You need to call
noechofor deactivating it.(the script has been tested on Python 2.7). I suggest you to have a look to the curses programming page.