Title: Add a page to the documentation listing stdlib modules with a command-line interface (CLI) · Issue #109435 · python/cpython · GitHub
Open Graph Title: Add a page to the documentation listing stdlib modules with a command-line interface (CLI) · Issue #109435 · python/cpython
X Title: Add a page to the documentation listing stdlib modules with a command-line interface (CLI) · Issue #109435 · python/cpython
Description: While reviewing PR #109152, I discover that the sqlite3 module has a command line interface. Maybe I knew and then I forgot. Is there a a documentation page listing all modules with a command-line interface (CLI)? I don't know so. By sea...
Open Graph Description: While reviewing PR #109152, I discover that the sqlite3 module has a command line interface. Maybe I knew and then I forgot. Is there a a documentation page listing all modules with a command-line ...
X Description: While reviewing PR #109152, I discover that the sqlite3 module has a command line interface. Maybe I knew and then I forgot. Is there a a documentation page listing all modules with a command-line ...
Opengraph URL: https://github.com/python/cpython/issues/109435
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add a page to the documentation listing stdlib modules with a command-line interface (CLI)","articleBody":"While reviewing PR #109152, I discover that the sqlite3 module has a command line interface. Maybe I knew and then I forgot.\n\nIs there a a documentation page listing all modules with a command-line interface (CLI)? I don't know so.\n\nBy searching for ``main(`` pattern and for ``__main__.py`` files, so far, I found:\n\n* ast: https://docs.python.org/dev/library/ast.html#command-line-usage\n* asyncio: https://docs.python.org/dev/library/asyncio.html just one sentence, \"You can experiment with an asyncio concurrent context in the REPL\".\n* base64: shhh, it's a secret, it's not documented!\n* calendar: https://docs.python.org/dev/library/calendar.html#command-line-usage\n* compileall: https://docs.python.org/dev/library/compileall.html#command-line-use\n* ensurepip: https://docs.python.org/dev/library/ensurepip.html#command-line-interface\n* gzip: https://docs.python.org/dev/library/gzip.html#command-line-interface\n* idlelib: not sure if it's the same as: https://docs.python.org/dev/library/idle.html#command-line-usage\n* json.tool: https://docs.python.org/dev/library/json.html#module-json.tool\n* pdb: https://docs.python.org/3/library/pdb.html\n* profile: https://docs.python.org/dev/library/profile.html#instant-user-s-manual\n* py_compile: https://docs.python.org/dev/library/py_compile.html#command-line-interface\n* quopri: (missing)\n* site: https://docs.python.org/dev/library/site.html#command-line-interface\n* sqlite3 https://docs.python.org/3/library/sqlite3.html#command-line-interface\n* tabnanny: https://docs.python.org/dev/library/tabnanny.html\n* tarfile: https://docs.python.org/dev/library/tarfile.html#command-line-interface\n* timeit: https://docs.python.org/dev/library/timeit.html#command-line-interface\n* tokenize: https://docs.python.org/dev/library/tokenize.html#command-line-usage\n* trace: https://docs.python.org/dev/library/trace.html#command-line-usage\n* turtledemo: https://docs.python.org/3/library/turtle.html#module-turtledemo\n* uuid: https://docs.python.org/dev/library/uuid.html#command-line-example\n* unittest: https://docs.python.org/dev/library/unittest.html#command-line-interface\n* venv: https://docs.python.org/dev/library/venv.html#creating-virtual-environments\n* webbrowser: https://docs.python.org/3.14/library/webbrowser.html\n* zipapp: https://docs.python.org/dev/library/zipapp.html#command-line-interface\n* zipfile: https://docs.python.org/dev/library/zipfile.html#command-line-interface\n\nSome modules include self-tests in their main() function. I dislike that and I would suggest to remove it and at least move it to their test suite.\n\n* ctypes.util: self-test\n* ctypes.textpad: demo\n* curses.has_key: self-test?\n* ``dbm.__init__``: get the DB type... but this CLI is not easy discoverable, it's in the __init__ module!\n* getopt: self-test\n* heapq: self-test\n* shlex: print tokens. Is it really useful?\n* imaplib: self-test, \"test the IMAP4_stream class\"\n* modulefinder: self-test\n* netrc: just parse ``~/.netrc`` if available, and then display nothing... not very useful\n* random: benchmark\n* smtplib: \"Test the sendmail method\", try to send an email to localhost SMTP server.\n* symtable: self-test. parse itself (symtable.py)\n* turtle: it's a demo. Looks more like an easter egg or advanced example than \"an useful CLI\".\n* textwrap: self-test\n* tkinter: self-test\n* wsgiref.simple_server: self-test, run a server, open itself in a browser, stop the server.\n* xml.sax.expatreader: Sheakspear easter egg.\n* xml.sax.xmlreader: self-test.\n* xmlrpc.client + xmlrpc.server: simple demo.\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-109436\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/vstinner","@type":"Person","name":"vstinner"},"datePublished":"2023-09-15T07:19:37.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":19},"url":"https://github.com/109435/cpython/issues/109435"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:137005fe-02c7-1185-aecf-d75d4d93e23a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A4DE:2C09F1:31DAB1:3F914D:696B061F |
| html-safe-nonce | fe930414b4be1ef68984d0f0ab0d82474006d4460e210d0aab0d121add531629 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNERFOjJDMDlGMTozMURBQjE6M0Y5MTREOjY5NkIwNjFGIiwidmlzaXRvcl9pZCI6IjY1NDEyMjUxNTYyMzgwNTA4NDciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 9bdda288bd821a2e8fcc8d54f76a70c9209ca44e76be4000babedada96e5324c |
| hovercard-subject-tag | issue:1897857278 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/109435/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5ed285e21cfc725f7172c5665f6373c93d7fc01dd72c62f9e962f40399d30df3/python/cpython/issues/109435 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5ed285e21cfc725f7172c5665f6373c93d7fc01dd72c62f9e962f40399d30df3/python/cpython/issues/109435 |
| og:image:alt | While reviewing PR #109152, I discover that the sqlite3 module has a command line interface. Maybe I knew and then I forgot. Is there a a documentation page listing all modules with a command-line ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | vstinner |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width