Skip to content

Improve description of cmd module #58083

Closed

Description

@techtonik
mannequin
BPO 13875
Nosy @merwok, @bitdancer

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-01-26.14:27:57.181>
labels = ['3.8', '3.9', '3.10', 'docs']
title = 'Improve description of cmd module'
updated_at = <Date 2020-11-17.17:33:42.057>
user = 'https://bugs.python.org/techtonik'

bugs.python.org fields:

activity = <Date 2020-11-17.17:33:42.057>
actor = 'iritkatriel'
assignee = 'docs@python'
closed = False
closed_date = None
closer = None
components = ['Documentation']
creation = <Date 2012-01-26.14:27:57.181>
creator = 'techtonik'
dependencies = []
files = []
hgrepos = []
issue_num = 13875
keywords = []
message_count = 5.0
messages = ['152010', '152013', '152014', '152017', '152510']
nosy_count = 4.0
nosy_names = ['techtonik', 'eric.araujo', 'r.david.murray', 'docs@python']
pr_nums = []
priority = 'low'
resolution = None
stage = 'needs patch'
status = 'open'
superseder = None
type = None
url = 'https://bugs.python.org/issue13875'
versions = ['Python 3.8', 'Python 3.9', 'Python 3.10']

Linked PRs

Activity

  1. techtonik commented on Jan 26, 2012

    techtonikmannequin
    MannequinAuthor

    http://docs.python.org/library/cmd.html#

    Documentation for cmd module is poor to explain the value of this module to users. Intro is too abstract - phrase "simple framework for writing line-oriented command interpreters" doesn't mean much. Perhaps word "interactive" is missing?

    So, there is no part explaining the what cmd does exactly (intro fails) and no part explaining the main principle - How exactly does this framework allows to do this in a simple way? (I guess reference part under 'Cmd objects -> Cmd.cmdloop([intro]) -> p[4]` does that, but it is not the place you'd usually expect this info.

    At the very least what could be done is a link to Doug's tutorial http://www.doughellmann.com/PyMOTW/cmd/

  2. bitdancer commented on Jan 26, 2012

    @bitdancer
    Member

    Well, since it isn't limited to interactive use, I don't think 'interactive' is missing.

    MOTW links are a more global issue that was discussion on python-dev (I forget the outcome, but I think it was "no").

    I don't see anything that needs done here, but if you want to suggest a patch for consideration, feel free.

  3. techtonik commented on Jan 26, 2012

    techtonikmannequin
    MannequinAuthor

    What do you mean by saying it is not limited for interactive use? I thought it is used to provide command prompt for typing commands. What other use cases does it support?

  4. bitdancer commented on Jan 26, 2012

    @bitdancer
    Member

    You can feed a cmd driven interface from stdin or via cmd.onecmd.

    However, I agree that the intended and primary use case is interactive. There wouldn't be much point in using cmd if the primary intent of your program wasn't interactive.

  5. merwok commented on Feb 3, 2012

    @merwok
    Member

    +1 to expanding the introduction. Do you have a phrasing suggestion?

    MOTW links are a more global issue that was discussion on python-dev (I forget the outcome,
    but I think it was "no").

    IIRC it was on python-ideas, and (among other criticisms about licensing, site reliability, etc.) the strongest opinion against adding links was Alexander’s, who reviewed the PyMOTW page for datetime and was not satisfied. So the discussion ruled out systematic addition of links for all modules, but I think that as usual a core dev is free to add a link to an external resource if they think it is useful.

  6. changed the title [-]cmd: no user documentation[/-] [+]Improve description of cmd module[/+] on Feb 3, 2012
  7. transferred this issue fromon Apr 10, 2022
  8. added 2 commits that reference this issue on Oct 23, 2026
  9. added 2 commits that reference this issue on Oct 23, 2026
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 dir

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions