get_python_path.py 474 B

12345678910111213141516
  1. # coding:utf-8
  2. #!/usr/bin/python
  3. #
  4. # Copyright (c) Contributors to the Open 3D Engine Project.
  5. # For complete copyright and license terms please see the LICENSE at the root of this distribution.
  6. #
  7. # SPDX-License-Identifier: Apache-2.0 OR MIT
  8. #
  9. #
  10. # -------------------------------------------------------------------------
  11. """retreive the O3DE python path"""
  12. import sys
  13. from pathlib import Path
  14. py_exe = Path(sys.executable)
  15. py_dir = py_exe.parents[0]
  16. print(py_dir.resolve())