2023-10-09 19:29:22 +00:00
|
|
|
diff --git a/spyder/app/start.py b/spyder/app/start.py
|
|
|
|
index 97b08a600..66486e510 100644
|
|
|
|
--- a/spyder/app/start.py
|
|
|
|
+++ b/spyder/app/start.py
|
|
|
|
@@ -6,20 +6,8 @@
|
2023-01-11 07:51:40 +00:00
|
|
|
# (see spyder/__init__.py for details)
|
|
|
|
# -----------------------------------------------------------------------------
|
2023-10-09 19:29:22 +00:00
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
-# Remove PYTHONPATH paths from sys.path before other imports to protect against
|
|
|
|
-# shadowed standard libraries.
|
|
|
|
import os
|
|
|
|
import sys
|
|
|
|
-if os.environ.get('PYTHONPATH'):
|
|
|
|
- for path in os.environ['PYTHONPATH'].split(os.pathsep):
|
2023-10-09 19:29:22 +00:00
|
|
|
- if os.name == 'nt' and 'pkgs' in path:
|
|
|
|
- # Don't remove pynsist installer entry for 'pkgs' directory
|
|
|
|
- continue
|
|
|
|
- else:
|
|
|
|
- try:
|
|
|
|
- sys.path.remove(path.rstrip(os.sep))
|
|
|
|
- except ValueError:
|
|
|
|
- pass
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
# Standard library imports
|
|
|
|
import ctypes
|