Skip to content

Instantly share code, notes, and snippets.

@mouseroot
Created August 15, 2018 20:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mouseroot/a80a38e9b8810df3a3978056bd710a6c to your computer and use it in GitHub Desktop.
Save mouseroot/a80a38e9b8810df3a3978056bd710a6c to your computer and use it in GitHub Desktop.
Python 3+ one-liner to print the environment variables
python -c "import os;print(os.getenv('path').replace(';','\n'))"
C:\Windows\system32
C:\Windows
C:\Windows\System32\Wbem
C:\Windows\System32\WindowsPowerShell\v1.0\
C:\Program Files\nodejs\
C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common
C:\Users\Jon\AppData\Local\Programs\Python\Python37-32\Scripts
C:\Users\Jon\AppData\Roaming\npm
C:\Python27\
C:\Users\Jon\AppData\Local\Programs\Python\Python37-32
C:\Program Files\Microsoft VS Code\bin
C:\Users\Jon\AppData\Roaming\npm
C:\Users\Jon\AppData\Local\Programs\Python\Python37-32\Scripts
C:\Users\Jon\AppData\Roaming\npm
C:\Python27\
C:\Users\Jon\AppData\Local\Programs\Python\Python37-32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment