Skip to content

Setup & Usage documentation for selected stdlib modules #59150

Description

@ncoghlan
BPO 14945
Nosy @ncoghlan, @ezio-melotti, @merwok

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2012-05-29.01:50:58.661>
labels = ['type-feature', 'docs']
title = 'Setup & Usage documentation for selected stdlib modules'
updated_at = <Date 2019-04-26.17:26:25.616>
user = 'https://github.com/ncoghlan'

bugs.python.org fields:

activity = <Date 2019-04-26.17:26:25.616>
actor = 'BreamoreBoy'
assignee = 'docs@python'
closed = False
closed_date = None
closer = None
components = ['Documentation']
creation = <Date 2012-05-29.01:50:58.661>
creator = 'ncoghlan'
dependencies = []
files = []
hgrepos = []
issue_num = 14945
keywords = []
message_count = 7.0
messages = ['161832', '161833', '161835', '161839', '161842', '161846', '223269']
nosy_count = 5.0
nosy_names = ['ncoghlan', 'ezio.melotti', 'eric.araujo', 'docs@python', 'tshepang']
pr_nums = []
priority = 'normal'
resolution = None
stage = 'needs patch'
status = 'open'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue14945'
versions = ['Python 3.5']

Activity

  1. ncoghlan commented on May 29, 2012

    @ncoghlan
    ContributorAuthor

    Some stdlib modules have officially documented and supported behaviour when executed via -m. These should be referenced from the Setup & Usage documentation at http://docs.python.org/dev/using/index.html

    Current candidates:
    python -m unittest
    python -m timeit

  2. added
    docsDocumentation in the Doc dir
    type-featureA feature request or enhancement
    on May 29, 2012
  3. ncoghlan commented on May 29, 2012

    @ncoghlan
    ContributorAuthor

    I'm sure there's a predecessor to this issue that I intend for this one to replace, but I can't currently find it in order to mark it as superceded.

  4. ncoghlan commented on May 29, 2012

    @ncoghlan
    ContributorAuthor

    Found it: bpo-11260. I've left it open, since the original suggestion in that issue is related to actually documenting the -m behaviour of the smptd module - it was just the issue *discussion* that ended up covering the more general question of how such command line interfaces should be documented.

    The current issue is specifically about providing a central index in the setup and usage documentation to those modules which *already* have officially documented and supported behaviour when executed with -m.

  5. ncoghlan commented on May 29, 2012

    @ncoghlan
    ContributorAuthor

    Additional candidates after grepping the docs:

    python -m site
    python -m sysconfig
    python -m pickle
    python -m pickletools
    python -m compileall
    python -m test

  6. merwok commented on May 29, 2012

    @merwok
    Member

    I’d propose to add one file per script / module-as-script, except maybe for -m site and -m sysconfig which are more about debugging an installation than really using a feature provided by the stdlib.

  7. ncoghlan commented on May 29, 2012

    @ncoghlan
    ContributorAuthor

    I think for these it's reasonable to just have an index page that references out to the individual module docs. Most of them are closely related to using the module in your own code and/or there's general background info in the module docs that you're likely to need in order to understand what the tool is for.

    The main thing I'm after at this point is for Setup & Usage to act as a central index for using Python from the command line, rather than it necessarily containing all the details directly. Rather than trying too hard to categorise them, I'd be inclined to start with a simple alphabetical list (module name linking to the relevant section in the module docs, adding it if it doesn't already exist). Something like:

    compileall - Precompiling Python source modules to bytecode
    pickle - Display the contents of pickles saved as files
    pickletools - Analyse the contents of pickles saved as files
    site - Display details of Python's configuration
    sysconfig - Display additional details of Python's configuration
    test - Execute Python's own regression test suite
    timeit - Microbenchmarking for small Python snippets
    unittest - Find and execute unit tests

    Maybe we'll decide to do something more long term, but I think this is a good way to start.

  8. BreamoreBoy commented on Jul 16, 2014

    BreamoreBoymannequin
    Mannequin

    Where do we stand with this and bpo-11260 ?

  9. transferred this issue fromon Apr 10, 2022
  10. merwok commented on Jul 11, 2022

    @merwok
    Member

    A PR was proposed but reviewers find that one list of all modules is not interesting, and that Setup & Usage is not the right location. If someone wants a specific module-as-script documented, please open a specific ticket.

  11. vstinner commented on Sep 29, 2023

    @vstinner
    Member

    Implemented in issue gh-109435 as new documentation page: https://docs.python.org/dev/library/cmdline.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dirtype-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions