[IPython-user] Testers requested - 0.7.4.rc1, with async cross-thread exceptions
Nicolas Pernetty
nicopernetty@yahoo...
Sat Apr 7 07:18:43 CDT 2007
On Thu, 5 Apr 2007 00:13:05 -0600, "Fernando Perez"
<fperez.net@gmail.com> wrote :
> one glaring limitation of our multithreaded shells is the unfortunate
> lack of support for Ctrl-C, so you can't interrupt a long computation
> with any of the multithreaded shells.
>
> I would *greatly* appreciate if others could test current SVN with
> this. Try hitting Ctrl-C in all kinds of situations, with long
> running code, with matplotlib, etc.
Hello,
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 ***
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)
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)
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...
Unfortunately I only got a W32 box at works and I won't get back there
until tuesday so I can't be of any help to debug this until tuesday.
Regards,
c:\ipython>"C:\Python25\python.exe" -i
"C:\Python25\Scripts\ipython" -pylab -colors LightBG
Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit
(Intel)]
Type "copyright", "credits" or "license" for more information.
IPython 0.7.4.rc1 -- An enhanced Interactive Python.
? -> Introduction to IPython's features.
%magic -> Information about IPython's 'magic' % functions.
help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.
Welcome to pylab, a matplotlib-based Python environment.
For more information, type 'help(pylab)'.
In [1]: import time
In [2]: time.sleep(5)
------------------------------------------------------------------------
---
<type 'exceptions.KeyboardInterrupt'> Traceback (most recent call
last)
C:\Python25\Lib\site-packages\IPython\Shell.py in OnTimer(self, event)
844 def OnTimer(self, event):
845 update_tk(self.tk)
--> 846 self.IP.runcode()
847
848 class App(self.wx.App):
C:\Python25\Lib\site-packages\IPython\Shell.py in runcode(self)
442 if got_lock:
443 self.thread_ready.notify()
--> 444 InteractiveShell.runcode(self,code_to_run)
445 else:
446 break
C:\Python25\lib\site-packages\IPython\iplib.py in runcode(self,
code_obj)
1925 self.CustomTB(etype,value,tb)
1926 except:
-> 1927 self.showtraceback()
1928 else:
1929 outflag = 0
C:\Python25\lib\site-packages\IPython\iplib.py in showtraceback(self,
exc_tuple, filename, tb_offset)
1486 self.CustomTB(etype,value,tb)
1487 else:
-> 1488
self.InteractiveTB(etype,value,tb,tb_offset=tb_offset)
1489 if self.InteractiveTB.call_pdb and
self.has_readline:
1490 # pdb mucks up readline, fix it back
C:\Python25\Lib\site-packages\IPython\ultraTB.py in __call__(self,
etype, evalue, etb, out, tb_offset)
869 self.tb_offset = tb_offset
870 else:
--> 871 print >> out, self.text(etype, evalue, etb)
872 self.debugger()
873
C:\Python25\Lib\site-packages\IPython\ultraTB.py in text(self, etype,
value, tb, context, mode)
876 etype,value,tb = sys.exc_info()
877 self.tb = tb
--> 878 return
FormattedTB.text(self,etype,value,tb,context=5,mode=mode)
879
880
#-----------------------------------------------------------------------
----
C:\Python25\Lib\site-packages\IPython\ultraTB.py in text(self, etype,
value, tb, context, mode)
797 if mode in self.verbose_modes:
798 # verbose modes need a full traceback
--> 799 return VerboseTB.text(self,etype, value,
tb,context=5)
800 else:
801 # We must check the source cache because otherwise
we can print
C:\Python25\Lib\site-packages\IPython\ultraTB.py in text(self, etype,
evalue, etb, context)
429
430 # some internal-use functions
--> 431 def text_repr(value):
432 """Hopefully pretty robust repr equivalent."""
433 # this is pretty horrible but should always return
*something*
<type 'exceptions.KeyboardInterrupt'>:
More information about the IPython-user
mailing list