[Urwid] Fwd: ScrollView, TabView, SplitView and a question

Patrick Totzke patricktotzke at gmail.com
Wed Feb 13 09:55:23 EST 2013


BTW, your test script dies upon keyboard input for me:

----------------------------------------------------------
~/projects/mt_urwid] python test.py                                               master 

Traceback (most recent call last):
  File "test.py", line 299, in <module>
    loop.run()
  File "/home/pazz/.local/lib/python2.7/site-packages/urwid-1.2.0_dev-py2.7-linux-i686.egg/urwid/main_loop.py", line 272, in run
    self.screen.run_wrapper(self._run)
  File "/home/pazz/.local/lib/python2.7/site-packages/urwid-1.2.0_dev-py2.7-linux-i686.egg/urwid/raw_display.py", line 242, in run_wrapper
    return fn()
  File "/home/pazz/.local/lib/python2.7/site-packages/urwid-1.2.0_dev-py2.7-linux-i686.egg/urwid/main_loop.py", line 337, in _run
    self.event_loop.run()
  File "/home/pazz/.local/lib/python2.7/site-packages/urwid-1.2.0_dev-py2.7-linux-i686.egg/urwid/main_loop.py", line 708, in run
    self._loop()
  File "/home/pazz/.local/lib/python2.7/site-packages/urwid-1.2.0_dev-py2.7-linux-i686.egg/urwid/main_loop.py", line 787, in _loop
    self._watch_files[fd]()
  File "/home/pazz/.local/lib/python2.7/site-packages/urwid-1.2.0_dev-py2.7-linux-i686.egg/urwid/main_loop.py", line 388, in _update
    self.process_input(keys)
  File "/home/pazz/.local/lib/python2.7/site-packages/urwid-1.2.0_dev-py2.7-linux-i686.egg/urwid/main_loop.py", line 488, in process_input
    k = self._topmost_widget.keypress(self.screen_size, k)
  File "/home/pazz/.local/lib/python2.7/site-packages/urwid-1.2.0_dev-py2.7-linux-i686.egg/urwid/container.py", line 1560, in keypress
    key = self.focus.keypress(tsize, key)
  File "/home/pazz/.local/lib/python2.7/site-packages/urwid-1.2.0_dev-py2.7-linux-i686.egg/urwid/container.py", line 2241, in keypress
    key = w.keypress((mc,) + size[1:], key)
  File "/home/pazz/.local/lib/python2.7/site-packages/urwid-1.2.0_dev-py2.7-linux-i686.egg/urwid/container.py", line 1103, in keypress
    return self.body.keypress( (maxcol, remaining), key )
  File "/home/pazz/projects/mt_urwid/scrollview.py", line 351, in keypress
    return self._area.keypress(self, (areax, areay), key)
TypeError: keypress() takes exactly 3 arguments (4 given)
----------------------------------------------------------

apart from this it looks nice.
maybe we can host some sort of code-scnippet repository to include stuff like this (or other contrib-widgets)?

/p

Quoting Ian Ward (2013-02-13 14:49:07)
> Sorry for the slow reply, I need to fix my spam filtering.
> 
> Urwid's mouse event handling doesn't go beyond col/row 255, but I'd be
> happy to add SGR 1006 handling.  Can you point me to the information
> about this protocol and what terminals support it?
> 
> On Tue, Feb 5, 2013 at 1:34 PM, R J Cooper
> <support01 at mountainstorm.co.uk> wrote:
> > I've been playing around with urwid and I like it; it reminds me of the glory days of TurboVision.  Whilst playing around I've created a simple TabView, SplitView and ScrollView and thought I'd share them in case anyone else is interested.  They need some work; documentation, a bit of tidying up and the scrollview needs to translate events when it passes them through to its content.
> >
> > Have a look: https://github.com/mountainstorm/mt_urwid
> >
> > in return I've got a question.  How do I enable SGR 1006 (in both my terminal and urwid).  I know my terminal (iTerm2) supports SGR 1006, and I'm guessing I need to do "export TERM=xterm-1006" - I currently do "export TERM=xterm-1003" ... but I get an error with 1006.  Should it work and if not, is there any other way I can get mouse events for col/rows beyond 225ish?
> >
> > Thanks
> >
> > Rich
> >
> >
> >
> > _______________________________________________
> > Urwid mailing list
> > Urwid at lists.excess.org
> > http://lists.excess.org/mailman/listinfo/urwid
> 
> _______________________________________________
> Urwid mailing list
> Urwid at lists.excess.org
> http://lists.excess.org/mailman/listinfo/urwid



More information about the Urwid mailing list