[Numpy-discussion] Tentative fix for Numtut's view.py

Fernando Perez fperez at colorado.edu
Fri Feb 28 14:38:02 EST 2003


Hi all,

> Subject: [Numpy-discussion] Last call for v. 23
> 
> I am going to make a release of Numeric, 23.0. Fellow developers who are inspired
 > to fix a bug are urged to do so immediately.
> 
> This will be a bug fix release. 

in the scipy mailing list there were some discussions about view.py as 
included in NumTut.  It seems that many folks (including myself) have had 
problems with it, and they seem to be threading-related.  The symptom is that 
once view is imported, the interactive interpreter essentially locks up, and 
typing becomes nearly impossible.

I know next to nothing about threading, but in an attempt to fix the problem I 
stripped view.py bare of everything I didn't understand, until it worked :) 
Basically I removed all PIL and threading-related code, and left only the bare 
Tk code in place.

Naive as this approach was, it seems to have worked.  Some folks reported 
success, and David Ascher (the original author of view.py) suggested I submit 
this to the Numpy team as an update to the tutorial.  There's a good chance 
the current view is just broken and nobody has bothered to use it in a long time.

I'm attaching the new view here as a file, but if there is a different 
protocol I should follow, please let me know (patch, etc).

As I said, this was the most simple-minded thing I could do to make it work. 
So if you are interested in accepting this, it might be wise to have a look at 
it first.  On the upside, pretty much all I did was to _remove_ code, not to 
add anything.  So the analysis should be easy (the new code is far simpler and 
shorter than the original).

I've tested it personally under python 2.2.1 (the stock Redhat 8.0 install).

Best,

Fernando Perez.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: view.py
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20030228/f2f3f717/attachment.ksh>


More information about the NumPy-Discussion mailing list