From d86795d8846fac4ed0786019f1e69de655e3326b Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 12 Sep 2017 15:38:49 -0700 Subject: [PATCH] Don't use the string module. Do use the new file dialog style flags. --- wx/lib/plot/plotcanvas.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/wx/lib/plot/plotcanvas.py b/wx/lib/plot/plotcanvas.py index e1b7c20b..12eaa0a0 100644 --- a/wx/lib/plot/plotcanvas.py +++ b/wx/lib/plot/plotcanvas.py @@ -14,7 +14,6 @@ __docformat__ = "restructuredtext en" # Standard Library import sys -import string as _string import time as _time # Third-Party @@ -342,7 +341,7 @@ class PlotCanvas(wx.Panel): "png": wx.BITMAP_TYPE_PNG, # Save a PNG file. } - fType = _string.lower(fileName[-3:]) + fType = fileName[-3:].lower() dlg1 = None while fType not in extensions: @@ -369,12 +368,12 @@ class PlotCanvas(wx.Panel): ".", "", wildcard_str, - wx.SAVE | wx.OVERWRITE_PROMPT, + wx.FD_SAVE | wx.FD_OVERWRITE_PROMPT, ) if dlg1.ShowModal() == wx.ID_OK: fileName = dlg1.GetPath() - fType = _string.lower(fileName[-3:]) + fType = fileName[-3:].lower() else: # exit without saving dlg1.Destroy() return False