os

Stdlib — OS/FilePython 2.0+Beginner

Interface to the OS: env vars, process management, file operations

Quick Info

Documentation
Official Docs
Python Version
2.0+
Dependencies
None — Python Standard Library
Install
Included with Python

Learn by Difficulty

Quick Example

python
import os

print(f"Current directory: {os.getcwd()}")
print(f"Platform: {os.name}")
print(f"CPU count: {os.cpu_count()}")
print(f"Path separator: {os.sep}")

The os module is part of Python's standard library. Interface to the OS: env vars, process management, file operations.

Try in Playground

Tags

stdlibfile-iosystemprocessenvironment

Related Items