[IPython-dev] ipipe news

John Hunter jdhunter at ace.bsd.uchicago.edu
Wed Mar 1 16:08:34 EST 2006

>>>>> "Walter" == Walter Dörwald <walter at livinglogic.de> writes:
    Walter> Hmm, this might require some kind of dialog box (or you
    Walter> mark the first object, go to the last object and press the
    Walter> key for "mark from first marked to here").

The latter is what I had in mind...

Here's a problem I ran into trying to filter all the methods that
start with 'set' on a matplotlib line object

In [17]: len([k.startswith('set') for k in line.__dict__.keys()])
Out[17]: 37

In [18]: line.__dict__|ifilter("key.startswith('set')")|ibrowse
Traceback (most recent call last):
  File "<ipython console>", line 1, in ?
  File "/usr/lib/python2.4/site-packages/IPython/Prompts.py", line
  517, in __call__
    manipulated_val = self.display(arg)
  File "/usr/lib/python2.4/site-packages/IPython/Prompts.py", line
  541, in _display
    return self.shell.hooks.result_display(arg)
  File "/usr/lib/python2.4/site-packages/IPython/hooks.py", line 126,
  in __call__
    ret = cmd(*args, **kw)
  File "/usr/lib/python2.4/site-packages/IPython/Extensions/ipipe.py",
  line 1995, in displayhook
    return obj.display()
  File "/usr/lib/python2.4/site-packages/IPython/Extensions/ipipe.py",
  line 1971, in display
    return curses.wrapper(self._dodisplay)
  File "/usr/lib/python2.4/curses/wrapper.py", line 44, in wrapper
    return func(stdscr, *args, **kwds)
  File "/usr/lib/python2.4/site-packages/IPython/Extensions/ipipe.py",
  line 1813, in _dodisplay
    for posy in xrange(posy+1, self.scrsizey-2):
UnboundLocalError: local variable 'posy' referenced before assignment

More information about the IPython-dev mailing list