Changing contents of currently displayed listbox in urwid/python2.6
<p>I'm writing a music player in python, with a cli using urwid. I intend to have the current playlist in a simpleListWalker, wrapped by a listbox, then columns, a pile, and finally a frame. </p>

<p>How do I replace the entire contents of this listbox (or simpleListWalker) with something else?</p>

<p>Relevant code:</p>

<pre><code>class mainDisplay(object):
...
    def renderList(self):
       songList = db.getListOfSongs()
       songDictList = [item for item in songList if item['location'] in 
       commandSh.currentPlaylists[commandSh.plyr.currentList]]
       self.currentSongWidgets = self.createList(songDictList)
       self.mainListContent = urwid.SimpleListWalker([urwid.AttrMap(w, None, 
       'reveal focus') for w in self.currentSongWidgets])
    def initFace(self):#this is the init function that creates the interface
        #on startup
        ...
        self.scanPlaylists()
        self.renderList()
        self.mainList = urwid.ListBox(self.mainListContent)
        self.columns = urwid.Columns([self.mainList, self.secondaryList])
        self.pile = urwid.Pile([self.columns, 
        ("fixed", 1, self.statusDisplayOne), 
        ("fixed", 1, self.statusDisplayTwo), 
        ("fixed", 1, self.cmdShInterface)], 3)
        self.topFrame = urwid.Frame(self.pile)
</code></pre>

<p>Full code at: <a href="http://github.com/ripdog/PyPlayer/tree/cli" rel="nofollow">http://github.com/ripdog/PyPlayer/tree/cli</a> - Check main.py for interface code.</p>

<p>The code is in a pretty bad state right now, and I've only been programming for two months. Any suggestions on code style, layout, or any other tips you may have are very much appreciated.</p>
