<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.lib.urwid">
    <title>gmane.comp.lib.urwid</title>
    <link>http://blog.gmane.org/gmane.comp.lib.urwid</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lib.urwid/1187"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lib.urwid/1181"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lib.urwid/1173"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lib.urwid/1172"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lib.urwid/1171"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lib.urwid/1169"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lib.urwid/1168"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lib.urwid/1165"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lib.urwid/1163"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lib.urwid/1158"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lib.urwid/1156"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lib.urwid/1155"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lib.urwid/1154"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lib.urwid/1152"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lib.urwid/1150"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lib.urwid/1149"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lib.urwid/1147"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lib.urwid/1142"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lib.urwid/1140"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lib.urwid/1135"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lib.urwid/1187">
    <title>GridFlow scrolling and focus</title>
    <link>http://comments.gmane.org/gmane.comp.lib.urwid/1187</link>
    <description>&lt;pre&gt;To Whom It May Concern:

If a GridFlow is larger than the screen, it can be scrolled through. However, if
GridFlow X loses focus, by switching focus to another widget in a pile or column
for example, GridFlow X shows only the first cells of the GridFlow rather than
those around the former focus cell. A minimal example can be found at
http://pastebin.com/6X0vNMAq . Run the script, scroll down so that Button 0 is
no longer showing and hit 'tab'. Focus will switch to the second GridFlow, but
the first GridFlow now show button 0 again as though it had never scrolled.

I would expect the GridFlow to retain its 'position' even without focus, like
ListBox does. Is this a strange expectation or is GridFlow's behavior strange?
To change this behavior, would GridFlow require calculate_visible() like
ListBox? Thank you.

Sincerely,
Eric Easley
&lt;/pre&gt;</description>
    <dc:creator>Eric Easley</dc:creator>
    <dc:date>2012-05-24T18:29:54</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lib.urwid/1181">
    <title>Problem with Text and Listbox Widgets</title>
    <link>http://comments.gmane.org/gmane.comp.lib.urwid/1181</link>
    <description>&lt;pre&gt;Hi,

I am a complete newbie to both Python and Urwid, and I have a question regarding widget behavior.

I am building a status gui composed of Text widgets in a Listbox, traversed by a SimpleListWalker.

The problem I'm having is that when I update one of the Text widgets with 'varname.set_text("example"), the text string "example" appears in the appropriate Text widget, but it also appears to add a carriage return, meaning the entire display below the updated Text widget shifts down one line.  How do I prevent this from happening?  How can I simply overwrite what was in the Text widget in the first place without a new line showing up?

BTW, I am using Urwid1.0.1 and Python 2.4.

Thanks,

Larry
&lt;/pre&gt;</description>
    <dc:creator>Rupp, Lawrence E</dc:creator>
    <dc:date>2012-04-12T21:52:48</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lib.urwid/1173">
    <title>Questions about Buttons and Columns</title>
    <link>http://comments.gmane.org/gmane.comp.lib.urwid/1173</link>
    <description>&lt;pre&gt;Hi,

So I am new to urwid and need some help :)

I have a set of buttons packed with an urwid.Columns and I would like
the text inside each buttons to be centered
Currently it looks like this  but as you can see, the text is aligned to
the left

If there is not a method/easy way to achieve this, and it requires some
sub-classing, could you give me some pointers on how to do it?

Thanks

--
Andrew
&lt;/pre&gt;</description>
    <dc:creator>Andrew Higginson</dc:creator>
    <dc:date>2012-04-10T10:36:31</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lib.urwid/1172">
    <title>Centering Button Text</title>
    <link>http://comments.gmane.org/gmane.comp.lib.urwid/1172</link>
    <description>&lt;pre&gt;Hi,

So I am new to urwid and need some help :)

I have a set of buttons packed with an urwid.Columns and I would like
the text inside each buttons to be centered
Currently it looks like this  but as you can see, the text is aligned to
the left

If there is not a method/easy way to achieve this, and it requires some
sub-classing, could you give me some pointers on how to do it?

Thanks

--
Andrew
&lt;/pre&gt;</description>
    <dc:creator>Andrew Higginson</dc:creator>
    <dc:date>2012-04-10T10:36:41</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lib.urwid/1171">
    <title>MainLoop's pipe is not removed after pipe data ends.</title>
    <link>http://comments.gmane.org/gmane.comp.lib.urwid/1171</link>
    <description>&lt;pre&gt;Test code:
===
import urwid
import os

txt = urwid.Text(u"Hello World")
fill = urwid.Filler(txt, 'top')

def show_or_exit(input):
    if input in ('q', 'Q'):
        raise urwid.ExitMainLoop()

loop = urwid.MainLoop(fill, unhandled_input=show_or_exit)

def callback(data):
    if data == "":
        # data end, return False, watch will be removed.
        return False
    return True

fd = loop.watch_pipe(callback)
# write some data into pipe.
f = os.fdopen(fd, "w", 1)
f.write("hello")
f.close()

print "before loop.run():"
print "loop.event_loop._watch_files:"
print loop.event_loop._watch_files
print "loop._watch_pipes:"
print loop._watch_pipes

# press Q to break.
loop.run()

print "after loop.run():"
print "loop.event_loop._watch_files:"
print loop.event_loop._watch_files
print "loop._watch_pipes:"
print loop._watch_pipes
===
Run the test code and press Q to quit, the output is:

before loop.run():
loop.event_loop._watch_files:
{5: &amp;lt;function cb at 0xb7c36144&amp;gt;}
loop._watch_pipes:
{6: (5, 5)}

after loop.run():
loop.event_loop._watch_files:
{}
loop._watch_pipes:
{6: (5, 5)}

You can see that pipe in _watch_files list is removed correctly, but pipe
in _watch_pipes list is not removed. I think it is not right.

But if I do this patch:
===
--- urwid_bak/main_loop.py    2012-04-03 19:20:16.000000000 +0800
+++ urwid/main_loop.py    2012-04-06 20:18:20.000000000 +0800
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -186,8 +186,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
             data = os.read(pipe_rd, PIPE_BUFFER_READ_SIZE)
             rval = callback(data)
             if rval is False:
-                self.event_loop.remove_watch_file(watch_handle)
-                os.close(pipe_rd)
+                self.remove_watch_pipe(pipe_wr)

         watch_handle = self.event_loop.watch_file(pipe_rd, cb)
         self._watch_pipes[pipe_wr] = (watch_handle, pipe_rd)
===

The output becomes:

before loop.run():
loop.event_loop._watch_files:
{5: &amp;lt;function cb at 0xb7b7b9cc&amp;gt;}
loop._watch_pipes:
{6: (5, 5)}

after loop.run():
loop.event_loop._watch_files:
{}
loop._watch_pipes:
{}

Both _watch_pipes list and _watch_files list are now correct.
_______________________________________________
Urwid mailing list
Urwid&amp;lt; at &amp;gt;lists.excess.org
http://lists.excess.org/mailman/listinfo/urwid
&lt;/pre&gt;</description>
    <dc:creator>Andrew Wu</dc:creator>
    <dc:date>2012-04-06T12:29:55</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lib.urwid/1169">
    <title>feature-containers merge</title>
    <link>http://comments.gmane.org/gmane.comp.lib.urwid/1169</link>
    <description>&lt;pre&gt;Hello everyone!

I'm happy to announce the containers changes I've been working on for a few
months have now landed in the default/master branch.  This is a long post
but there's lots of good stuff here.  If you see a problem with the API or
its implementation now's the time to let me know!


CONTENTS

 1. New Container API
 2. Container and Decoration Widget Improvements
 3. List Walker API V2
 4. New Simple List Walker and Monitored List Types


1. NEW CONTAINER API

Urwid's container widgets:

 * Columns
 * Pile
 * GridFlow
 * Overlay
 * Frame
 * ListBox

All now have a common container API you can use, regardless of the
container type.  Backwards compatibility is still maintained for the old
container-specific ways of accessing and modifying contents, but the new
API is now the preferred way of modifying and traversing containers.


  cont.focus

is a read-only property that returns the widget in focus for this
container.  Empty containers and non-container widgets (that inherit from
Widget) will return None.


  cont.focus_position

is a read/write property that provides access to the position of the
container's widget in focus.  This will often be a integer value but may be
any object*.  Reading this value on an empty container or on any
non-container widgets (that inherit from Widget) raises an IndexError.
 Writing to this property with an invalid position will also raise an
IndexError.  Writing a new value automatically marks this widget to be
redrawn and will be reflected in cont.focus.

* Columns, Pile, GridFlow, Overlay and ListBox with a SimpleListWalker or
SimpleFocusListWalker as its body use integer positions;  Frame uses
'body', 'header' and 'footer';  ListBox with a custom list walker will use
the positions the list walker returns


  cont.contents

is a read-only property** that provides access to an mapping- or list-like
object that contains the child widgets and the options used for displaying
those widgets in this container.  The mapping- or list-like object always
allows reading from positions with the usual __getitem__ method and may
support assignment and deletion*** with __setitem__ and __delitem__
methods.  The values are (child widget, option) tuples.  When this object
or its contents are modified the widget is automatically flagged to be
redrawn.

** Columns, Pile and GridFlow also allow assigning an iterable to this
property and overwrite the values in their contents list with the ones
provided.

*** Columns, Pile, GridFlow, Overlay and Frame support item assignment and
deletion


  cont.options(...)

is a method that returns options objects for use in items added to
cont.contents.  The arguments are specific to the container type, and
generally match the __init__ arguments for the container.  The objects
returned are currently tuples of strings and integers or None for
containers without child widget options.  This method exists to allow
future versions of Urwid to add new options to existing containers.  Code
that expects the option tuples to remain the same size will fail when new
options are added, so defensive programming with options tuples is strongly
encouraged.


  cont.__getitem__(x)  # &amp;lt;=&amp;gt;  cont[x]

is a short-cut method behaving identically to:
cont.contents[x][0].base_widget.  Which means roughly "give me the child
widget at position x and skip all the Decoration widgets wrapping it".
 Decoration widgets include Padding, Filler, AttrMap etc.


  cont.get_focus_path()

is a method that returns the focus position for this container *and* all
child containers along the path defined by their focus settings.  This list
of positions is the closest thing we have to the singular widget-in-focus
in other UI frameworks, because the ultimate widget in focus in Urwid
depends on the focus setting of all its parent container widgets.


  cont.set_focus_path(p)

is a method that assigns to the focus_position property of each container
along the path given by the list of positions p.  It may be used to restore
focus to a widget as returned by a previous call to cont.get_focus_path().


  cont.__iter__()  and cont.__reversed__()

are methods that allow iteration over the *positions* of this container.
 Normally the order of the positions generated by __reversed__() will be
the opposite of __iter__().  The exception is the case of ListBox with
certain custom list walkers, and the reason goes back to the original way
list walker interface was defined.  Note that a custom list walker might
also generate an unbounded number of positions, so care should be used with
this interface and ListBoxes.


2. CONTAINER AND DECORATION WIDGET IMPROVEMENTS

I made a number of other improvements to the container and decoration
widgets:

 * GridFlow child widgets may now be given different widths, and more types
of widths will likely be added in the future to make it a much more
flexible container

 * GridFlow, Columns, Overlay and Padding now consistently use the names
width_type and width_amount

 * width_types formerly called 'fixed' for a set number of screen columns
are now called 'given' to avoid confusion with fixed widgets, 'fixed' is
still accepted for backwards compatibility

 * width_types formerly called 'flow' for asking a widget to calculate its
own number of screen columns is now called 'pack' to avoid confusion with
flow widgets, 'flow' is still accepted for backwards compatibility

 * Pile, Overlay and Filler now consistently use the names height_type and
height_amount

 * height_types formerly called 'flow' (or None) for asking a widget to
calculate its own number of rows are now called 'pack' to be consistent
with width_type, 'flow' (and None) is still accepted for backwards
compatibility

 * Filler now has top and bottom parameters like Padding's left and right
parameters

 * Overlay now has min_height, min_width, left, right, top and bottom
parameters which behave like the same options on Padding and Filler

 * Frame now has some better docstrings and a comparison to a similar use
of Pile

 * Updated tour.py example to use new container/decoration parameters

 * FlowWidget, BoxWidget and FixedWidget are now deprecated, sizing is
given by a sizing() method or from the _sizing property/attribute


3. LIST WALKER API V2

The current list walker API ("V1") will remain available and is still the
least restrictive option for the programmer.  The list walker API V2 is an
attempt to remove some of the duplicate code that V1 requires for many
users.  List walker API V1 will be implemented automatically by subclassing
ListWalker and implementing the V2 methods:

 * walker.__getitem__(p)  # return widget at position p or raise an
IndexError or KeyError

 * walker.next_position(p)  # return position following position p or raise
an IndexError or KeyError

 * walker.prev_position(p)  # return position preceding position p or raise
an IndexError or KeyError

 * walker.set_focus(p)  # same as V1, may call self._modified()

 * walker.focus  # attribute or property containing the focus position, or
define walker.get_focus() as in V1


Also, there is an optional iteration helper method that may be defined in
any list walker.  When this is defined it will be used by
ListBox.__iter__() and ListBox.__reversed__():

 * walker.positions(reverse=False) # return a forward or reverse iterable
of positions


4. NEW SIMPLE LIST WALKER AND MONITORED LIST TYPES

For some time there has been an unpublicised monitored list type in Urwid:
MonitoredFocusList.  This class is a list with a .focus position attribute
that is automatically updated as the contents of the list changes.  i.e. If
you remove or insert items before the focus position using any of the
normal list methods the focus position is updated accordingly.  This class
is now used by a number of the container widgets to manage their contents
lists, and is the type of object that is returned when you access their
.contents property.

SimpleListWalker has for a long time been the recommended list walker for
the common case of using a normal list of widgets in a ListBox.
 SimpleListWalker uses the MonitoredList type to track its contents and
focus, and that can't be changed without possibly breaking existing code.

So, the new recommended simple list walker is SimpleFocusListWalker.
 SimpleFocusListWalker uses MonitoredFocusList and gets all its nice
focus-position-updating goodness.

I know.  Sorry about the long name.  I couldn't think of something better,
but suggestions are welcome.


That's it.  Hey, thanks for reading this far and happy Urwidding!

Ian
_______________________________________________
Urwid mailing list
Urwid&amp;lt; at &amp;gt;lists.excess.org
http://lists.excess.org/mailman/listinfo/urwid
&lt;/pre&gt;</description>
    <dc:creator>Ian Ward</dc:creator>
    <dc:date>2012-03-07T21:51:52</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lib.urwid/1168">
    <title>MainLoop.remove_watch_pipe doesn't work?</title>
    <link>http://comments.gmane.org/gmane.comp.lib.urwid/1168</link>
    <description>&lt;pre&gt;Hello,

I tried to call MainLoop.remove_watch_pipe, but it doesn't work:

####

import urwid

txt = urwid.Text(u"Hello World")
fill = urwid.Filler(txt, 'top')
loop = urwid.MainLoop(fill)

def callback(data):
    pass

fd = loop.watch_pipe(callback)
loop.remove_watch_pipe(fd)

loop.run()

####

I got error message:

Traceback (most recent call last):
  File "t.py", line 11, in &amp;lt;module&amp;gt;
    loop.remove_watch_pipe(fd)
  File "/home/Andrew Wu/urwid/main_loop.py", line 205, in remove_watch_pipe
    watch_handle, pipe_rd = self._watch_pipes.remove(write_fd)
AttributeError: 'dict' object has no attribute 'remove'
_______________________________________________
Urwid mailing list
Urwid&amp;lt; at &amp;gt;lists.excess.org
http://lists.excess.org/mailman/listinfo/urwid
&lt;/pre&gt;</description>
    <dc:creator>Andrew Wu</dc:creator>
    <dc:date>2012-02-15T08:24:19</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lib.urwid/1165">
    <title>ListBox loses focus</title>
    <link>http://comments.gmane.org/gmane.comp.lib.urwid/1165</link>
    <description>&lt;pre&gt;Hello,

I am trying to build a GridBox widget, which is similiar to the GridFlow widget, but can be scrolled.

In doing so, I encountered a problem using urwid's ListBox when setting a focus explicitely.
The following code generates a display with 3x5 checkboxes. The focus is explicitely set on the second entry in the third row.
When running this code in a terminal which is large enough to hold the focus without scrolling the list, the focus is set to the first entry in the third row instead of the second.
When the terminal is small enough not to hold the focus without scrolling, the focus is set properly.

I could trace the problem back to the render method of the ListBox, which explicitely alters the focus of the contained Columns object.
(See the second code snippet and the corresponding output).

Is this a bug in the ListBox or am I doing something wrong when setting the focus?

Any help would be appreciated!
Best regards.


Snippet 1:

######################################################################################

#! /usr/bin/python                                                                                                                                                                                   
import urwid
import random

palette = [('header', 'white', 'dark red', "", "#afd", "#f0f"),
           ('footer', 'black', 'light blue', "", "#6f0", "#d00"),
           ('reveal focus', 'dark green', 'yellow', "", "#fd0", "#808"),
           ('body', 'yellow', 'dark green', 'standout', "#808", "#fd0"),
           ('edit', 'black', 'light gray', "", "#f0f", "#afd")]

buttons = [urwid.AttrMap(urwid.CheckBox(k), None, 'reveal focus')
           for k in ["%d %s" % (i, j)
                     for i, j in
                     enumerate(sorted(["".join([chr(random.randint(97, 122))
                                                for x in range(
                                                       random.randint(4, 16))])
                                       for j in range(15)]))]]
body = urwid.ListBox(urwid.SimpleListWalker([urwid.Columns(buttons[3*i:3*i+3])
                                             for i in range(len(buttons)/3)]))
body.set_focus(2)
body.get_focus()[0].set_focus(1)
loop = urwid.MainLoop(body, palette)
loop.screen.set_terminal_properties(colors=256)
loop.run()


Snippet 2:

########################################################################
#! /usr/bin/python                                                                                                                                                                                   
import urwid
import random
import sys
from math import log10
palette = [('header', 'white', 'dark red', "", "#afd", "#f0f"),
           ('footer', 'black', 'light blue', "", "#6f0", "#d00"),
           ('reveal focus', 'dark green', 'yellow', "", "#fd0", "#808"),
           ('body', 'yellow', 'dark green', 'standout', "#808", "#fd0"),
           ('edit', 'black', 'light gray', "", "#f0f", "#afd")]

def log(txt):
    import time
    f = open("/tmp/gridbox.log", "a")
    f.write("%s: %s\n" % (time.strftime("%H:%M:%S"), txt))
    f.close()

class MyListBox(urwid.ListBox):
    def __init__(self, *args, **kwargs):
        urwid.ListBox.__init__(self, *args, **kwargs)
    def render(self, *args, **kwargs):
        log("BEFORE RENDER:")
        for i in self.body:
            l = [j.original_widget for j in i.widget_list]
            log("row %d: [%s], focus is on %d" % (id(i),
                                                  ", ".join([str(id(j)) for j in l]),
                                                  i.get_focus_column()))

        retval = super(MyListBox, self).render(*args, **kwargs)
        log("AFTER RENDER:")
        for i in self.body:
            l = [j.base_widget for j in i.widget_list]
            log("row %d: [%s], focus is on %d" % (id(i),
                                                  ", ".join([str(id(j)) for j in l]),
                                                  i.get_focus_column()))

        return retval

buttons = [urwid.AttrMap(urwid.CheckBox(k), None, 'reveal focus')
           for k in ["%d %s" % (i, j)
                     for i, j in
                     enumerate(sorted(["".join([chr(random.randint(97, 122))
                                                for x in range(random.randint(4, 16))])
                                       for j in range(15)]))]]
body = MyListBox(urwid.SimpleListWalker([urwid.Columns(buttons[3*i:3*i+3])
                                         for i in range(len(buttons)/3)]))
body.set_focus(2)
body.get_focus()[0].set_focus(1)
loop = urwid.MainLoop(body, palette)
loop.screen.set_terminal_properties(colors=256)
loop.run()


Output of snippet 2:

11:51:44: BEFORE RENDER:
11:51:44: row 35364944: [35360976, 35361296, 35361552], focus is on 0
11:51:44: row 35365008: [35361808, 35362064, 35362320], focus is on 0
11:51:44: row 35365072: [35362576, 35362832, 35363088], focus is on 1
11:51:44: row 35365136: [35363344, 35363600, 35363856], focus is on 0
11:51:44: row 35365200: [35364112, 35364368, 35364624], focus is on 0
11:51:44: AFTER RENDER:
11:51:44: row 35364944: [35360976, 35361296, 35361552], focus is on 0
11:51:44: row 35365008: [35361808, 35362064, 35362320], focus is on 0
11:51:44: row 35365072: [35362576, 35362832, 35363088], focus is on 0
11:51:44: row 35365136: [35363344, 35363600, 35363856], focus is on 0
11:51:44: row 35365200: [35364112, 35364368, 35364624], focus is on 0_______________________________________________
Urwid mailing list
Urwid&amp;lt; at &amp;gt;lists.excess.org
http://lists.excess.org/mailman/listinfo/urwid
&lt;/pre&gt;</description>
    <dc:creator>Martin Siebel</dc:creator>
    <dc:date>2012-02-09T10:55:04</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lib.urwid/1163">
    <title>an idea about dialogs</title>
    <link>http://comments.gmane.org/gmane.comp.lib.urwid/1163</link>
    <description>&lt;pre&gt;attached an idea that comes to me about dialogs, but sadly it does not
work, may you can help me to investigate why. what is nice about this
idea is that a dialog freeze the normal program execution the following
logic could be implemented:

dialog = YesNoDialog()
ret = dialog.run()
if ret = 'yes':
...
elif ret == 'no':
...
_______________________________________________
Urwid mailing list
Urwid&amp;lt; at &amp;gt;lists.excess.org
http://lists.excess.org/mailman/listinfo/urwid
&lt;/pre&gt;</description>
    <dc:creator>Marco Giusti</dc:creator>
    <dc:date>2012-01-18T21:14:12</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lib.urwid/1158">
    <title>Changing Padding(width) default value in 1.1</title>
    <link>http://comments.gmane.org/gmane.comp.lib.urwid/1158</link>
    <description>&lt;pre&gt;In 0.9.9 after adding the more user-friendly parameters left and right
to the Padding constructor, I also quietly gave the align and width
parameters default values of 'left' and 'pack'.

The latter has now caused problems for a number of people.  A really
common request is to just want to indent something by a few characters,
but to do that safely you need to do something like:

    urwid.Padding(my_thing, width=('relative', 100), left=4)

My preference is to change the width default to ('relative', 100) for
the next Urwid release, and add a warning for people using Padding
without specifying a width in the next bugfix release 1.0.2.

The 'pack' option only really works for Text widgets, and only makes a
difference to the appearance (as compared to ('relative', 100) when the
text alignment is different than than the padding alignment).  So I
believe the potential for breaking existing programs is low.

If this change will cause problems for you please speak up, maybe there
is some other option that won't break otherwise working code built for
0.9.9/1.0

Ian
&lt;/pre&gt;</description>
    <dc:creator>Ian Ward</dc:creator>
    <dc:date>2011-12-11T20:11:26</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lib.urwid/1156">
    <title>[bugreport] container.py</title>
    <link>http://comments.gmane.org/gmane.comp.lib.urwid/1156</link>
    <description>&lt;pre&gt;Hi, I just got an uncaught UnboundLocalError from container.py:
best,
/p

Traceback (most recent call last):
  File "/usr/local/bin/alot", line 20, in &amp;lt;module&amp;gt;
    main()
  File "/usr/local/lib/python2.7/dist-packages/alot/init.py", line 101, in main
    args.colours,
  File "/usr/local/lib/python2.7/dist-packages/alot/ui.py", line 111, in __init__
    self.mainloop.run()
  File "/usr/local/lib/python2.7/dist-packages/urwid-1.0.0-py2.7-linux-x86_64.egg/urwid/main_loop.py", line 274, in run
    self.screen.run_wrapper(self._run)
  File "/usr/local/lib/python2.7/dist-packages/urwid-1.0.0-py2.7-linux-x86_64.egg/urwid/raw_display.py", line 229, in run_wrapper
    return fn()
  File "/usr/local/lib/python2.7/dist-packages/urwid-1.0.0-py2.7-linux-x86_64.egg/urwid/main_loop.py", line 307, in _run
    self.event_loop.run()
  File "/usr/local/lib/python2.7/dist-packages/urwid-1.0.0-py2.7-linux-x86_64.egg/urwid/main_loop.py", line 1159, in wrapper
    rval = f(*args,**kargs)
  File "/usr/local/lib/python2.7/dist-packages/urwid-1.0.0-py2.7-linux-x86_64.egg/urwid/main_loop.py", line 358, in _update
    self.process_input(keys)
  File "/usr/local/lib/python2.7/dist-packages/urwid-1.0.0-py2.7-linux-x86_64.egg/urwid/main_loop.py", line 447, in process_input
    k = self._topmost_widget.keypress(self.screen_size, k)
  File "/usr/local/lib/python2.7/dist-packages/alot/ui.py", line 56, in keypress
    return self._w.keypress(size, key)
  File "/usr/local/lib/python2.7/dist-packages/urwid-1.0.0-py2.7-linux-x86_64.egg/urwid/container.py", line 641, in keypress
    return self.body.keypress( (maxcol, remaining), key )
  File "/usr/local/lib/python2.7/dist-packages/alot/buffers.py", line 32, in keypress
    return self.body.keypress(size, key)
  File "/usr/local/lib/python2.7/dist-packages/urwid-1.0.0-py2.7-linux-x86_64.egg/urwid/listbox.py", line 767, in keypress
    return self._keypress_up((maxcol, maxrow))
  File "/usr/local/lib/python2.7/dist-packages/urwid-1.0.0-py2.7-linux-x86_64.egg/urwid/listbox.py", line 829, in _keypress_up
    row_offset, 'below')
  File "/usr/local/lib/python2.7/dist-packages/urwid-1.0.0-py2.7-linux-x86_64.egg/urwid/listbox.py", line 691, in change_focus
    if target.move_cursor_to_coords((maxcol,),pref_col,row):
  File "/usr/local/lib/python2.7/dist-packages/urwid-1.0.0-py2.7-linux-x86_64.egg/urwid/container.py", line 1002, in move_cursor_to_coords
    if not w.selectable():
UnboundLocalError: local variable 'w' referenced before assignment
&lt;/pre&gt;</description>
    <dc:creator>Patrick Totzke</dc:creator>
    <dc:date>2011-12-11T19:48:59</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lib.urwid/1155">
    <title>convertion of urwid documentation to sphinx</title>
    <link>http://comments.gmane.org/gmane.comp.lib.urwid/1155</link>
    <description>&lt;pre&gt;hi! i'm in the process of convert the urwid documentation (the tutorial,
the manual and the reference doc) to sphinx. here[1] you can follow the
process, any comments about it is welcome as like or dislike as well.

m.

[1] https://bitbucket.org/gm/urwid/changesets/tip/branch(%22feature-sphinx%22)
&lt;/pre&gt;</description>
    <dc:creator>Marco Giusti</dc:creator>
    <dc:date>2011-12-11T18:03:06</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lib.urwid/1154">
    <title>NicO's Sphere articles on Urwid</title>
    <link>http://comments.gmane.org/gmane.comp.lib.urwid/1154</link>
    <description>&lt;pre&gt;I just noticed a 6-article series on Urwid starting here:
http://www.nicosphere.net/urwid-for-python-a-ncurses-library-2541/

It's nice to have coverage like this.  Thanks Nico!

Ian
&lt;/pre&gt;</description>
    <dc:creator>Ian Ward</dc:creator>
    <dc:date>2011-12-09T02:27:39</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lib.urwid/1152">
    <title>ANN: Speedometer 2.4 - bandwidth and download monitor</title>
    <link>http://comments.gmane.org/gmane.comp.lib.urwid/1152</link>
    <description>&lt;pre&gt;Announcing Speedometer 2.8
--------------------------

Speedometer home page:
  http://excess.org/speedometer/

Download:
  http://excess.org/speedometer/speedometer-2.8.tar.gz


New in this release:
====================

 - Added a linear scale option: -l.  Best used in combination with
   -m (and possibly -n) to customize the range to be displayed.
   Thanks to jukie.net for sponsoring this feature.

 - Replace silly "curved" reading with a weighted moving average

 - New option to display all values in bits per second: -s

 - New options to set minimum (-n) and maximum (-m) values
   displayed on the graphs in bytes/s.
   Defaults are -n 32 and -m 2**32

 - Accept shortened versions of -rx and -tx: -r and -t
   My intent is to drop use of the original forms in 3.0 and add
   --long-versions of all options

 - Use IEC notation of sizes MiB, GiB etc.

 - Install script as both speedometer.py and speedometer


About Speedometer
=================

Speedometer is a console bandwidth and file download progress monitor
with a linear/logarithmic bandwidth display and a simple command-line
interface.

Speedometer requires Urwid for full-console bar graph display.  Urwid
may be downloaded from: http://excess.org/urwid/

Speedometer is released under the GNU LGPL.
&lt;/pre&gt;</description>
    <dc:creator>Ian Ward</dc:creator>
    <dc:date>2011-12-09T01:43:57</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lib.urwid/1150">
    <title>ANN: Urwid 1.0.1, Urwid 0.9.9.3 - Console UI Library</title>
    <link>http://comments.gmane.org/gmane.comp.lib.urwid/1150</link>
    <description>&lt;pre&gt;Announcing Urwid 1.0.1 and Urwid 0.9.9.3
----------------------------------------

Urwid home page:
  http://excess.org/urwid/

Manual:
  http://excess.org/urwid/wiki/UrwidManual

Tarballs:
  http://excess.org/urwid/urwid-1.0.1.tar.gz
  http://excess.org/urwid/urwid-0.9.9.3.tar.gz


About these releases:
=====================

These are bug-fix releases for Urwid 1.0.0 and Urwid 0.9.9.2.

Release 0.9.9.3 may be the last in the 0.9.9 series.  Users are strongly
encouraged to upgrade to the 1.0 series.


New in 1.0.1:
=============

  * Fix for Terminal widget in BSD/OSX

  * Fix for a Filler mouse_event() position bug

  * Fix support for mouse positions up to x=255, y=255

  * Fixes for a number of string encoding issues under Python 3

  * Fix for a LineBox border __init__() parameters

  * Fix input input of UTF-8 in tour.py example by converting captions
    to unicode

  * Fix tutorial examples' use of TextCanvas and switch to using
    unicode literals

  * Prevent raw_display from calling tcseattr() or tcgetattr() on
    non-ttys

  * Disable curses_display external event loop support: screen resizing
    and gpm events are not properly supported

  * Mark PollingListWalker as deprecated


New in 0.9.9.3:
===============

  * ListBox now includes a get_cursor_coords() method, allowing
    nested ListBox widgets

  * Fix for a Filler mouse_event() position bug

  * Fix support for mouse positions up to x=255, y=255

  * Fix for leaks of None object in str_util extension

  * Fix for WidgetWrap and AttrMap not working with fixed widgets


About Urwid
===========

Urwid is a console UI library for Python. It features fluid interface
resizing, Unicode support, multiple text layouts, simple attribute
markup, powerful scrolling list boxes and flexible interface design.

Urwid is released under the GNU LGPL.
&lt;/pre&gt;</description>
    <dc:creator>Ian Ward</dc:creator>
    <dc:date>2011-12-01T19:05:14</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lib.urwid/1149">
    <title>vterm.Terminal patches to enable easier subclassing</title>
    <link>http://comments.gmane.org/gmane.comp.lib.urwid/1149</link>
    <description>&lt;pre&gt;Hey,


I've been working on an Urwid application that uses the vterm.Terminal widget 
and integrates properly with Twisted. I've already submitted some minor patches 
to make the raw_display.Screen() object more friendly to subclassing, now I'd 
like to get the Terminal() patched as well. 

The issue is that Terminal assumes the self.master attribute is a file 
descriptor and it will inline calls to os.read()/os.write() on this attribute. 
If the attribute is anything other than a file descriptor, it will raise an 
exception and die. This makes it convoluted to have the master attribute as a 
ProcessProtocol, which is the simplest solution for a Twisted application 
subclassing and implementing the Terminal.

The best solution, from my POV, is to have all access to the the self.master 
attribute wrapped in method calls which can be overwritten. There are two 
options, either make the Terminal widget know how to do I/O on self.master, or 
make self.master an object. That is, either:

# original code:
  os.write(self.master, buf)

# terminal knows too much, code:
  self.write_master(buf)

# I can't believe master's a file(), code:
  self.master.write(buf)

In the attached patch I've implemented the latter approach. I promote the master 
to a file() object (with disabled buffering and non-blocking enabled, so it 
doesn't interfere with Twisted).

As the Gmane.org interface doesn't seem to allow for attachments, I've included 
a pastebin. Ian has the full patch as well, if he wants to forward it to the 
list.

http://pastebin.com/Q6U3Yumi

I'd like to see a solution where it is possible to use, for example, the key 
code parsing code of Terminal without having to cut and paste. 
Terminal.keypress() has only a single line which causes problems with twisted, 
but due to that line my subclass ends up with cut&amp;amp;paste of the whole method. 
This is brittle and non-optimal. Lets make it simpler and cleaner.


cheers,

--gq
&lt;/pre&gt;</description>
    <dc:creator>the grugq</dc:creator>
    <dc:date>2011-11-27T00:46:32</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lib.urwid/1147">
    <title>Lots of progress bars (help pls)</title>
    <link>http://comments.gmane.org/gmane.comp.lib.urwid/1147</link>
    <description>&lt;pre&gt;Hello Ian and community!

I'm new to urwid; trying to compose an application that needs to show lots (LOTS!) of progress bars at the same time. Could be some 10 to 20, of them, depending on external factors.

I've been digging into urwid for a couple of days already but with a limited success. So I decided to ask for some help:

(1) Would anyone suggest a widget class (or configuration of classes) that would let progress bars order themselves let's say 5 or 6 per row (all should be the same width). (A snippet of code would be highly appreciated.)


(2) I would like that composite to have a border built using pseudo-graphical characters on a utf-8 console. Any suggestions for a suitable decorator (or how to build one) ?

Thank you in advance!
Yassen
&lt;/pre&gt;</description>
    <dc:creator>Yassen Damyanov</dc:creator>
    <dc:date>2011-11-24T17:12:21</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lib.urwid/1142">
    <title>example of maxrow (or height?)</title>
    <link>http://comments.gmane.org/gmane.comp.lib.urwid/1142</link>
    <description>&lt;pre&gt;All,

I am trying to make a text input box containing a long block of text. But this input box must share vertical space with other widgets, so I don't want it to expand to display everything inside the input box. Is there a commonly-accepted way to do this? For example, if the screen shows:

widget1
widget2
biginput1
biginput2

can I tell biginput1 and 2 to both constrain themselves to maximum 5 rows? It seems the documentation refers to "maxrow", but I can't find an example of how to do this.

Is this even the right way to do it, and if so how?

Thanks
&lt;/pre&gt;</description>
    <dc:creator>Kurt Yoder</dc:creator>
    <dc:date>2011-11-16T18:26:55</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lib.urwid/1140">
    <title>Bug in decoration.py</title>
    <link>http://comments.gmane.org/gmane.comp.lib.urwid/1140</link>
    <description>&lt;pre&gt;Hi,
I don't know how to open a new ticket in the Trac, so I have to send an 
E-Mail to this list.
In the file "decoration.py" is a little bug:
http://excess.org/urwid/browser/urwid/decoration.py#L807
it should be:
if row &amp;lt; top or row &amp;gt;= maxrow-bottom:
&lt;/pre&gt;</description>
    <dc:creator>c_toennes10</dc:creator>
    <dc:date>2011-11-02T14:51:56</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lib.urwid/1135">
    <title>Urwid 1.0.0: it seems broken</title>
    <link>http://comments.gmane.org/gmane.comp.lib.urwid/1135</link>
    <description>&lt;pre&gt;G'day,


first congrats for this 1.0.0 release, it's always something special for 
a project :).

Unfortunately, I have bad news: after somebody used my XMPP client (with 
a console frontend based on Urwid) he contacted me because of crashes.
I saw he was using the new version, so I upgraded, and realized that my 
frontend (primitivus, see http://wiki.goffi.org/wiki/Salut_%C3%A0_Toi if 
you want the sources) is broken with this version.

I haven't tracked everything yet, but

- the method is_mouse_press is not available any more. After quickly 
watching the sources, it seems to be now in urwid.util , but I see no 
mention of that in the CHANGELOG.

- I have crashed in my app when I pressed an unicode key (like the 
french "é"). I quickly looked the code and saw in widget.py, line 983 
and beyong:

   tu = isinstance(text, unicode)
   [...]
   if tu:
       return text.encode('ascii') # follow python2's implicit 
conversion &amp;lt;=== crash

if tu is unicode, the crash is normal (the line should be "return 
text.encode('utf-8')"), but I'm not sure to understand the intention 
here, so it probably need more investigation.

- I see that there is now a Password widget, and I did one in my urwid 
library (Urwid Satext: http://wiki.goffi.org/wiki/Urwid-satext ); is it 
not possible to include this library directly into Urwid ? It will 
definitely need some work to follow urwid's coding style, and some tests 
additions, but it would avoid working two times on similar widgets like 
this. The issue is I too busy to work on it at the moment :(.

Anyway, I will downgrade do 0.9.9.1 for the moment and investigate more 
when I'll have some free time.

Cheers
Goffi
&lt;/pre&gt;</description>
    <dc:creator>Goffi</dc:creator>
    <dc:date>2011-10-02T21:28:53</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lib.urwid/1128">
    <title>ANN: Urwid 1.0.0 - Console UI Library</title>
    <link>http://comments.gmane.org/gmane.comp.lib.urwid/1128</link>
    <description>&lt;pre&gt;Announcing Urwid 1.0.0
----------------------

Urwid home page:
  http://excess.org/urwid/

Manual:
  http://excess.org/urwid/wiki/UrwidManual

Tarball:
  http://excess.org/urwid/urwid-1.0.0.tar.gz


About this release:
===================

This is a major feature release for Urwid:

It's the first official release that has support for Python 3.

There's a new experimental Terminal widget so you can terminal while you
terminal or write a screen-clone.

There's a new example showing how to serve Urwid interfaces to many
users simultaneously over ssh with Twisted.

There are new classes to help with creating dynamic tree views of
anything you have that's tree-like.

There are new widgets for working with pop-ups so you can now have all
the menu bars, drop-downs and combo-boxes you can write.

The old requirement to sprinkle draw_screen() calls around your
callbacks is gone.  Urwid now updates the screen automatically after
everything else is done.

There's a new simple MainLoop method for catching updates from other
threads and processes.  No need to manually fumble with os.pipe() and
event loops.

And lots more...

Happy 1.0 Urwid!  It's been a great nearly-seven years since our first
release.  Huge thanks to everyone that's contributed code, docs, bug
reports and help on the mailing list and IRC.


New in this release:
====================

  * New support for Python 3.2 from the same 2.x code base,
    requires distribute instead of setuptools (by Kirk McDonald,
    Wendell, Marien Zwart) everything except TwistedEventLoop and
    GLibEventLoop is supported

  * New experimental Terminal widget with xterm emulation and
    terminal.py example program (by aszlig)

  * Edit widget now supports a mask (for passwords), has a
    insert_text_result() method for full-field validation and
    normalizes input text to Unicode or bytes based on the caption
    type used

  * New TreeWidget, TreeNode, ParentNode, TreeWalker
    and TreeListBox classes for lazy expanding/collapsing tree
    views factored out of browse.py example program, with new
    treesample.py example program (by Rob Lanphier)

  * MainLoop now calls draw_screen() just before going idle, so extra
    calls to draw_screen() in user code may now be removed

  * New MainLoop.watch_pipe() method for subprocess or threaded
    communication with the process/thread updating the UI, and new
    subproc.py example demonstrating its use

  * New PopUpLauncher and PopUpTarget widgets and MainLoop option
    for creating pop-ups and drop-downs, and new pop_up.py example
    program

  * New twisted_serve_ssh.py example (by Ali Afshar) that serves
    multiple displays over ssh from the same application using
    Twisted and the TwistedEventLoop

  * ListBox now includes a get_cursor_coords() method, allowing
    nested ListBox widgets

  * Columns widget contents may now be marked to always be treated
    as flow widgets for mixing flow and box widgets more easily

  * New lcd_display module with support for CF635 USB LCD panel and
    lcd_cf635.py example program with menus, slider controls and a
    custom font

  * Shared command_map instance is now stored as Widget._command_map
    class attribute and may be overridden in subclasses or individual
    widgets for more control over special keystrokes

  * Overlay widget parameters may now be adjusted after creation with
    set_overlay_parameters() method

  * New WidgetPlaceholder widget useful for swapping widgets without
    having to manipulate a container widget's contents

  * LineBox widgets may now include title text

  * ProgressBar text content and alignment may now be overridden

  * Use reactor.stop() in TwistedEventLoop and document that Twisted's
    reactor is not designed to be stopped then restarted

  * curses_display now supports AttrSpec and external event loops
    (Twisted or GLib) just like raw_display

  * raw_display and curses_display now support the IBMPC character
    set (currently only used by Terminal widget)

  * Fix for a gpm_mev bug preventing user input when on the console

  * Fix for leaks of None objects in str_util extension

  * Fix for WidgetWrap and AttrMap not working with fixed widgets

  * Fix for a lock up when attempting to wrap text containing wide
    characters into a single character column


About Urwid
===========

Urwid is a console UI library for Python. It features fluid interface
resizing, Unicode support, multiple text layouts, simple attribute
markup, powerful scrolling list boxes and flexible interface design.

Urwid is released under the GNU LGPL.
&lt;/pre&gt;</description>
    <dc:creator>Ian Ward</dc:creator>
    <dc:date>2011-09-22T15:05:00</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.lib.urwid">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.lib.urwid</link>
  </textinput>
</rdf:RDF>

