Repository: ipython/ipython

Issue:
`pinfo` broken on latest master
Trying to use `?` in latest master results in this traceback:

```
In [1]: int?
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-1-bd0a4f8c5f8e> in <module>()
----> 1 get_ipython().magic(u'pinfo int')

/home/ssanderson/quantopian/ipython/IPython/core/interactiveshell.pyc in magic(self, arg_s)
   2300         magic_name, _, magic_arg_s = arg_s.partition(' ')
   2301         magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
-> 2302         return self.run_line_magic(magic_name, magic_arg_s)
   2303
   2304     #-------------------------------------------------------------------------

/home/ssanderson/quantopian/ipython/IPython/core/interactiveshell.pyc in run_line_magic(self, magic_name, line)
   2221                 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
   2222             with self.builtin_trap:
-> 2223                 result = fn(*args,**kwargs)
   2224             return result
   2225

/home/ssanderson/quantopian/ipython/IPython/core/magics/namespace.pyc in pinfo(self, parameter_s, namespaces)

/home/ssanderson/quantopian/ipython/IPython/core/magic.pyc in <lambda>(f, *a, **k)
    191     # but it's overkill for just that one bit of state.
    192     def magic_deco(arg):
--> 193         call = lambda f, *a, **k: f(*a, **k)
    194
    195         if callable(arg):

/home/ssanderson/quantopian/ipython/IPython/core/magics/namespace.pyc in pinfo(self, parameter_s, namespaces)
     59         else:
     60             self.shell._inspect('pinfo', oname, detail_level=detail_level,
---> 61                                 namespaces=namespaces)
     62
     63     @line_magic

/home/ssanderson/quantopian/ipython/IPython/core/interactiveshell.pyc in _inspect(self, meth, oname, namespaces, **kw)
   1565                 pmethod(info.obj, oname, formatter)
   1566             elif meth == 'pinfo':
-> 1567                 pmethod(info.obj, oname, formatter, info, **kw)
   1568             else:
   1569                 pmethod(info.obj, oname)

/home/ssanderson/quantopian/ipython/IPython/core/oinspect.pyc in pinfo(self, obj, oname, formatter, info, detail_level)
    640         text = self._format_info(obj, oname, formatter, info, detail_level)
    641         if text:
--> 642             page.page(text)
    643
    644     def info(self, obj, oname='', formatter=None, info=None, detail_level=0):

/home/ssanderson/quantopian/ipython/IPython/core/page.pyc in page(data, start, screen_lines, pager_cmd)
    261     if ip:
    262         try:
--> 263             ip.hooks.show_in_pager(data, start=start, screen_lines=screen_lines)
    264             return
    265         except TryNext:

/home/ssanderson/quantopian/ipython/IPython/core/hooks.pyc in __call__(self, *args, **kw)
    135             #print "prio",prio,"cmd",cmd #dbg
    136             try:
--> 137                 return cmd(*args, **kw)
    138             except TryNext as exc:
    139                 last_exc = exc

TypeError: show_in_pager() got an unexpected keyword argument 'start'
```



Discussion:
Looks like this code was changed by c0ca98677c35b4ca107b219168baab246388be5a


Resolving patch:
diff --git a/IPython/core/hooks.py b/IPython/core/hooks.py
--- a/IPython/core/hooks.py
+++ b/IPython/core/hooks.py
@@ -173,7 +173,7 @@ def late_startup_hook(self):
     #print "default startup hook ok" # dbg
 
 
-def show_in_pager(self,s):
+def show_in_pager(self, data, start, screen_lines):
     """ Run a string through pager """
     # raising TryNext here will use the default paging functionality
     raise TryNext


Test patch: