From 104df59a68449cfda2bc1a9d46532e3f0f5e99e6 Mon Sep 17 00:00:00 2001 From: AbyssYuan0 Date: Sat, 16 Mar 2024 10:21:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=87=E5=89=B2=E8=A7=86=E9=A2=91=E8=BE=93?= =?UTF-8?q?=E5=87=BA=E7=9B=AE=E5=BD=95=E5=8E=BB=E9=99=A4=E7=A9=BA=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- videoCut.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/videoCut.py b/videoCut.py index 60d5ced..7805076 100644 --- a/videoCut.py +++ b/videoCut.py @@ -162,12 +162,12 @@ def cutToDir(root_dir, cutList): dirIndex = 0 pngList = sorted(os.listdir(root_dir)) dirList = [] - dirPathString = "" + dirPathList = [] for i in range(len(cutList) + 1): dirName = str(i).zfill(3) dirPath = os.path.join(root_dir, dirName) os.mkdir(dirPath) - dirPathString += (dirPath + '\n') + dirPathList.append(dirPath) dirList.append(dirName) for png in pngList: src = os.path.join(root_dir, png) @@ -176,4 +176,4 @@ def cutToDir(root_dir, cutList): if png in cutList: dirIndex += 1 - return dirPathString + return "\n".join(dirPathList)