diff --git a/timeseriesviewer/__init__.py b/timeseriesviewer/__init__.py index be185bdced7f2f0d99b0f59750da00cdd9cb2d57..a1a1e988d5fc037f15e2864b105fc780c0d398b8 100644 --- a/timeseriesviewer/__init__.py +++ b/timeseriesviewer/__init__.py @@ -44,5 +44,15 @@ def file_search(rootdir, wildcard, recursive=False, ignoreCase=False): results.append(os.path.join(root, file)) if not recursive: break + pass return results + +def findAbsolutePath(file): + if os.path.exists(file): return file + possibleRoots = [DIR_EXAMPLES, DIR_REPO, os.getcwd()] + for root in possibleRoots: + tmp = jp(root, file) + if os.path.exists(tmp): + return tmp + return None \ No newline at end of file