mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-05 03:20:08 +01:00
Some fixes for Py2
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
|
||||
import sys
|
||||
import os
|
||||
import glob
|
||||
import six
|
||||
|
||||
import wx
|
||||
from wx.svg import SVGimage
|
||||
|
||||
@@ -23,6 +26,8 @@ class SVGRenderPanel(wx.Panel):
|
||||
|
||||
|
||||
def SetSVGFile(self, svg_filename):
|
||||
if six.PY2 and isinstance(svg_filename, unicode):
|
||||
svg_filename = svg_filename.encode(sys.getfilesystemencoding())
|
||||
self._img = SVGimage.CreateFromFile(svg_filename)
|
||||
self.Refresh()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user