[IPython-dev] IPython prompt delay

Frédéric Mantegazza mantegazza at ill.fr
Thu Dec 1 01:10:38 CST 2005


Le Mercredi 30 Novembre 2005 19:05, Fernando Perez a écrit :

> > It works, but it displays 'None' before PyMAD. It is because
> > time.sleep() returns None, I presume. How can I make it return an empty
> > string, instead ?
>
> Wrap it:
>
> def mysleep(t):
>    time.sleep(t)
>    return ''

I tied that, but IPython can't find my function. Where do I have to put it 
to be reachable by the prompt at runtime?

I found another solution :

    str(time.sleep(0.1))[1:0]

-- 
   Frédéric




More information about the IPython-dev mailing list