mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-16 09:40:07 +01:00
remove most of Python2 compatibility code
This commit is contained in:
committed by
Scott Talbert
parent
beb9932241
commit
0257f755cf
@@ -5,8 +5,7 @@ import wx
|
||||
import wx.adv
|
||||
import os
|
||||
import sys
|
||||
|
||||
from six import BytesIO
|
||||
from io import BytesIO
|
||||
|
||||
try:
|
||||
dirName = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
@@ -4,15 +4,13 @@
|
||||
import os
|
||||
import string
|
||||
import random
|
||||
import sys
|
||||
from io import BytesIO
|
||||
|
||||
import wx
|
||||
import wx.lib.colourselect as csel
|
||||
import wx.lib.colourutils as cutils
|
||||
|
||||
import sys
|
||||
|
||||
from six import BytesIO
|
||||
|
||||
try:
|
||||
dirName = os.path.dirname(os.path.abspath(__file__))
|
||||
except:
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
import sys
|
||||
import os
|
||||
import wx
|
||||
import six
|
||||
import time
|
||||
import datetime
|
||||
import operator
|
||||
@@ -27,12 +26,7 @@ except ImportError: # if it's not there locally, try the wxPython lib.
|
||||
bitmapDir = os.path.join(dirName, 'bitmaps')
|
||||
sys.path.append(os.path.split(dirName)[0])
|
||||
|
||||
# helper function to make sure we don't convert unicode objects to strings
|
||||
# or vice versa when converting lists and None values to text.
|
||||
convert = str
|
||||
if six.PY2:
|
||||
if 'unicode' in wx.PlatformInfo:
|
||||
convert = unicode
|
||||
|
||||
|
||||
def FormatFileSize(size):
|
||||
|
||||
Reference in New Issue
Block a user