The usage of -m option of python

Chris Angelico rosuav at gmail.com
Mon Mar 18 17:35:04 EDT 2013


On Tue, Mar 19, 2013 at 8:17 AM, Peng Yu <pengyu.ut at gmail.com> wrote:
> Hi,
>
> I don't quite understand how -m option is used. And it is difficult to
> search for -m in google. Could anybody provide me with an example on
> how to use this option? Thanks!
>
>        -m module-name
>               Searches sys.path for the named module and runs the
> corresponding .py file as a script.

Well, I just searched for 'python m module', but I agree it's not
easy. Anyway, Google read my mind and returned this:

http://www.python.org/dev/peps/pep-0338/

ChrisA



More information about the Python-list mailing list