Moderate Activity

News

  Analyzed 2 days ago based on code collected 2 days ago.
 
Posted about 1 month ago by ian
add "Why can't I select text in an Urwid program?"

(diff)
Posted 2 months ago by lauritz.thaulow
The doc says: "blank rows between cells vertically (if more than one row is required to display all the cells)".

However, GridFlow adds blank fows to the top even if there is only one row. Here's an example:

import urwid
w = ... [More] urwid.GridFlow([urwid.Text("test")], 10, 3, 1, "center")
print "\n".join(map(repr, w.render((40,)).text))

When run, it prints

' '
' test ' [Less]
Posted 3 months ago by fabiand
Add oVirt Node

(diff)
Posted 3 months ago by fabiand
The attached patch should fix this by adding a fallback to 80x24.
Posted 3 months ago by lauritz.thaulow
Here's a short snippet showing the problem:

import urwid
import sys
walker = urwid.SimpleFocusListWalker([1, 2, 3])
listbox = urwid.ListBox(walker)
walker.set_focus_changed_callback(
lambda pos: sys.stdout.write(
... [More] "{0}\n".format(listbox.get_focus()[1])))
# This should cause the new index, 1, to be printed.
# Instead it prints 0.
walker.insert(0, 0)

I suggest fixing by changing this code in MonitoredFocusList._set_focus:

if index != self._focus:
self._focus_changed(index)
self._focus = index

...to this:

old_focus = self._focus
self._focus = index
if old_focus != index:
self._focus_changed(index)

Alternatively the docstring should be corrected to state the actual behaviour of the function. [Less]
Posted 4 months ago by Ian Ward
urwid/container.py
second fix for Columns.move_cursor_to_coords
Posted 4 months ago by Ian Ward
urwid/container.py
fix for Columns.move_cursor_to_coords not handling left/right
Posted 4 months ago by Ian Ward
urwid/tests/test_container.py
test showing Columns.move_cursor_to_coords not handling left/right
Posted 4 months ago by Ian Ward
setup.py
setup.py: missing traceback import, skip retry when testing
Posted 4 months ago by Ian Ward
setup.py
fix test_suite for split up test files
 

 
 

Creative Commons License Copyright © 2013 Black Duck Software, Inc. and its contributors, Some Rights Reserved. Unless otherwise marked, this work is licensed under a Creative Commons Attribution 3.0 Unported License . Ohloh ® and the Ohloh logo are trademarks of Black Duck Software, Inc. in the United States and/or other jurisdictions. All other trademarks are the property of their respective holders.