More operating system functions

import os

print(os.getcwd())
# Get an environment variable, 
# return None if it doesn't exist.
print(os.getenv("USER"))

# With the variable environ you get a dictionary 
# with all set system variables
print(os.environ)

# With the chdir() function the current 
# working directory can be changed.
os.chdir("/path/directory-name")
Output
mik
environ({ ... 'TERM_PROGRAM': 'vscode','LIBRARY_PATH': '/usr/local/lib', 'PYTHONIOENCODING': 'UTF-8', 'PYTHONUNBUFFERED': '1', 'PYDEVD_USE_FRAME_EVAL': 'NO' ... })