Author eric.snow
Recipients docs@python, eric.snow
Date 2019-03-01.16:36:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
PyInterpreterState_Main() is a function in the public C-API that returns a pointer to the main interpreter's state.  The main interpreter is the first one created by the CPython runtime during startup (e.g. when the "python" command is run).

Documentation for PyInterpreterState_Main() should be on the "Initialization, Finalization, and Threads" page of the C-API docs, probably in the "Sub-interpreter support" section. [1]  It could also possibly go in the "Advanced Debugger Support" section. [2]

FYI, I added PyInterpreterState_Main() at PyCon US 2017 (commit f5df46d701d29baf738365da6fcf1b8a3ceabb71) when I merged Nick Coghlan's internal implementation of PEP 432.  So it has been available since 3.7.

Date User Action Args
2019-03-01 16:36:40eric.snowsetrecipients: + eric.snow, docs@python
2019-03-01 16:36:40eric.snowsetmessageid: <>
2019-03-01 16:36:40eric.snowlinkissue36157 messages
2019-03-01 16:36:40eric.snowcreate