Add standard site-specific directories to the module search path. This function is called automatically when this module is imported, unless the python interpreter was started with the -S flag.
()
| 688 | |
| 689 | |
| 690 | def main(): |
| 691 | """Add standard site-specific directories to the module search path. |
| 692 | |
| 693 | This function is called automatically when this module is imported, |
| 694 | unless the python interpreter was started with the -S flag. |
| 695 | """ |
| 696 | global ENABLE_USER_SITE |
| 697 | |
| 698 | orig_path = sys.path[:] |
| 699 | known_paths = removeduppaths() |
| 700 | if orig_path != sys.path: |
| 701 | # removeduppaths() might make sys.path absolute. |
| 702 | # Fix __file__ of already imported modules too. |
| 703 | abs_paths() |
| 704 | |
| 705 | known_paths = venv(known_paths) |
| 706 | if ENABLE_USER_SITE is None: |
| 707 | ENABLE_USER_SITE = check_enableusersite() |
| 708 | known_paths = addusersitepackages(known_paths) |
| 709 | known_paths = addsitepackages(known_paths) |
| 710 | setquit() |
| 711 | setcopyright() |
| 712 | sethelper() |
| 713 | if not sys.flags.isolated: |
| 714 | enablerlcompleter() |
| 715 | execsitecustomize() |
| 716 | if ENABLE_USER_SITE: |
| 717 | execusercustomize() |
| 718 | |
| 719 | # Prevent extending of sys.path when python was started with -S and |
| 720 | # site is imported later. |
no test coverage detected
searching dependent graphs…