SourceForge logo
SourceForge logo
Menu

matplotlib-devel

From: James A. B. <jb...@no...> - 2004年04月17日 22:28:29
Hi,
 After i posted a version of this question on the 
matplotlib-users list i decided it would probably be better
to post it on the devel list. Here is the problem, if i include 
any one of the following three lines: 
from matplotlib.backends.backend_wx import FigureCanvasWx
#from matplotlib.backends.backend_wx import Toolbar
#from matplotlib.backends.backend_wx import FigureManager
 
(here only the first one is uncommented...same result if i
use either of the other two) in a file (test.py) and then type: 
python test.py
i get:
floyd:/home/jbenson/python>python test.py
[Debug] 15:17:10: Adding duplicate image handler for 'PNG file'
[Debug] 15:17:10: Adding duplicate image handler for 'JPEG file'
[Debug] 15:17:10: Adding duplicate image handler for 'TIFF file'
[Debug] 15:17:10: Adding duplicate image handler for 'GIF file'
[Debug] 15:17:10: Adding duplicate image handler for 'PNM file'
[Debug] 15:17:10: Adding duplicate image handler for 'PCX file'
[Debug] 15:17:10: Adding duplicate image handler for 'XPM file'
[Debug] 15:17:10: Adding duplicate image handler for 'Windows icon file'
[Debug] 15:17:10: Adding duplicate image handler for 'Windows cursor file'
[Debug] 15:17:10: Adding duplicate image handler for 'Windows animated 
cursor file'
floyd:/home/jbenson/python>
If i try the same line from a python prompt line:
floyd:/home/jbenson>python
Python 2.3.3 (#1, Dec 21 2003, 15:13:18)
[GCC 3.3.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from matplotlib.backends.backend_wx import FigureCanvasWx
>>>
...no extra debug lines. I'm using matplotlib-0.52. Does anyone recognize
where those [Debug] statements are coming from, and how i could
get them to not show up? 
Thanks,
Jim
From: John H. <jdh...@ac...> - 2004年04月17日 22:40:45
Hi Jim,
I responded to this earlier today on matplotlib-users. Here is a copy
of my post. I'm very interested in getting some feedback if you try
the suggestion below.
JDH
>>>>> "Jim" == Jim Benson <jb...@se...> writes:
 Jim> Hi,
 Jim> I seem to be seeing some extra debug output. I have been
 Jim> using the wx background and the embedding_in_wx.py example as
 Jim> a template for how to make matplotlib plots in an app i'm
 Jim> writing. This part works great!! I am however seeing what
 Jim> appears to be a debug flag left on somewhere?
No, this is in the wx code. I traced it to the line
 wxInitAllImageHandlers()
Miraculously, I commented this out, got rid of the annoying messages,
and fixed the wx exception swallowing bug! Jeremy and I have been
killing ourselves for about 6 months trying to figure out why backend
wx was swallowing our exceptions, and I can't really convey how happy
I am to have found this. We have tried all manner of hacks, google
searches and plantive pleas to get our exceptions back to no avail.
It made debugging wx virtually impossible.
Please test this change on your system. win32 users, I would also be
much obliged if you could try commenting this out on your system to
see if you lose functionality. On my linux box, the figures came up
as expected, I was able to print to jpg and png, so all looks well.
Note, wxagg is in CVS if you need some of the agg features that native
wx drawing does not provide. But it looks like all systems are go for
a release next week so you may as well wait.
JDH
From: James A. B. <jb...@no...> - 2004年04月17日 22:58:02
Hi John,
 My apologies for apparently missing your earlier response.
Interesting enough, last night when i was looking around in the 
backend_wx.py code for what might be causing those debug messages,
i thought that line: 
> wxInitAllImageHandlers() 
in conjunction the "Adding duplicate image handler" looked
suspect. I briefly thought about commenting it out...but i
figured that would probably break the tool bar icons etc. 
As you suggested, i tried commenting that line out, and sure
enough: no debug messages...and my app that does some plotting 
appears to work fine.
Thanks a lot!!
Glad my report led you to a problem you were looking for.
Jim
On 2004年4月17日, John Hunter wrote:
> 
> Hi Jim,
> 
> I responded to this earlier today on matplotlib-users. Here is a copy
> of my post. I'm very interested in getting some feedback if you try
> the suggestion below.
> 
> JDH
> 
> 
> >>>>> "Jim" == Jim Benson <jb...@se...> writes:
> 
> Jim> Hi,
> 
> Jim> I seem to be seeing some extra debug output. I have been
> Jim> using the wx background and the embedding_in_wx.py example as
> Jim> a template for how to make matplotlib plots in an app i'm
> Jim> writing. This part works great!! I am however seeing what
> Jim> appears to be a debug flag left on somewhere?
> 
> No, this is in the wx code. I traced it to the line
> 
> wxInitAllImageHandlers()
> 
> Miraculously, I commented this out, got rid of the annoying messages,
> and fixed the wx exception swallowing bug! Jeremy and I have been
> killing ourselves for about 6 months trying to figure out why backend
> wx was swallowing our exceptions, and I can't really convey how happy
> I am to have found this. We have tried all manner of hacks, google
> searches and plantive pleas to get our exceptions back to no avail.
> It made debugging wx virtually impossible.
> 
> Please test this change on your system. win32 users, I would also be
> much obliged if you could try commenting this out on your system to
> see if you lose functionality. On my linux box, the figures came up
> as expected, I was able to print to jpg and png, so all looks well.
> 
> Note, wxagg is in CVS if you need some of the agg features that native
> wx drawing does not provide. But it looks like all systems are go for
> a release next week so you may as well wait.
> 
> JDH
> 
> 
-- 
Dr. James A. Benson
United States Naval Observatory
Navy Prototype Optical Interferometer
Flagstaff, AZ 86001
Email: jb...@no...
 jb...@se...
Voice: 928-773-4868/928-779-5132
Fax: 928-779-9568
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /