February 2006
Intermediate to advanced
648 pages
14h 53m
English
The os module provides a portable interface to common operating-system services. It does this by searching for an OS-dependent built-in module such as nt or posix and exporting the functions and data as found there. Unless otherwise noted, functions are available on Windows and UNIX. UNIX systems include both Linux and Mac OS X.
The following general-purpose variables are defined:
environA mapping object representing the current environment variables. Changes to the mapping are reflected in the current environment.
linesepThe string used to separate lines on the current platform. May be a single character such as '\n' for POSIX or multiple characters such as '\r\n' for Windows.
nameThe name of the OS-dependent module imported: 'posix'
Read now
Unlock full access