Python Setup and Usage, Release 3.9.5 Chapter 1. Command line and environment 4 Raises an auditing event$_{cpython.run_command}$ with argument$_{command}$ . Since the argument is a module name, you must not give a file extension ( .py ). The module name should be a valid absolute Python module name, but the implementation may not always enforce this (e.g. it may allow you to use a name that includes a hyphen). Note: This option cannot be used with built-in modules and extension modules written in C, since they do not have Python module files. However, it can still be used for precompiled modules, even if the original source file is not available. Package names (including namespace packages) are also permitted. When a package name is supplied instead of a normal module, the interpreter will execute <pkg>.__main__ as the main module. This behaviour is deliberately similar to the handling of directories and zipfiles that are passed to the interpreter as the script argument. If this option is given, the first element of$_{sys.argv}$ will be the full path to the module file (while the module file is being located, the first element will be set to$_{"-m"}$ ). As with the$_{-c}$option, the current directory will be added to the start of$_{sys.path}$ . $_{-I}$option can be used to run the script in isolated mode where$_{sys.path}$ contains neither the current direc- tory nor the user’s site-packages directory. All$_{PYTHON*}$ environment variables are ignored, too. Many standard library modules contain code that is invoked on their execution as a script. An example is the $_{timeit}$module: Raises an auditing event$_{cpython.run_module}$ with argument$_{module-name}$ . See also: runpy.run_module() Equivalent functionality directly available to Python code PEP 338 – Executing modules as scripts Changed in version 3.1: Supply the package name to run a$_{__main__}$ submodule. Changed in version 3.4: namespace packages are also supported Read commands from standard input ($_{sys.stdin}$ ). If standard input is a terminal,$_{-i}$is implied. If this option is given, the first element of$_{sys.argv}$ will be$_{"-"}$ and the current directory will be added to the start of$_{sys.path}$ . - Raises an auditing event$_{cpython.run_stdin}$ with no arguments. Execute the Python code contained in script , which must be a filesystem path (absolute or relative) referring to either a Python file, a directory containing a$_{__main__.py}$ file, or a zipfile containing a$_{__main__.py}$ file. If this option is given, the first element of$_{sys.argv}$ will be the script name as given on the command line. If the script name refers directly to a Python file, the directory containing that file is added to the start of sys.path , and the file is executed as the$_{__main__}$ module. If the script name refers to a directory or zipfile, the script name is added to the start of$_{sys.path}$and the __main__.py file in that location is executed as the$_{__main__}$ module. <script> Search$_{sys.path}$for the named module and execute its contents as the$_{__main__}$ module. -m <module-name> python -m timeit -s'setup here''benchmarked code here' python -m timeit -h # for details