summaryrefslogtreecommitdiff
path: root/Lib/dos-8x3/test_sup.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/dos-8x3/test_sup.py')
-rwxr-xr-xLib/dos-8x3/test_sup.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/Lib/dos-8x3/test_sup.py b/Lib/dos-8x3/test_sup.py
index 7dc1940e31..3839c79be9 100755
--- a/Lib/dos-8x3/test_sup.py
+++ b/Lib/dos-8x3/test_sup.py
@@ -41,3 +41,15 @@ def fcmp(x, y): # fuzzy comparison function
TESTFN = '@test' # Filename used for testing
from os import unlink
+
+def findfile(file, here=__file__):
+ import os
+ if os.path.isabs(file):
+ return file
+ import sys
+ path = sys.path
+ path = [os.path.dirname(here)] + path
+ for dn in path:
+ fn = os.path.join(dn, file)
+ if os.path.exists(fn): return fn
+ return file