Python | os.sysconf_names object

File handling | NLP | Python Methods and Functions | String Variables

The os.sysconf_names object in Python is a dictionary that maps names taken as a parameter by the method os.sysconf () to the integer values ​​defined for these names by the host operating system. This object is used to define a set of names known to the system.

Note: os.sysconf_names is only available on UNIX platforms.

Syntax: os.sysconf_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.

Code: using the os.sysconf_names object

# Python program to explain the os.sysconf_names object

 
#import the os module

import os

 
# import pprint module

import pprint

 
# Get the dictionary display
# names accepted by os.sysconf ()
# their corresponding integer values ​​
# defined by host OS

names = os.sysconf_names

  

  
# print the dictionary display
# use pprint

print ( " The list of names known to the operating system: " )

pprint.pprint (names, width = 1 , height = 1 )

Exit :

 The list of names known to the operating system: {'SC_2_CHAR_TERM': 95,' SC_2_C_BIND': 47, 'SC_2_C_DEV': 48,' SC_2_C_VERSION' : 96, 'SC_2_FORT_DEV': 49,' SC_2_FORT_RUN': 50, 'SC_2_LOCALEDEF': 52,' SC_2_SW_DEV': 51, 'SC_2_UPE': 97,' SC_2_VERSION': 46, 'SC_AIO_LISTIO_MAX': 24 , 'SC_AIO_PRIO_DELTA_MAX': 25,' SC_ARG_MAX': 0, 'SC_ASYNCHRONOUS_IO': 12,' SC_ATEXIT_MAX': 87, 'SC_AVPHYS_PAGES': 86,' SC_BC_BASE_MAX': 36, 'SC_BC_BC SC_BC_STRING_MAX': 39, 'SC_CHARCLASS_NAME_MAX': 45,' SC_CHAR_BIT': 101, 'SC_CHAR_MAX': 102,' SC_CHAR_MIN': 103, 'SC_CHILD_MAX': 1,' SC_CLK_TCK': 2, 'SC_CHAR_BIT': : 26, 'SC_EQUIV_CLASS_MAX': 41,' SC_EXPR_NEST_MAX': 42, 'SC_FSYNC': 15,' SC_GETGR_R_SIZE_MAX': 69, 'SC_GETPW_R_SIZE_MAX': 70, SC_INT_MAX_: 104, ''' , 'SC_JOB_CONTROL': 7,' SC_LINE_MAX': 43, 'SC_LOGIN_NAME_MAX': 71,' SC_LONG_BIT': 106, 'SC_MAPPED_FILES': 16,' SC_MB_LEN_MAX ': 108,' SC_MEMLOCK': 17, 'SC_MEMLOCK_RANGE': 18,' SC_MEMORY_PROTECTION': 19, 'SC_MESSAGE_PASSING': 20,' SC_MQ_OPEN_MAX': 27, 'SC_MQ_PRIO_MAX': 28_ SCXMANGROUUPS 119, 'SC_NL_LANGMAX': 120,' SC_NL_MSGMAX': 121, 'SC_NL_NMAX': 122,' SC_NL_SETMAX': 123, 'SC_NL_TEXTMAX': 124,' SC_NPROCESSORS_CONF': 83, 'SC_NLPROCESS': 83,' SC_NL_NPROCESS' 'SC_OPEN_MAX': 4,' SC_PAGESIZE': 30, 'SC_PAGE_SIZE': 30,' SC_PASS_MAX': 88, 'SC_PHYS_PAGES': 85,' SC_PII': 53, 'SC_PII_INTERNET': 56,' SC_PII_INTERNET_DGRINTER ': 61,' SC_PII_OSI': 57, 'SC_PII_OSI_CLTS': 64,' SC_PII_OSI_COTS': 63, 'SC_PII_OSI_M': 65,' SC_PII_SOCKET': 55, 'SC_PII_XTI': 54,' SC_POLL_PRI': 58, 'SC_PII_OSI_M': 65,' SC_PII_SOCKET': 55, 'SC_PII_XTI': 54,' SC_POLL_PRI': 58, 13, 'SC_PRIORITY_SCHEDULING': 10,' SC_REALTIME_SIGNALS': 9, 'SC_RE_DUP_MAX': 44,' SC_RTSIG_MAX': 31, 'SC_SAVED_IDS': 8,' SC_SCHAR_MAX': 111, 'SC_SCHAR_MECT': 59,' SC_SCHAR_MECT': 59 'SC_SEMAPHORES': 21,' SC_SEM_NSEMS_MAX': 32, 'SC_SEM_VALUE_MAX': 33,' SC_SHARED_MEMORY_OBJECTS': 22, 'S C_SHRT_MAX': 113, 'SC_SHRT_MIN': 114,' SC_SIGQUEUE_MAX': 34, 'SC_SSIZE_MAX': 110,' SC_STREAM_MAX': 5, 'SC_SYNCHRONIZED_IO': 14,' SC_THREADSTHREAD_STREADS 78, 'SC_THREAD_DESTRUCTOR_ITERATIONS': 73,' SC_THREAD_KEYS_MAX': 74, 'SC_THREAD_PRIORITY_SCHEDULING': 79,' SC_THREAD_PRIO_INHERIT': 80, 'SC_THREAD_PRIO_PROTECT': 81,' SC_THREAD_PROCESS_SHARED': 82, 'SC_THREAD_SAFE_FUNCTIONS': 68,' SC_THREAD_STACK_MIN': 75 , 'SC_THREAD_THREADS_MAX': 76,' SC_TIMERS': 11, 'SC_TIMER_MAX': 35,' SC_TTY_NAME_MAX': 72, 'SC_TZNAME_MAX': 6,' SC_T_IOV_MAX': 66, 'SC_UCHAR_MAX': 115 SC_UIO_MAXIOV': 60, 'SC_ULONG_MAX': 117,' SC_USHRT_MAX': 118, 'SC_VERSION': 29,' SC_WORD_BIT': 107, 'SC_XBS5_ILP32_OFF32': 125,' SC_XBS5_ILP32_OFFLBIG': 126BIG : 128, 'SC_XOPEN_CRYPT': 92,' SC_XOPEN_ENH_I18N': 93, 'SC_XOPEN_LEGACY': 129,' SC_XOPEN_REALTIME': 130, 'SC_XOPEN_REALTIME_THREADS': 131,' SC_XOPEN_SHM' C_XOPEN_UNIX': 91, 'SC_XOPEN_VERSION': 89,' SC_XOPEN_XCU_VERSION': 90, 'SC_XOPEN_XPG2': 98,' SC_XOPEN_XPG3': 99, 'SC_XOPEN_XPG4': 100} 




Tutorials