Python curses text editor module. Provides a configurable pop-up window for entering text, passwords, etc.
Posted by Scott Hansen <firstname.lastname@example.org>
- Yuri D'Elia <email@example.com> (Unicode/python2 code from tabview)
- Python 2.7+, 3+
- Unicode support
- Configurable window size and location
- Text box can have a title and/or an outlined box
- Text box can be initialized with existing text to edit
- Password mode for hiding text entries
- Paste in large blocks of text from primary clipboard
- Pop-up help menu
Python 2.7+, 3+
# python setup.py installOR
$ python setup.py install --user
From non-curses application:
import editor editor.editor(box=False, inittext="Hi", win_location=(5, 5))
From curses application with a predefined curses window object (stdscr):
from editor.editor import Editor Editor(stdscr, win_size=(1,80), pw_mod=True, max_text_size=1)()
Using shift-insert to paste text will be quite slow, as it's pasting one character at a time. Use Ctrl-v to paste a large block of text from the primary clipboard.
Double-width characters are not yet supported.