From 8c7f72528e2470bbcdde489b560f2e68fcdefd7d Mon Sep 17 00:00:00 2001 From: yuyuyzl Date: Tue, 26 Jul 2022 01:12:11 +0800 Subject: [PATCH] launcher --- launcher.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/launcher.py b/launcher.py index d3f5c5a..462e35b 100644 --- a/launcher.py +++ b/launcher.py @@ -30,9 +30,9 @@ finally: args = default_arg p = None - +dirPath='data/images' characterList = [] -for item in sorted(os.listdir('character'), key=lambda x: -os.path.getmtime(os.path.join('character', x))): +for item in sorted(os.listdir(dirPath), key=lambda x: -os.path.getmtime(os.path.join(dirPath, x))): if '.png' == item[-4:]: characterList.append(item[:-4]) @@ -189,7 +189,7 @@ def closeWindow(): def handle_focus(event): characterList = [] if event.widget == root: - for item in sorted(os.listdir('character'), key=lambda x: -os.path.getmtime(os.path.join('character', x))): + for item in sorted(os.listdir(dirPath), key=lambda x: -os.path.getmtime(os.path.join(dirPath, x))): if '.png' == item[-4:]: characterList.append(item[:-4]) char_combo.config(value=characterList)