Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #41475
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder7.xlned.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.000 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'tests,': 0.07; 'type,': 0.07; 'used.': 0.07; 'python': 0.09; 'alternatives': 0.09; 'executes': 0.09; 'itself,': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'regression': 0.09; 'terry': 0.09; 'subject:python': 0.11; 'executable.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'subject:usage': 0.16; 'verbose': 0.16; 'wrote:': 0.17; 'version.': 0.17; 'jan': 0.18; 'tests': 0.18; 'module': 0.19; 'runs': 0.22; 'example': 0.23; 'command': 0.24; 'header:In- Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'developers': 0.26; 'header:X-Complaints-To:1': 0.28; 'mode.': 0.29; 'searches': 0.29; 'anybody': 0.32; 'running': 0.32; 'could': 0.32; 'builds': 0.33; 'to:addr:python-list': 0.33; 'hi,': 0.33; 'pm,': 0.35; 'received:org': 0.36; 'really': 0.36; 'but': 0.36; 'test': 0.36; 'option': 0.37; 'quite': 0.37; 'subject:: ': 0.38; 'things': 0.38; 'sure': 0.38; 'instead': 0.39; 'to:addr:python.org': 0.39; 'where': 0.40; 'header:Received:5': 0.40; 'provide': 0.62; 'different': 0.63; 'subject:The': 0.71; 'received:fios.verizon.net': 0.84; 'subject: -': 0.84 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| To | python-list@python.org |
| From | Terry Reedy <tjreedy@udel.edu> |
| Subject | Re: The usage of -m option of python |
| Date | Mon, 18 Mar 2013 23:03:15 -0400 |
| References | <CABrM6wkuKu9XSbk4JKpEvX4Dfh=n2UKB4UmaRSTyV45Ezd2mYQ@mail.gmail.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Gmane-NNTP-Posting-Host | pool-173-75-251-66.phlapa.fios.verizon.net |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 |
| In-Reply-To | <CABrM6wkuKu9XSbk4JKpEvX4Dfh=n2UKB4UmaRSTyV45Ezd2mYQ@mail.gmail.com> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3484.1363662214.2939.python-list@python.org> (permalink) |
| Lines | 27 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1363662214 news.xs4all.nl 6984 [2001:888:2000:d::a6]:33061 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:41475 |
Show key headers only | View raw
On 3/18/2013 5:17 PM, Peng Yu 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? python -m test at a command line runs the regression tests in the test package python -m test -v test_difflib runs test.test_difflib in verbose mode. These are alternatives to python <path-to-test> ... Python just searches for module itself, same as for import, but executes it as main module instead of importing. This is really handy for developers running tests, where path-to-test is not only a nuisance to type, but different for development builds than for installations, and of course, different for each version. Let python find the /Lib corresponding to the executable. I am not sure if it works for things outside /Lib -- Terry Jan Reedy
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Re: The usage of -m option of python Terry Reedy <tjreedy@udel.edu> - 2013-03-18 23:03 -0400
Re: The usage of -m option of python albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-04-08 14:50 +0000
Re: The usage of -m option of python Terry Jan Reedy <tjreedy@udel.edu> - 2013-04-08 14:47 -0400
csiph-web