Files
openide/python/helpers/syspath.py
Mikhail Golubev d2e5565c9e PY-53088 Make syspath.py helper work regardless of the way it's launched
Previously, it relied on the path the script was launched with to detect and
exclude "helpers" root from the results. Now it uses __file__ to find
the directory it resides in.

GitOrigin-RevId: fd3edce1a6a33fd82607953f75cafa5c558373cd
2022-02-21 13:59:14 +00:00

9 lines
181 B
Python

import os.path
import sys
_helpers_root = os.path.dirname(os.path.abspath(__file__))
for root in sys.path:
if root != _helpers_root and root != os.curdir:
print(root)