Python os.confstr_names Object
Example
Print the dictionary mapping defined by operating system :
#Import os Library
import os
#Import pprint Library
import
pprint
names = os.confstr_names
#Print the dictionary names
and values
print("The list of names known to the OS:")
pprint.pprint(names,
width = 1)
Try it Yourself »
Definition and Usage
The os.confstr_names
object returns a dictionary
of the names and integer values that is accepted as parameter for the
os.confstr() method.
Note: Available only on UNIX platforms.
Syntax
os.confstr_names
Technical Details
Return Value: | A dict type, representing a list of names
and integer values defined by operating system.
|
---|---|
Python Version: | 2.0 |