[IPython-dev] getdoc hook

Frédéric Mantegazza mantegazza at ill.fr
Fri Apr 8 05:03:25 EDT 2005


I found a way to get Pyro remote object docstrings :o) So I'm trying to 
implement this in IPython. But I have some questions:

1) (not really a IPython specific question) As I have to modify a little bit 
the OInspect.getdoc() function, I'm trying to rebind this function to mine, 
but it does not work :o( How can I do this ? Here is my code:

import PyMAD.client.ipython.IPython.OInspect

def getdoc(obj):

PyMAD.client.ipython.IPython.OInspect.getdoc = getdoc

Where am I wrong ?

Fernando, could it be possible to add a hook to rebind this function in a 
better way ? It would also be nice to have a hook to change the whole 
getdoc behaviour. I mean, I would like to use my own Inspector class (at 
least to be able to overide some parts of it).

2) Why is the getdoc() function always called, even when I don't use the 
'obj?' syntax ?

3) Is it possible make difference in 'obj.?' and 'obj.??' syntaxes at the 
getdoc() level ? If not, where is it handled ?


More information about the IPython-dev mailing list