📄 changelog
字号:
* Preliminary mouse support was added to the raw_display and curses_display modules. A new Screen.set_mouse_tracking() method was added to enable mouse tracking. Mouse events are returned alongside keystrokes from the Screen.get_input() method. The widget interface does not yet include mouse handling. This will be addressed in the next release. * A new convenience function is_mouse_event() was added to help in separating mouse events from keystrokes. * Added a new example program input_test.py. This program displays the keyboard and mouse input it receives. It may be run as a CGI script or from the command line. On the command line it defaults to using the curses_display module, use input_test.py raw to use the raw_display module instead. * Fixed an Edit.render() bug that caused it to render the cursor in a different location than that reported by Edit.get_cursor_coords() in some circumstances. * Fixed a bug preventing use of UTF-8 characters with Divider widgets.Urwid 0.9.1 * BarGraph and ProgressBar can now display data more accurately by using the UTF-8 vertical and horizontal eighth characters. This behavior will be enabled when the UTF-8 encoding is detected and "smoothed" attributes are passed to the BarGraph or ProgressBar constructors. * New get_encoding_mode() function to determine how Urwid will treat raw string data. * New raw_display.signal_init() and raw_display.signal_restore() methods that may be overridden by threaded applications that need to call signal.signal() from their main thread. * Fixed a bug that prevented the use of UTF-8 strings in text markup. * Removed some forgotten asserts that broke 8-bit and CJK input.Urwid 0.9.0 * New support for UTF-8 encoding including input, display and editing of narrow and wide (CJK) characters. Preliminary combining (zero-width) character support is included, but full support will require terminal behavior detection. Right-to-Left input and display are not implemented. * New raw_display module that handles console display without relying on external libraries. This module was written as a work around for the lack of UTF-8 support in the standard version of ncurses. Eliminates "dead corner" in the bottom right of the screen. Avoids use of bold text in xterm and gnome-terminal for improved text legibility. * Fixed Overlay bug related to UTF-8 handling. * Fixed Edit.move_cursor_to_coords(..) bug related to wide characters in UTF-8 encoding.Urwid 0.9.0-pre3 * Fixed Canvas attribute padding bug related to -pre1 changes.Urwid 0.9.0-pre2 * Replaced the custom align and wrap modes in example program calc.py with a new layout class. * Fixed Overlay class call to Canvas.overlay() broken by -pre1 changes. * Fixed Padding bug related to Canvas -pre1 changes.Urwid 0.9.0-pre1 * New support for UTF-8 encoding. Unicode strings may be used and will be converted to the current encoding when output. Regular strings in the current encoding may still be used. PLEASE NOTE: There are issues related to displaying UTF-8 characters with the curses_display module that have not yet been resolved. * New set_encoding() function replaces util.set_double_byte_encoding(). * New supports_unicode() function to query if unicode strings with characters outside the ascii range may be used with the current encoding. * New TextLayout and StandardTextLayout classes to perform text wrapping and alignment. Text widgets now have a layout parameter to allow use of custom TextLayout objects. * New layout structure replaces line translation structure. Layout structure now allows arbitrary reordering/positioning of text segments, inclusion of UTF-8 characters and insertion of text not found in the original text string. * Removed util.register_align_mode() and util.register_wrap_mode(). Their functionality has been replaced by the new layout classes.Urwid 0.8.10 * Expanded tutorial to cover advanced ListBox usage, custom widget classes and the Pile, BoxAdapter, Columns, GridFlow and Overlay classes. * Added escape sequence for "shift tab" to curses_display. * Added ListBox.set_focus_valign() to allow positioning of the focus widget within the ListBox. * Added WidgetWrap class for extending existing widgets without inheriting their complete namespace. * Fixed web_display/mozilla breakage from 0.8.9. Fixed crash on invalid locale setting. Fixed ListBox slide-back bug. Fixed improper space trimming in calculate_alignment(). Fixed browse.py example program rows bug. Fixed sum definition, use of long ints for python2.1. Fixed warnings with python2.1. Fixed Padding.get_pref_col() bug. Fixed Overlay splitting CJK characters bug.Urwid 0.8.9 * New Overlay class for drawing widgets that obscure parts of other widgets. May be used for drop down menus, combo boxes, overlapping "windows", caption text etc. * New BarGraph, GraphVScale and ProgressBar classes for graphical display of data in Urwid applications. * New method for configuring keyboard input timeouts and delays: curses_display.Screen.set_input_timeouts(). * Fixed a ListBox.set_focus() bug.Urwid 0.8.8 * New web_display module that emulates a console display within a web browser window. Application must be run as a CGI script under Apache. Supports font/window resizing, keepalive for long-lived connections, limiting maximum concurrent connections, polling and connected update methods. Tested with Mozilla Firefox and Internet Explorer. * New BoxAdapter class for using box widgets in places that usually expect flow widgets. * New curses_display input handling with better ESC key detection and broader escape code support. * Shortened resize timeout on gradual resize to improve responsiveness.Urwid 0.8.7 * New widget classes: Button, RadioButton, CheckBox. * New layout widget classes: Padding, GridFlow. * New dialog.py example program that behaves like dialog(1) command. * Pile widgets now support selectable items, focus changing with up and down keys and setting the cursor position. * Frame widgets now support selectable items in the header and footer. * Columns widgets now support fixed width and relative width columns, a minimum width for all columns, selectable items within columns containing flow widgets (already supported for box widgets), focus changing with left and right keys and setting the cursor position. * Filler widgets may now wrap box widgets and have more alignment options. * Updated tour.py example program to show new widget types and features. * Avoid hogging cpu on gradual window resize and fix for slow resize with cygwin's broken curses implementation. * Fixed minor CJK problem and curs_set() crash under MacOSX and Cygwin. * Fixed crash when deleting cells in calc.py example program.Urwid 0.8.6 * Improved support for CJK double-byte encodings: BIG5, UHC, GBK, GB2312, CN-GB, EUC-KR, EUC-CN, EUC-JP (JISX 0208 only) and EUC-TW (CNS 11643 plain 1 only) * Added support for ncurses' use_default_colors() function to curses_display module (Python >= 2.4). register_palette() and register_palette_entry() now accept "default" as foreground and/or background. If the terminal's default attributes cannot be detected black on light gray will be used to accomodate terminals with always-black cursors. "default" is now the default for text with no attributes. This means that areas with no attributes will change from light grey on black (curses default) to black on light gray or the terminal's default. * Modified examples to not use black as background of Edit widgets. * Fixed curses_display curs_set() call so that cursor is hidden when widget in focus has no cursor position.Urwid 0.8.5 * New tutorial covering basic operation of: curses_display.Screen, Canvas, Text, FlowWidget, Filler, BoxWidget, AttrWrap, Edit, ListBox and Frame classes * New widget class: Filler * New ListBox functions: get_focus(), set_focus() * Debian packages for Python 2.4. * Fixed curses_display bug affecting text with no attributes.Urwid 0.8.4 * Improved support for Cyrillic and other simple 8-bit encodings. * Added new functions to simplify taking screenshots: html_fragment.screenshot_init() and html_fragment.screenshot_collect() * Improved urwid/curses_display.py input debugging * Fixed cursor in screenshots of CJK text. Fixed "end" key in Edit boxes with CJK text.Urwid 0.8.3 * Added support for CJK double-byte encodings. Word wrapping mode "space" will wrap on edges of double width characters. Wrapping and clipping will not split double width characters. curses_display.Screen.get_input() may now return double width characters. Text and Edit classes will work with a mix of regular and double width characters. * Use new method Edit.set_edit_text() instead of Edit.update_text(). * Minor improvements to edit.py example program.Urwid 0.8.2 * Re-released under GNU Lesser General Public License.Urwid 0.8.1 * Added support for monochrome terminals. see curses_display.Screen.register_palette_entry() and example programs. set TERM=xterm-mono to test programs in monochrome mode. * Added unit testing code test_urwid.py to the examples. * Can now run urwid/curses_display.py to test your terminal's input and colour rendering. * Fixed an OSX browse.py compatibility issue. Added some OSX keycodes.Urwid 0.8.0 * Initial Release
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -