remove most of Python2 compatibility code

This commit is contained in:
Alexandre Detiste
2024-03-22 00:06:03 +01:00
committed by Scott Talbert
parent beb9932241
commit 0257f755cf
108 changed files with 220 additions and 2144 deletions

View File

@@ -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__))

View 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:

View File

@@ -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):