The os package

The os package

The os packages contains various modules pertaining to Operating System functionality such as:

Concurrency

  1. Process, to launch child processes

  2. JobPool, to easily control a pool of child processes

  3. Coro, which provides a basic coroutine implementation

I/O

  1. Terminal, used to control terminal text output (color, etc.)

  2. Pipe, to open, read from, and write to pipes

  3. Dynlib, which deals with dynamic library loading

  4. mmap, which exposes memory mapping capabilities

System

  1. System, to get information such as the number of processors, the hostname, etc.

  2. Env, to deal with environment variables

  3. ShellUtils, used mostly to find executables

  4. Time, to get the current time and date, and sleep