
The os System Module
|
93
printable
Combination of digits, letters, punctuation, and
whitespace.
punctuation
String of characters that are considered punctuation
characters.
uppercase
Usually 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.
whitespace
String containing space, tab, linefeed, return, formfeed,
and vertical tab.
The os System Module
The os module is the primary operating system (OS) services
interface. It provides generic operating-system support and a
standard, platform-independent OS interface. The
os mod-
ule includes tools for environments, processes, files, shell
commands, and much more. It also includes a nested sub-
module,
os.path, which provides a portable interface to
directory processing tools.
Scripts that use
os and os.path for systems programming are
generally portable across most Python platforms. However,
some
os exports are not available on all platforms (e.g., fork
is available on Unix but not Windows). Because the portabil-
ity of such calls changes over time, consult the Python
Library Reference for platform details.
Administrative Tools
Following are some miscellaneous module-related exports.
error
Known as both os.error and built-in OSError exception.
Raised for
os module-related errors. The accompanying
value is a pair containing the numeric error code from