summaryrefslogtreecommitdiff
path: root/Doc/using
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@python.org>2019-07-01 16:03:53 -0700
committerGitHub <noreply@github.com>2019-07-01 16:03:53 -0700
commite226e83d36dfc7220d836fb7a249ce18e70cb4a6 (patch)
treeec4de1abf366960dadf2aa1e8e1b4b89458243f9 /Doc/using
parent0f4e8132820947d93eccf31b9e526b81c6ffa53d (diff)
downloadcpython-git-e226e83d36dfc7220d836fb7a249ce18e70cb4a6.tar.gz
bpo-37363: Add audit events on startup for the run commands (GH-14524)
Diffstat (limited to 'Doc/using')
-rw-r--r--Doc/using/cmdline.rst12
1 files changed, 11 insertions, 1 deletions
diff --git a/Doc/using/cmdline.rst b/Doc/using/cmdline.rst
index e11fe31c2f..22f42d966a 100644
--- a/Doc/using/cmdline.rst
+++ b/Doc/using/cmdline.rst
@@ -70,6 +70,7 @@ source.
:data:`sys.path` (allowing modules in that directory to be imported as top
level modules).
+ .. audit-event:: cpython.run_command command cmdoption-c
.. cmdoption:: -m <module-name>
@@ -106,13 +107,14 @@ source.
python -mtimeit -s 'setup here' 'benchmarked code here'
python -mtimeit -h # for details
+ .. audit-event:: cpython.run_module module-name cmdoption-m
+
.. seealso::
:func:`runpy.run_module`
Equivalent functionality directly available to Python code
:pep:`338` -- Executing modules as scripts
-
.. versionchanged:: 3.1
Supply the package name to run a ``__main__`` submodule.
@@ -129,6 +131,7 @@ source.
``"-"`` and the current directory will be added to the start of
:data:`sys.path`.
+ .. audit-event:: cpython.run_stdin "" ""
.. describe:: <script>
@@ -148,6 +151,8 @@ source.
added to the start of :data:`sys.path` and the ``__main__.py`` file in
that location is executed as the :mod:`__main__` module.
+ .. audit-event:: cpython.run_file filename
+
.. seealso::
:func:`runpy.run_path`
Equivalent functionality directly available to Python code
@@ -540,6 +545,11 @@ conflict.
the interactive session. You can also change the prompts :data:`sys.ps1` and
:data:`sys.ps2` and the hook :data:`sys.__interactivehook__` in this file.
+ .. audit-event:: cpython.run_startup filename PYTHONSTARTUP
+
+ Raises an :ref:`auditing event <auditing>` ``cpython.run_startup`` with
+ the filename as the argument when called on startup.
+
.. envvar:: PYTHONOPTIMIZE