[IPython-user] Testers requested - 0.7.4.rc1, with async cross-thread exceptions

Fernando Perez fperez.net@gmail....
Sat Apr 7 16:41:28 CDT 2007


On 4/7/07, Nicolas Pernetty <nicopernetty@yahoo.fr> wrote:

> I've tested this release on Windows XP and Python 2.5 and here are the
> few bugs that I've noticed :
>
> 1) There is still a strange bug on the Win32 postinstall script.
> Everything seems to be OK but at the end of postinstall script I got
> this message :
> *** run_installscript: internal error 0xFFFFFFFF ***

OK, I'll look into this next...

> 2) postinstall script hasn't been updated with the patch I sent you, so
> there is no ipython.bat created in the 'Scripts' directory of Python (I
> haven't found any other way to make it work with Xemacs on Win32)

Oops, fixed.  I applied the original patch in the IPython subdir, so I
missed that one and didn't notice any error message.  Sorry 'bout
that.

> 3) This line in iplib.py (line 1983) :
> line = raw_input_original(prompt).decode(sys.stdin.encoding)
> is breaking IPython in Xemacs on Windows XP because there is no
> sys.stdin.encoding :
> In [1]: import sys
> In [2]: print sys.stdin.encoding
> None
>
> I suggest to have something like :
> if sys.stdin.encoding != None:
>   line = raw_input_original(prompt).decode(sys.stdin.encoding)
> else:
>   line = raw_input_original(prompt)

Fixed (a bit differently).  I'd like some feedback on which is a
better fallback: 'ascii' or 'UTF-8' though.  I simply don't know.

> 4) The Ctrl-C works with basic examples on IPython from standard shell
> but it somehow breaks on IPython from Xemacs.
> The exception is raised, but I couldn't get the prompt back (see log
> output at the end of this email).
> I can type or hit enter but it doesn't seem to do anything...

All I can say is that it works fine for me under Emacs/Linux (I do
have to type C-c C-c, since Emacs traps the first C-c):

In [5]:run wallis_pi.py

In [6]: pi(10000)
  C-c C-c---------------------------------------------------------------------------
exceptions.KeyboardInterrupt                         Traceback (most
recent call last)

/home/fperez/teach/py4science/examples/<ipython console>

/home/fperez/teach/py4science/examples/wallis_pi.py in pi(n)
     20     for i in xrange(1,n+1):
     21         tmp = 4*i*i
---> 22         num *= tmp
     23         den *= tmp-1
     24     return 2.0*(num/den)

KeyboardInterrupt:

In [7]: import time

In [8]:
In [9]: time.sleep(10)
  C-c C-c---------------------------------------------------------------------------
exceptions.KeyboardInterrupt                         Traceback (most
recent call last)

/home/fperez/teach/py4science/examples/<ipython console>

KeyboardInterrupt:

In [10]: __IP.isthreaded
Out[10]: True

In [11]: print "Salut Nicolas"
Salut Nicolas

In [12]:


I can interrupt computations, time.sleep, etc fine so far (this is a
threaded shell running in -pylab mode with the WX matplotlib backend).

Further testing is obviously appreciated, just make sure you are
running with current SVN.

Thanks for the feedback, I'll get back to you with news on the Win
installer problem...

Cheers,

f


More information about the IPython-user mailing list