@@ -1605,6 +1605,75 @@ customized Python always running in isolated mode using
16051605:c:func:`Py_RunMain`. 
16061606
16071607
1608+ Runtime Python configuration API 
1609+ ================================ 
1610+ 
1611+ The configuration option *name* parameter must be a non-NULL null-terminated 
1612+ UTF-8 encoded string. 
1613+ 
1614+ Some options are read from the :mod:`sys` attributes. For example, the option 
1615+ ``"argv"`` is read from :data:`sys.argv`. 
1616+ 
1617+ 
1618+ .. c:function:: PyObject* PyConfig_Get(const char *name)  
1619+ 
1620+    Get the current runtime value of a configuration option as a Python object. 
1621+ 
1622+    * Return a new reference on success. 
1623+    * Set an exception and return ``NULL `` on error. 
1624+ 
1625+    The object type depends on the configuration option. It can be: 
1626+ 
1627+    * ``bool `` 
1628+    * ``int `` 
1629+    * ``str `` 
1630+    * ``list[str] `` 
1631+    * ``dict[str, str] `` 
1632+ 
1633+    The caller must hold the GIL. The function cannot be called before 
1634+    Python initialization nor after Python finalization. 
1635+ 
1636+    .. versionadded :: 3.14  
1637+ 
1638+ 
1639+ .. c :function :: int  PyConfig_GetInt (const char *name, int *value)   
1640+ 
1641+    Similar to :c:func: `PyConfig_Get `, but get the value as a C int. 
1642+ 
1643+    * Return ``0 `` on success. 
1644+    * Set an exception and return ``-1 `` on error. 
1645+ 
1646+    .. versionadded :: 3.14  
1647+ 
1648+ 
1649+ .. c :function :: PyObject* PyConfig_Names (void)  
1650+ 
1651+    Get all configuration option names as a ``frozenset``. 
1652+ 
1653+    * Return a new reference on success. 
1654+    * Set an exception and return ``NULL`` on error. 
1655+ 
1656+    The caller must hold the GIL. The function cannot be called before 
1657+    Python initialization nor after Python finalization. 
1658+ 
1659+    .. versionadded:: 3.14 
1660+ 
1661+ 
1662+ .. c:function:: int PyConfig_Set(const char *name, PyObject *value)  
1663+ 
1664+    Set the current runtime value of a configuration option. 
1665+ 
1666+    * Raise a :exc: `ValueError ` if there is no option *name *. 
1667+    * Raise a :exc: `ValueError ` if *value * is an invalid value. 
1668+    * Raise a :exc: `ValueError ` if the option is read-only (cannot be set). 
1669+    * Raise a :exc:`TypeError` if *value* has not the proper type. 
1670+ 
1671+    The caller must hold the GIL. The function cannot be called before 
1672+    Python initialization nor after Python finalization. 
1673+ 
1674+    .. versionadded:: 3.14 
1675+ 
1676+ 
16081677Py_GetArgcArgv() 
16091678================ 
16101679
0 commit comments