• Home
  • Raw
  • Download

Lines Matching full:sys

1 """Append module search paths for third-party packages to sys.path.
8 Unix (including Mac OSX), it starts with sys.prefix and
9 sys.exec_prefix (if different) and appends
13 resulting directories, if they exist, are appended to sys.path, and
16 If a file named "pyvenv.cfg" exists one directory above sys.executable,
17 sys.prefix and sys.exec_prefix are set to that directory and
18 it is also checked for site-packages (sys.base_prefix and
19 sys.base_exec_prefix will always be the "real" prefixes of the Python
26 appended to sys.path, and also inspected for path configuration
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
36 For example, suppose sys.prefix and sys.exec_prefix are set to
52 Then the following directories are added to sys.path, in this order:
72 import sys
79 PREFIXES = [sys.prefix, sys.exec_prefix]
92 if sys.flags.verbose:
93 print(message, file=sys.stderr)
107 for m in set(sys.modules.values()):
129 """ Remove duplicate entries from sys.path along with making them
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:
191 sys.path.append(dir)
195 file=sys.stderr)
197 for record in traceback.format_exception(*sys.exc_info()):
199 print(' '+line, file=sys.stderr)
200 print("\nRemainder of file ignored", file=sys.stderr)
208 """Add 'sitedir' argument to sys.path if missing and handle .pth files in
218 sys.path.append(sitedir) # Add path component
242 if sys.flags.no_user_site:
270 if sys.platform == "vxworks":
280 if sys.platform == "darwin" and sys._framework:
281 return joinuser("~", "Library", sys._framework,
282 "%d.%d" % sys.version_info[:2])
289 version = sys.version_info
292 ver_nodot = sys.winver.replace('.', '')
295 if sys.platform == 'darwin' and sys._framework:
332 """Add a per user site-package to sys.path
364 libdirs = [sys.platlibdir]
365 if sys.platlibdir != "lib":
371 "python%d.%d" % sys.version_info[:2],
383 """Add site-packages to sys.path"""
409 builtins.copyright = _sitebuiltins._Printer("copyright", sys.copyright)
410 if sys.platform[:4] == 'java':
436 registering a sys.__interactivehook__.
491 sys.__interactivehook__ = register_readline
497 if sys.platform == 'darwin' and '__PYVENV_LAUNCHER__' in env:
498 executable = sys._base_executable = os.environ['__PYVENV_LAUNCHER__']
500 executable = sys.executable
503 sys._home = None
527 sys._home = value
529 sys.prefix = sys.exec_prefix = site_prefix
532 addsitepackages(known_paths, [sys.prefix])
537 PREFIXES.insert(0, sys.prefix)
539 PREFIXES = [sys.prefix]
556 if sys.flags.verbose:
557 sys.excepthook(*sys.exc_info())
559 sys.stderr.write(
576 if sys.flags.verbose:
577 sys.excepthook(*sys.exc_info())
579 sys.stderr.write(
593 orig_path = sys.path[:]
595 if orig_path != sys.path:
596 # removeduppaths() might make sys.path absolute.
608 if not sys.flags.isolated:
614 # Prevent extending of sys.path when python was started with -S and
616 if not sys.flags.no_site:
634 args = sys.argv[1:]
638 print("sys.path = [")
639 for dir in sys.path:
650 sys.exit(0)
661 sys.exit(0)
663 sys.exit(1)
665 sys.exit(2)
667 sys.exit(3)
670 print(textwrap.dedent(help % (sys.argv[0], os.pathsep)))
671 sys.exit(10)