[IPython-dev] PyMAD/IPython which list updated

Frédéric Mantegazza mantegazza at ill.fr
Wed Mar 23 11:53:11 EST 2005

Le Mercredi 23 Mars 2005 16:16, Fernando Perez a écrit :

> 3.
> Just have a look at OInspect.getdoc, it shows exactly what is done. 
> IPython will call getdoc() on anything you pass to it, so as long as you
> provide getdoc() in the proper places, you can do anything you want. 
> This is just a protocol for getting information, it's up to you to
> provide whatever information you want over that protocol.

Ok, so there is no way to have obj.method? syntax works the way I want, 
since IPython will call obj.method.getdoc(), which has no sens...

In the case a __call__ method is defined, using obj? syntax will print 
additionnal informations:

>>> Spectro?
Type:           instance
Base Class:     Pyro.core.DynamicProxyWithAttrs
String Form:    <DynamicProxyWithAttrs for
Namespace:      Interactive
    Proxy for Spectrometer.

    This is a test of docstring.
Callable:       Yes
Call def:       Spectro(self, *vargs, **kargs)

Could it be possible to print the Docstring informations after all other 
ones ?

> 5.
> http://ipython.scipy.org/doc/manual/node11.html

Thank's !

> 6.
> As far as I can see, that's all correct in terms of indentation, and
> using up-arrow doesn't change any colors.  If you have any problems here,
> please, instead of trying to describe it, paste the _exact_ output that
> you get, along with indicating what you think it should be.  There may
> well be a problem, but I simply don't see any in the cases I've tested
> (and I cant test your actual prompt, which depends on all sorts of things
> which are local to your environment).

The 'problem' occurs only when you have a multi-lineprompt, ie when using 
one or more '\n' char:

prompt_in1 '${genutils.getoutput("date")} \n In [\#]: '

Then, the output is:

mer mar 23 16:46:29 CET 2005
 In [1]: for i in xrange(3):
                                   ...:     print i

For the color problem (sorry, can't repoduce it here !), it only occures on 
the second line (in fact, the last one) when going up in the history. In 
the above example, only 'In [' turns to white; not the remaining of the 

Well, put this at the end of your todo list, as it is not very important ! 
I've just made this test to simulate a status bar...

> 8.
> Plain impossible.  IPython is not a curses program, and those things can
> only be done via curses.  A line-oriented program like ipython simply
> can't do that kind of thing, since it has no access to the screen as a
> 2-d space, only to the current line.  You could write a curses wrapper
> which runs ipython inside of it, and does what you want.  But that's
> clearly beyond what ipython can do, because curses is not portable to
> win32 platforms (and is in general a PITA to use).

Ok, this was a bad idea !


More information about the IPython-dev mailing list