简单的文本框编辑小部件,带有类似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如何在导入到Google工作表时使用ApachePOI显示系列标签   java在Swing表上修改数据生成SQL   java TCP数据包在网络级别合并   java自动连线bean在线程位置为空   javasocket。禁用无线连接时getOutputStream()阻塞   JSON上的javascript字符串数组。stringify输出unicode字符   java在Oracle数据库中存储不同类型数据的最佳体验   Spring MVC中模板引擎后的java进程输出   不知从哪里来的java空字符串。   如何加载java。使用Adobe Flex的客户端的属性文件?   java如何替换多层括号之间的所有内容?   {JSONObject必须以java'开头   java使用commandButton或commandLink返回并管理HTML控件值   java Android大文本视图动态   java JMock需要自定义类   java Android应用程序在emulator中工作,但在设备中失败   java连接到derby数据库时使用什么文件路径格式?   java在一个函数调用中返回两个结果?