@@ -1873,6 +1873,32 @@ static PyMethodDef PyDevConsoleInputAdapterFinishDef = {
18731873 " :meta private:\n " ,
18741874};
18751875
1876+ // -------------------------- dev_console_exec ---------------------------------
1877+
1878+ static auto PyDevConsoleExec (PyObject* self) -> PyObject* {
1879+ BA_PYTHON_TRY ;
1880+ BA_PRECONDITION (g_base->InLogicThread ());
1881+ auto * console = g_base->ui ->dev_console ();
1882+ BA_PRECONDITION (console);
1883+ console->Exec ();
1884+ Py_RETURN_NONE;
1885+ BA_PYTHON_CATCH ;
1886+ }
1887+
1888+ static PyMethodDef PyDevConsoleExecDef = {
1889+ " dev_console_exec" , // name
1890+ (PyCFunction)PyDevConsoleExec, // method
1891+ METH_NOARGS , // flags
1892+
1893+ " dev_console_exec() -> None\n "
1894+ " \n "
1895+ " :meta private:\n "
1896+ " \n "
1897+ " Run the dev console's current input, exactly as its Exec button\n "
1898+ " and the return key do. Used by the platform string editor to make\n "
1899+ " a submit-style commit run the line instead of just filling it in.\n " ,
1900+ };
1901+
18761902// -------------------------- audio_shutdown_begin -----------------------------
18771903
18781904static auto PyAudioShutdownBegin (PyObject* self) -> PyObject* {
@@ -2067,6 +2093,7 @@ auto PythonMethodsBase1::GetMethods() -> std::vector<PyMethodDef> {
20672093 PyGetDevConsoleInputTextDef,
20682094 PySetDevConsoleInputTextDef,
20692095 PyDevConsoleInputAdapterFinishDef,
2096+ PyDevConsoleExecDef,
20702097 PyAudioShutdownBeginDef,
20712098 PyAudioShutdownIsCompleteDef,
20722099 PyGraphicsShutdownBeginDef,
0 commit comments