◐ Shell
clean mode source ↗

Message 343645 - Python tracker

I added Py_RunMain() in bpo-36763 which implements the PEP 587. IMHO it's the right solution for code like fontforge (see pseudo-code in my first message).

I'm no longer sure that we should deprecate calling Py_Main() after Py_Initialize(). Backward compatibility matters more here, no? Maybe the best we can do is to mention Py_RunMain() in Py_Main() documentation.

> PySys_SetArgvEx() can be called before Py_Initialize(), but arguments passed to this function are not parsed.

With the "Python Configuration" of PEP 587, PyConfig.argv is now parsed as Python command line arguments.

> INADA-san proposed to make the existing _Py_UnixMain() function public. (Currently, the function is private.)

The PEP 587 exposes this function with the name: Py_BytesMain().

--

I close the issue.