Title: Move or remove useless/irrelevant command line interface (CLI) on stdlib modules · Issue #110076 · python/cpython · GitHub
Open Graph Title: Move or remove useless/irrelevant command line interface (CLI) on stdlib modules · Issue #110076 · python/cpython
X Title: Move or remove useless/irrelevant command line interface (CLI) on stdlib modules · Issue #110076 · python/cpython
Description: In issue gh-109435, I documented stdlib modules provinding an useful or interesting CLI: https://docs.python.org/dev/library/cmdline.html Some stdlib modules include self-tests in their main() function. I dislike that and I would suggest...
Open Graph Description: In issue gh-109435, I documented stdlib modules provinding an useful or interesting CLI: https://docs.python.org/dev/library/cmdline.html Some stdlib modules include self-tests in their main() func...
X Description: In issue gh-109435, I documented stdlib modules provinding an useful or interesting CLI: https://docs.python.org/dev/library/cmdline.html Some stdlib modules include self-tests in their main() func...
Opengraph URL: https://github.com/python/cpython/issues/110076
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Move or remove useless/irrelevant command line interface (CLI) on stdlib modules","articleBody":"In issue gh-109435, I documented stdlib modules provinding an useful or interesting CLI: https://docs.python.org/dev/library/cmdline.html\r\n\r\nSome stdlib 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.\r\n\r\n* ctypes.util: self-test\r\n* curses.has_key: self-test?\r\n* getopt: self-test\r\n* heapq: self-test\r\n* imaplib: self-test, \"test the IMAP4_stream class\"\r\n* modulefinder: self-test\r\n* symtable: self-test. parse itself (symtable.py)\r\n* textwrap: self-test\r\n* tkinter: self-test\r\n* wsgiref.simple_server: self-test, run a server, open itself in a browser, stop the server.\r\n* xml.sax.xmlreader: self-test.\r\n\r\nMaybe demos should be moved as examples in the documentation instead?\r\n\r\n* ctypes.textpad: demo\r\n* shlex: print tokens. Is it really useful?\r\n* ``dbm.__init__``: get the DB type... but this CLI is not easy discoverable, it's in the __init__ module!\r\n* netrc: just parse ``~/.netrc`` if available, and then display nothing... not very useful\r\n* smtplib: \"Test the sendmail method\", try to send an email to localhost SMTP server.\r\n* xmlrpc.client + xmlrpc.server: simple demo.\r\n\r\nThe random module includes a benchmark. I don't think that it's useful to regular users, it should be moved somewhere else:\r\n\r\n* random: benchmark\r\n\r\nI'm fine with keeping easter eggs:\r\n\r\n* turtle: it's a demo. Looks more like an easter egg or advanced example than \"an useful CLI\".\r\n* xml.sax.expatreader: Sheakspear easter egg.\r\n\r\nSee also issue gh-93096 \"Decide the fate of undocumented script behavior of some modules\".","author":{"url":"https://github.com/vstinner","@type":"Person","name":"vstinner"},"datePublished":"2023-09-29T07:00:12.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/110076/cpython/issues/110076"}
| 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:183af9ed-81d6-a107-e434-8795f02209ec |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A054:13F651:D8BE02:1203118:696B8B7E |
| html-safe-nonce | beef4edd3e3a36f26d7a1d5c6937216bba789b4b077f30d67c0eeb7eabb44e30 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMDU0OjEzRjY1MTpEOEJFMDI6MTIwMzExODo2OTZCOEI3RSIsInZpc2l0b3JfaWQiOiI2MDc1MDMzMzY4NTIyMzYxNzI3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 798825ba590e05a0afe635193e27bafd475da79939ae9244043e0d4fc4e32c1a |
| hovercard-subject-tag | issue:1918704472 |
| 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/110076/issue_layout |
| twitter:image | https://opengraph.githubassets.com/575a581e7c47e92e7f17e6487ab028a386f647ccf2f30f81c4f9b8e6a6b18c41/python/cpython/issues/110076 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/575a581e7c47e92e7f17e6487ab028a386f647ccf2f30f81c4f9b8e6a6b18c41/python/cpython/issues/110076 |
| og:image:alt | In issue gh-109435, I documented stdlib modules provinding an useful or interesting CLI: https://docs.python.org/dev/library/cmdline.html Some stdlib modules include self-tests in their main() func... |
| 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