--- a/controls/FolderTree.py Mon Mar 27 10:19:14 2023 +0200
+++ b/controls/FolderTree.py Fri Oct 28 12:39:15 2022 +0800
@@ -23,7 +23,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-from __future__ import absolute_import
+
import os
import wx
@@ -31,7 +31,7 @@
from util.BitmapLibrary import GetBitmap
-DRIVE, FOLDER, FILE = range(3)
+DRIVE, FOLDER, FILE = list(range(3))
def sort_folder(x, y):
@@ -99,7 +99,7 @@
self.Filters = {}
if self.Filter is not None:
filter_parts = filter.split("|")
- for idx in xrange(0, len(filter_parts), 2):
+ for idx in range(0, len(filter_parts), 2):
if filter_parts[idx + 1] == "*.*":
self.Filters[filter_parts[idx]] = ""
else:
@@ -115,7 +115,7 @@
def _GetFolderChildren(self, folderpath, recursive=True):
items = []
if wx.Platform == '__WXMSW__' and folderpath == "/":
- for c in xrange(ord('a'), ord('z')):
+ for c in range(ord('a'), ord('z')):
drive = os.path.join("%s:\\" % chr(c))
if os.path.exists(drive):
items.append((drive, DRIVE, self._GetFolderChildren(drive, False)))