ipipe fails on OSX while trying to access SIGWINCH

Bug #566675 reported by Radek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
IPython
Fix Committed
Undecided
Unassigned

Bug Description

System:
OSX 10.6.3
Python 2.5.4
IPython 0.10

Steps to reproduce:
> from ipipe import *
> ils | ibrowse

Error:
              <195> ---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)

/Users/Radek/<ipython console> in <module>()

/sw/lib/python2.5/site-packages/IPython/Prompts.pyc in __call__(self, arg)
    550
    551 # and now call a possibly user-defined print mechanism
--> 552 manipulated_val = self.display(arg)
    553
    554 # user display hooks can change the variable to be stored in

/sw/lib/python2.5/site-packages/IPython/Prompts.pyc in _display(self, arg)
    574 """
    575 try:
--> 576 return IPython.generics.result_display(arg)
    577 except TryNext:
    578 return self.shell.hooks.result_display(arg)

/sw/lib/python2.5/site-packages/IPython/external/simplegeneric.pyc in dispatch(*args, **kw)
     73 f = _gbt(t, _sentinel)
     74 if f is not _sentinel:
---> 75 return f(*args, **kw)
     76 else:
     77 return func(*args, **kw)

/sw/lib/python2.5/site-packages/IPython/Extensions/ipipe.pyc in display_tableobject(obj)
   2306
   2307 def display_tableobject(obj):
-> 2308 return display_display(defaultdisplay(obj))
   2309 generics.result_display.when_type(Table)(display_tableobject)
   2310

/sw/lib/python2.5/site-packages/IPython/Extensions/ipipe.pyc in display_display(obj)
   2302 if generics is not None:
   2303 def display_display(obj):
-> 2304 return obj.display()
   2305 generics.result_display.when_type(Display)(display_display)
   2306

/sw/lib/python2.5/site-packages/IPython/Extensions/ibrowse.pyc in display(self)
   1759 def display(self):
   1760 if hasattr(curses, "resize_term"):
-> 1761 oldhandler = signal.signal(signal.SIGWINCH, self.sigwinchhandler)
   1762 try:
   1763 return curses.wrapper(self._dodisplay)

AttributeError: 'module' object has no attribute 'SIGWINCH'

Comment: idump works nicely

Revision history for this message
Radek (szklarczyk) wrote :

I propose to change the line in ibrowse.display(self)

        if hasattr(curses, "resize_term"):

to

        if hasattr(curses, "resize_term") and getattr(signal, 'SIGWINCH', None):

Revision history for this message
Fernando Perez (fdo.perez) wrote :

Fix committed to 0.10.1 and trunk (though in trunk ipipe is currently disabled until it gets updated to current apis).

Changed in ipython:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.