Python | os.confstr_names object
OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable way of using operating system dependent functionality.
os.confstr_names object in Python is a dictionary mapping of names accepted as parameter by os.confstr() method to the integer values defined for those names by the host operating system. This object is used to determine the set of names known to the system.
Note: os.confstr_names object is available only on UNIX platforms.
Syntax: os.confstr_names
Parameter: This is a non-callable object. Hence, no parameter is required.
Return Type: This object returns a dictionary having set of names known to the operating system as key and their corresponding integer value (defined by operating system) as value.
# Python program to explain os.confstr_names # importing os module import os # importing pprint module import pprint # Get the dictionry mapping of # names accepted by os.confstr() method # to their corresponding integer values # defined by host OS names = os.confstr_names # print the dictionary mapping # using pprint print("The list of names known to the operating system:") pprint.pprint(names, width = 1) |
The list of names known to the operating system:
{'CS_GNU_LIBC_VERSION': 2,
'CS_GNU_LIBPTHREAD_VERSION': 3,
'CS_LFS64_CFLAGS': 1004,
'CS_LFS64_LDFLAGS': 1005,
'CS_LFS64_LIBS': 1006,
'CS_LFS64_LINTFLAGS': 1007,
'CS_LFS_CFLAGS': 1000,
'CS_LFS_LDFLAGS': 1001,
'CS_LFS_LIBS': 1002,
'CS_LFS_LINTFLAGS': 1003,
'CS_PATH': 0,
'CS_XBS5_ILP32_OFF32_CFLAGS': 1100,
'CS_XBS5_ILP32_OFF32_LDFLAGS': 1101,
'CS_XBS5_ILP32_OFF32_LIBS': 1102,
'CS_XBS5_ILP32_OFF32_LINTFLAGS': 1103,
'CS_XBS5_ILP32_OFFBIG_CFLAGS': 1104,
'CS_XBS5_ILP32_OFFBIG_LDFLAGS': 1105,
'CS_XBS5_ILP32_OFFBIG_LIBS': 1106,
'CS_XBS5_ILP32_OFFBIG_LINTFLAGS': 1107,
'CS_XBS5_LP64_OFF64_CFLAGS': 1108,
'CS_XBS5_LP64_OFF64_LDFLAGS': 1109,
'CS_XBS5_LP64_OFF64_LIBS': 1110,
'CS_XBS5_LP64_OFF64_LINTFLAGS': 1111,
'CS_XBS5_LPBIG_OFFBIG_CFLAGS': 1112,
'CS_XBS5_LPBIG_OFFBIG_LDFLAGS': 1113,
'CS_XBS5_LPBIG_OFFBIG_LIBS': 1114,
'CS_XBS5_LPBIG_OFFBIG_LINTFLAGS': 1115}
Recommended Posts:
- Object Oriented Programming in Python | Set 2 (Data Hiding and Object Printing)
- Object Oriented Programming in Python | Set 1 (Class, Object and Members)
- Python | os.supports_bytes_environ object
- Python | object() method
- Python | os.supports_fd object
- Python | os.supports_bytes_environ object
- Python | os.environ object
- Python | os.supports_dir_fd object
- Python Object Comparison : "is" vs "=="
- Python | os.supports_follow_symlinks object
- Python | os.sysconf_names object
- Python | os.path.supports_unicode_filenames object
- pickle — Python object serialization
- Python | Check if a given object is list or not
- Python | Convert dictionary object into string
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



