Issue #26587: Allow .pth files to specify file paths as well as
directories.

Thanks to Wolfgang Langner for the bug report and initial version of
the patch.
diff --git a/Lib/site.py b/Lib/site.py
index 56ba709..b66123f 100644
--- a/Lib/site.py
+++ b/Lib/site.py
@@ -131,13 +131,13 @@
 
 
 def _init_pathinfo():
-    """Return a set containing all existing directory entries from sys.path"""
+    """Return a set containing all existing file system items from sys.path."""
     d = set()
-    for dir in sys.path:
+    for item in sys.path:
         try:
-            if os.path.isdir(dir):
-                dir, dircase = makepath(dir)
-                d.add(dircase)
+            if os.path.exists(item):
+                _, itemcase = makepath(item)
+                d.add(itemcase)
         except TypeError:
             continue
     return d
@@ -150,9 +150,9 @@
     """
     if known_paths is None:
         known_paths = _init_pathinfo()
-        reset = 1
+        reset = True
     else:
-        reset = 0
+        reset = False
     fullname = os.path.join(sitedir, name)
     try:
         f = open(fullname, "r")
@@ -190,9 +190,9 @@
     'sitedir'"""
     if known_paths is None:
         known_paths = _init_pathinfo()
-        reset = 1
+        reset = True
     else:
-        reset = 0
+        reset = False
     sitedir, sitedircase = makepath(sitedir)
     if not sitedircase in known_paths:
         sys.path.append(sitedir)        # Add path component