Default filename backend extensions #1

Merged
merged 2 commits into from May 31, 2012

Projects

None yet

2 participants

@pelson

Relates to the matplotlib pull request matplotlib:#908

@mspacek mspacek and 1 other commented on an outdated diff May 31, 2012
lib/matplotlib/backend_bases.py
@@ -2085,6 +2088,15 @@ def set_window_title(self, title):
if hasattr(self, "manager"):
self.manager.set_window_title(title)
+ def get_default_filename(self):
+ """
+ Return a string, which includes extension, suitable for use as
+ a default filename.
+ """
+ default_filename = self.get_window_title() or 'image'
+ default_filename = default_filename.lower().replace(' ', '_')
@mspacek
mspacek May 31, 2012

Do we really want to enforce lowercase filenames? Capitalization in the window title might be important.

@pelson
pelson May 31, 2012

:-) I will remove it and highlight it in the mpl pull request for discussion.

@mspacek
Owner

Otherwise, looks good! Thanks!

@mspacek mspacek merged commit 0488038 into mspacek:default_filename May 31, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment