This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Demo/comparisons/regextest.py needs some usage information.
Type: enhancement Stage: patch review
Components: Demos and Tools Versions: Python 3.2
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: belopolsky, eric.araujo, georg.brandl, ramiroluz
Priority: normal Keywords: patch

Created on 2010-11-22 00:09 by ramiroluz, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue10494_demo_regextest_usage_patch.diff ramiroluz, 2010-11-22 00:12
issue10494_demo_regextest_usage_patch_v2.diff ramiroluz, 2010-11-22 00:59
Messages (6)
msg122032 - (view) Author: Ramiro Batista da Luz (ramiroluz) Date: 2010-11-22 00:09
When someone run Demo/comparisons/regextest.py without arguments it waits for lines to be inserted in the command line silently, until the EOF, or Ctrl-D in Linux, is entered.

If the user read the file, editing or using cat Demo/comparisons/regextest.py he have to understand the code to figure out how to use it.

My suggestion is to add an usage message.
msg122035 - (view) Author: Ramiro Batista da Luz (ramiroluz) Date: 2010-11-22 00:12
Suggested patch.
msg122047 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2010-11-22 00:35
+0

Not "+1" because Georg suggested that this demo be removed.  See

http://mail.python.org/pipermail/python-ideas/2010-October/008416.html

On the patch, I would define a "usage" variable near the top of the program instead of repeating the usage text in the comment.
msg122049 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-11-22 00:42
Beware of UUOC: http://en.wikipedia.org/wiki/Cat_%28Unix%29#Useless_use_of_cat
msg122052 - (view) Author: Ramiro Batista da Luz (ramiroluz) Date: 2010-11-22 00:59
New patch from the suggestions, probably it will be discarded (see http://mail.python.org/pipermail/python-ideas/2010-October/008416.html)

But the work was already done. :P
msg124941 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-12-30 22:36
Demo/comparisons has now been removed.
History
Date User Action Args
2022-04-11 14:57:09adminsetgithub: 54703
2010-12-30 22:36:07georg.brandlsetstatus: open -> closed

messages: + msg124941
resolution: out of date
nosy: georg.brandl, belopolsky, eric.araujo, ramiroluz
2010-11-22 00:59:53ramiroluzsetfiles: + issue10494_demo_regextest_usage_patch_v2.diff

messages: + msg122052
2010-11-22 00:42:01eric.araujosetnosy: + eric.araujo
messages: + msg122049
2010-11-22 00:35:14belopolskysetnosy: + georg.brandl, belopolsky

messages: + msg122047
stage: patch review
2010-11-22 00:12:20ramiroluzsetfiles: + issue10494_demo_regextest_usage_patch.diff
keywords: + patch
messages: + msg122035
2010-11-22 00:09:54ramiroluzcreate