()
| 52 | |
| 53 | |
| 54 | def print_env_info(): |
| 55 | which_cmd = "where" if platform.system() == "Windows" else "which" |
| 56 | |
| 57 | python = "python" |
| 58 | |
| 59 | def locate_python(): |
| 60 | nonlocal python |
| 61 | |
| 62 | python = subprocess.getoutput(f"{which_cmd} python") |
| 63 | python = python.split("\n") |
| 64 | python = python[0].strip() |
| 65 | print("python: ", python) |
| 66 | |
| 67 | locate_python() |
| 68 | |
| 69 | def run(cmd): |
| 70 | with subprocess.Popen(cmd) as p: |
| 71 | p.wait() |
| 72 | |
| 73 | run([which_cmd, "git"]) |
| 74 | run(["git", "--version"]) |
| 75 | run([which_cmd, "python"]) |
| 76 | run([python, "--version"]) |
| 77 | |
| 78 | print(f"PATH={os.environ['PATH']}") |
| 79 | |
| 80 | # if platform.system() == "Windows": |
| 81 | # print(f"COMSPEC={os.environ['COMSPEC']}") |
| 82 | # print("") |
| 83 | # run("wmic path win32_VideoController get name,AdapterRAM,DriverDate,DriverVersion".split(" ")) |
| 84 | |
| 85 | print(f"PYTHONPATH={os.environ['PYTHONPATH']}") |
| 86 | print("") |
| 87 | |
| 88 | |
| 89 | def open_dev_shell(): |
no test coverage detected