Skip to content
UPEEC

os

Operating-system interfaces: environment variables, processes, directories and low-level files.

Easy
Comments 0
import os
os.environ.get("API_KEY")
os.getcwd(), os.listdir("."), os.cpu_count()
os.makedirs("out/plots", exist_ok=True)

For paths prefer pathlib.

Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.

Discussion (0)

Sign in or join free to ask questions and discuss this topic.