Evaluate the script with the given global (globs) and local (locs) variables.
(
script: str,
globs: dict[str, Any] | None,
locs: Mapping[str, object] | None = None,
filename: str = "",
)
| 214 | |
| 215 | |
| 216 | def _compile_and_eval( |
| 217 | script: str, |
| 218 | globs: dict[str, Any] | None, |
| 219 | locs: Mapping[str, object] | None = None, |
| 220 | filename: str = "", |
| 221 | ) -> None: |
| 222 | """ |
| 223 | Evaluate the script with the given global (globs) and local (locs) |
| 224 | variables. |
| 225 | """ |
| 226 | bytecode = compile(script, filename, "exec") |
| 227 | eval(bytecode, globs, locs) |
| 228 | |
| 229 | |
| 230 | def _linecache_and_compile( |