Lines Matching refs:path
1 """Append module search paths for third-party packages to sys.path.
7 This will append site-specific paths to the module search path. On
13 resulting directories, if they exist, are appended to sys.path, and
14 also inspected for path configuration files.
26 appended to sys.path, and also inspected for path configuration
29 A path configuration file is a file whose name has the form
31 to be added to sys.path. Non-existing directories (or
32 non-directories) are never added to sys.path; no directory is added to
33 sys.path more than once. Blank lines and lines beginning with
38 with three subdirectories, foo, bar and spam, and two path
52 Then the following directories are added to sys.path, in this order:
59 omitted because it is not mentioned in either path configuration file.
97 dir = os.path.join(*paths)
99 dir = os.path.abspath(dir)
102 return dir, os.path.normcase(dir)
106 """Set all module __file__ and __cached__ attributes to an absolute path"""
119 m.__file__ = os.path.abspath(m.__file__)
123 m.__cached__ = os.path.abspath(m.__cached__)
129 """ Remove duplicate entries from sys.path along with making them
131 # This ensures that the initial path provided by the interpreter contains
135 for dir in sys.path:
143 sys.path[:] = L
148 """Return a set containing all existing file system items from sys.path."""
150 for item in sys.path:
152 if os.path.exists(item):
162 For each line in the file, either combine it with sitedir to a path
170 fullname = os.path.join(sitedir, name)
190 if not dircase in known_paths and os.path.exists(dir):
191 sys.path.append(dir)
208 """Add 'sitedir' argument to sys.path if missing and handle .pth files in
218 sys.path.append(sitedir) # Add path component
274 return os.path.expanduser(os.path.join(*args))
302 """Returns the `user base` directory path.
315 """Returns the user-specific site-packages directory path.
332 """Add a per user site-package to sys.path
337 # get the per user site-package path
342 if ENABLE_USER_SITE and os.path.isdir(user_site):
370 path = os.path.join(prefix, libdir,
373 sitepackages.append(path)
376 sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
380 """Add site-packages to sys.path"""
383 if os.path.isdir(sitedir):
420 here = os.path.dirname(os.__file__)
423 dirs.extend([os.path.join(here, os.pardir), here, os.curdir])
473 history = os.path.join(os.path.expanduser('~'),
500 exe_dir, _ = os.path.split(os.path.abspath(executable))
501 site_prefix = os.path.dirname(exe_dir)
506 os.path.join(exe_dir, conf_basename),
507 os.path.join(site_prefix, conf_basename)
509 if os.path.isfile(conffile)
585 """Add standard site-specific directories to the module search path.
592 orig_path = sys.path[:]
594 if orig_path != sys.path:
595 # removeduppaths() might make sys.path absolute.
613 # Prevent extending of sys.path when python was started with -S and
637 print("sys.path = [")
638 for dir in sys.path:
641 def exists(path):
642 if path is not None and os.path.isdir(path):