[IPython-user] startup file

fred fredmfp@gmail....
Wed May 7 15:11:56 CDT 2008


Ville M. Vainio a écrit :
> On Mon, Apr 28, 2008 at 6:38 PM, fred <fredmfp@gmail.com> wrote:
> 
>>  sys.displayhook = display_init
> 
> The deal is that you can't set sys.displayhook in IPython. You need to
> use the exposed result_display hook.
Sorry, but I don't understand.

I wrote in my display_init.py file:

import __builtin__

def result_display(self, arg):
     if arg is None:
         return
     __builtin__._ = None
     print arg
     __builtin__._ = arg

and I import it from my ipythonrc file:
import_mod display_init

But this has no effect.

What am I doing wrong ?

TIA.

Cheers,

-- 
Fred


More information about the IPython-user mailing list