Python Module os
Jump to navigation
Jump to search
External
Internal
Overview
Environment Variables
import os
print(os.environ.get('HOME'))
If the environment variable does not exist, the call will get None
import os
print(os.environ.get('HOME'))
If the environment variable does not exist, the call will get None