mirror of
https://github.com/python/cpython.git
synced 2025-08-23 02:04:56 +00:00
gh-111201: A new Python REPL (GH-111567)
Co-authored-by: Łukasz Langa <lukasz@langa.pl> Co-authored-by: Marta Gómez Macías <mgmacias@google.com> Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
parent
40cc809902
commit
f27f8c790a
41 changed files with 5328 additions and 170 deletions
|
@ -2395,6 +2395,21 @@ sys__get_cpu_count_config_impl(PyObject *module)
|
|||
return config->cpu_count;
|
||||
}
|
||||
|
||||
/*[clinic input]
|
||||
sys._baserepl
|
||||
|
||||
Private function for getting the base REPL
|
||||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
sys__baserepl_impl(PyObject *module)
|
||||
/*[clinic end generated code: output=f19a36375ebe0a45 input=ade0ebb9fab56f3c]*/
|
||||
{
|
||||
PyCompilerFlags cf = _PyCompilerFlags_INIT;
|
||||
PyRun_AnyFileExFlags(stdin, "<stdin>", 0, &cf);
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
/*[clinic input]
|
||||
sys._is_gil_enabled -> bool
|
||||
|
||||
|
@ -2579,6 +2594,7 @@ static PyMethodDef sys_methods[] = {
|
|||
SYS_UNRAISABLEHOOK_METHODDEF
|
||||
SYS_GET_INT_MAX_STR_DIGITS_METHODDEF
|
||||
SYS_SET_INT_MAX_STR_DIGITS_METHODDEF
|
||||
SYS__BASEREPL_METHODDEF
|
||||
#ifdef Py_STATS
|
||||
SYS__STATS_ON_METHODDEF
|
||||
SYS__STATS_OFF_METHODDEF
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue