From d0479e45b65f0108a199f37077ba42a6869601f6 Mon Sep 17 00:00:00 2001 From: CuriousLearner Date: Sat, 18 Feb 2017 17:04:49 +0530 Subject: [PATCH] bpo-18423: Documents limitation for -m flag --- Doc/using/cmdline.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Doc/using/cmdline.rst b/Doc/using/cmdline.rst index 195f63f0a319da9..b625cbe68b732fd 100644 --- a/Doc/using/cmdline.rst +++ b/Doc/using/cmdline.rst @@ -74,7 +74,8 @@ source. .. cmdoption:: -m Search :data:`sys.path` for the named module and execute its contents as - the :mod:`__main__` module. + the :mod:`__main__` module. This option only works for `packages` and + `leaf-level modules`. 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