Re: [Python-Dev] :program: markup in .rst documentation

2010-07-26 Thread Georg Brandl
Am 20.07.2010 19:32, schrieb Fred Drake: > Switching to "python -m" is generally good where it applies (as in this case). > > The original intent for :option: and :program: were in their use as > references rather than in sample command lines. > > Georg should be the final arbiter, but I'd be in

Re: [Python-Dev] :program: markup in .rst documentation

2010-07-22 Thread Nick Coghlan
On Fri, Jul 23, 2010 at 2:25 AM, Alexander Belopolsky wrote: > Note also that argparse/optparse does not know about -m way either: > > $ python -m profile -h > Usage: profile.py [-o output_file_path] [-s sort] scriptfile [arg] ... > > I am not sure if it is possible for argparse to distinguish bet

Re: [Python-Dev] :program: markup in .rst documentation

2010-07-22 Thread Alexander Belopolsky
On Thu, Jul 22, 2010 at 11:25 AM, Eli Bendersky wrote: >>> .. shouldn't the recommended >>> way to run a module as a script be python -m modname?  As in >>> >>> $ python -m test.regrtest test_spam .. > So, how can a decision be reached on this issue? I'd like to fix the > relevant docs because cur

Re: [Python-Dev] :program: markup in .rst documentation

2010-07-22 Thread Eli Bendersky
On Tue, Jul 20, 2010 at 20:34, Éric Araujo wrote: >> Sorry to add the third way to the mix, but shouldn't the recommended >> way to run a module as a script be python -m modname?  As in >> >> $ python -m test.regrtest test_spam > > This is true but orthogonal to our problem, which is that > :progr

Re: [Python-Dev] :program: markup in .rst documentation

2010-07-20 Thread Éric Araujo
> Sorry to add the third way to the mix, but shouldn't the recommended > way to run a module as a script be python -m modname? As in > > $ python -m test.regrtest test_spam This is true but orthogonal to our problem, which is that :program:`python -m thing` is wrong if I understood the doc right

Re: [Python-Dev] :program: markup in .rst documentation

2010-07-20 Thread Fred Drake
Switching to "python -m" is generally good where it applies (as in this case). The original intent for :option: and :program: were in their use as references rather than in sample command lines. Georg should be the final arbiter, but I'd be in favor of ``...`` for command lines. _

Re: [Python-Dev] :program: markup in .rst documentation

2010-07-20 Thread Alexander Belopolsky
On Tue, Jul 20, 2010 at 1:16 PM, Eli Bendersky wrote: .. > > ``python regrtest.py test_spam.py`` > > Which way to choose? I will update my patch to reflect this. Sorry to add the third way to the mix, but shouldn't the recommended way to run a module as a script be python -m modname? As in $ py

[Python-Dev] :program: markup in .rst documentation

2010-07-20 Thread Eli Bendersky
While fixing the :option: markup in the library docs (http://bugs.python.org/issue9312), another question came up: In a few places, documenting a program execution with options was made with: :program:`python regrtest.py` :option:`test_spam.py` Since my patch had the :option: markup removed, thi