From 06887bd17dd04cb6314cc215424b041dda7dca87 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 20 Sep 2015 16:38:51 +0300 Subject: hercules: add support for convert all non free sprites. --- hercules/code/fileutils.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'hercules/code/fileutils.py') diff --git a/hercules/code/fileutils.py b/hercules/code/fileutils.py index 44ec591..2cf106b 100644 --- a/hercules/code/fileutils.py +++ b/hercules/code/fileutils.py @@ -73,3 +73,10 @@ def makeDir(path): def removeAllFiles(path): if os.path.exists(path): shutil.rmtree(path) + +def findFileIn(names, dirs): + for name in names: + for path in dirs: + if os.path.exists(path + name): + return path + return None -- cgit v1.2.3-70-g09d2