简单的文本框编辑小部件,带有类似emacs的键绑定

texteditpad的Python项目详细描述


文本编辑板

简单的文本框编辑小部件,带有类似于keybindings的emacs。提供 比curses.textpad例程更丰富的功能,并打算替换 它。

PYPI存储库: https://pypi.python.org/pypi/texteditpad

用法

deftest_editbox(stdscr):ncols,nlines=9,4uly,ulx=15,20stdscr.addstr(uly-2,ulx,"Use Ctrl-G to end editing.")win=curses.newwin(nlines,ncols,uly,ulx)stdscr.refresh()returntexteditpad.Textbox(win).edit()text=curses.wrapper(test_editbox)print'Contents of text box:'printtext

命令

使用窗口对象的内部编辑小部件。支持 遵循类似于密钥绑定的emacs:

CommandDescription
Ctrl-AGo to left edge of window.
Ctrl-BCursor left, wrapping to previous line if appropriate.
Ctrl-DDelete character under cursor.
Ctrl-EGo to right edge or end of line
Ctrl-FCursor right, wrapping to next line when appropriate.
Ctrl-GTerminate, returning the window contents.
Ctrl-HDelete character backward.
Ctrl-IToggle insert/overwrite modes.
Ctrl-KIf line is blank, delete it, otherwise clear to end of line.
Ctrl-LRefresh screen.
Ctrl-NCursor down; move down one line.
Ctrl-OInsert a blank line at cursor location.
Ctrl-PCursor up; move up one line.

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java Apache Flink外部Jar   创建和强制转换对象数组时发生java错误   Java,添加数组   具有相同包结构和类的java JAR   java Jenkins未能构建Maven项目   java为什么一个forloop比另一个更快,尽管它们做的“一样”?   servlets在将“/”站点迁移到Java EE包时处理contextpath引用   无法解析java MavReplugin:2.21或其某个依赖项   泛型如何编写比较器来泛化Java中的两种类型的对象?   java Android Emulator未在netbeans上加载   多线程Java使用线程对数组中的数字求和:在同步块中使用新变量作为锁:差异   java如何在JSP/servlet中设置<input>标记的值?