On Wed, Apr 15, 2009 at 12:07 PM, Fernando Perez <fperez....@gmail.com>wrote:
>
>
> The dialog, instead of adding '.png', is adding 'png.png' to the
> filename. I'm pretty sure this used to work fine a while ago.
>
> I don't know if the problem exists with all the backends. Wx at least
> seems to manually add the .png extension in the right place...
Hey Fernando,
Thanks for the report. Apparently there are some longstanding vis-a-vis
extension handling issues with the tk dialog asksaveasfilename that we use.
Eg,
http://mail.python.org/pipermail/python-list/2002-June/150051.html
I just applied a possible fix which seems to work in my tests -- the fix and
comments are inlined below in case anyone more knowledgeable than tkagg than
I has some feedback::
# adding a default extension seems to break the
# asksaveasfilename dialog when you choose various save types
# from the dropdown. Passing in the empty string seems to
# work - JDH
#defaultextension = self.canvas.get_default_filetype()
defaultextension = ''
fname = asksaveasfilename(
master=self.window,
title='Save the figure',
filetypes = tk_filetypes,
defaultextension = defaultextension
)
svn up and give this a test drive under a few different save/extension
scenarios
JDH
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel