Core & system · BUILT-IN MODULE
os
Operating-system and environment helpers.
Quick start
use os
say os.platform
say os.cwd
if os.has_env "HOME"
say os.getenv "HOME"API reference
os.platformCurrent platform name.
Current platform name.
os.cwdCurrent working directory.
Current working directory.
os.getenv nameRead an environment variable.
讀取 an environment variable.
os.has_env nameCheck whether an environment variable exists.
檢查是否 an environment variable exists.