Sturla Molden wrote:
>> If you use the new matplotlib 0.90.1 version then this has gone away.
> 
> I do, and it hasn't gone away. I used the binary installer for Python 2.5
> on Windows (matplotlib-0.90.1.win32-py2.5.exe).
> 
> When I looked at the code in SVN, the bug was there as well.

That's what I'd expect. in 0.90.0, I think all that was changed was the 
build code, so that the accelerator no longer builds be default.

Sturla Molden wrote:
> _wxagg.pyd has a dependency on a unicode version of a "hybrid" (i.e. 
> debug) wxWidgets library, wxmsw26uh_vc.dll. I verified this using MSVC 
> dumpbin utility. No users of wxPython 2.8 will have this dll installed.

anyone doing a clean install of MPL 0.90 should have _wxagg.pyd either.

> At the bottom of the file backends_wxagg.py, there is an import 
> statement for _wxagg.pyd:
> 
> try:
>      import _wxagg
> except ImportError:
>      _wxagg = None
> 
> Obviously this import always fails on wxPython 2.8, and is the cause of 
> the redundant error message. _wxagg.pyd is not needed with wxPython 2.8, 
> so the import should not be attempted at all.

That was supposed to be checking whether _wxagg.pyd was there at all. If 
it's there with wxPython2.8, something odd happened -- maybe not that 
odd, it could happen if wxPython were upgraded after MPL was installed, 
but only if it's an old MPL or the accelerator build was turned on on 
purpose, overriding the default. I suspect you installed MPL 0.90 over 
an older version, which causes problems in various errors -- maybe the 
Windows binary installer could do some clean up first?

So the key is this -- the accelerator is deprecated, so this shouldn't 
come up , and a couple versions down the road, we could probably remove 
the attempt to import it.

> Instead, it should read like this:
> 
> if getattr(wx, '__version__', '0.0')[0:3] < '2.8':
>      try:
>          import _wxagg # C++ accelerator with wxPython 2.6
>      except ImportError:
>          _wxagg = None # default to pure Python
> else: # wxPython 2.8, no accelerator needed
>      _wxagg = None

That would probably work fine, but I'm not sure it's even worth it, 
unless anyone wants to run the accelerator with 2.6 and also have 2.8 
installed, switching between them with wxversion -- a small pool of people!


By the way, why not just:

if wx.__version__[0:3] < '2.8'

or even

wx.__version__ < '2.8'

which is think works fine.

-Chris





-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

[EMAIL PROTECTED]

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to