diff options
author | Guido van Rossum <guido@python.org> | 1998-04-06 14:45:26 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-04-06 14:45:26 (GMT) |
commit | 8053d89f7b3d26d4c113261dc9e3f58e7dd57eb9 (patch) | |
tree | 7824b8166a8bc3227e74fe123a556a965aa1020f | |
parent | f4b44fa6ef9ce6f4d4aa5e845de57858e8a97f8b (diff) | |
download | cpython-8053d89f7b3d26d4c113261dc9e3f58e7dd57eb9.zip cpython-8053d89f7b3d26d4c113261dc9e3f58e7dd57eb9.tar.gz cpython-8053d89f7b3d26d4c113261dc9e3f58e7dd57eb9.tar.bz2 |
Add usage message when no arguments.
-rwxr-xr-x | Lib/tabnanny.py | 4 | ||||
-rwxr-xr-x | Tools/idle/tabnanny.py | 4 | ||||
-rwxr-xr-x | Tools/scripts/tabnanny.py | 4 | ||||
-rwxr-xr-x | Tools/scripts/tabpolice.py | 4 |
4 files changed, 16 insertions, 0 deletions
diff --git a/Lib/tabnanny.py b/Lib/tabnanny.py index 9af8ecb..b290fb6 100755 --- a/Lib/tabnanny.py +++ b/Lib/tabnanny.py @@ -19,9 +19,13 @@ def main(): opts, args = getopt.getopt(sys.argv[1:], "v") except getopt.error, msg: print msg + return for o, a in opts: if o == '-v': verbose = verbose + 1 + if not args: + print "Usage:", sys.argv[0], "file_or_directory ..." + return for arg in args: check(arg) diff --git a/Tools/idle/tabnanny.py b/Tools/idle/tabnanny.py index 9af8ecb..b290fb6 100755 --- a/Tools/idle/tabnanny.py +++ b/Tools/idle/tabnanny.py @@ -19,9 +19,13 @@ def main(): opts, args = getopt.getopt(sys.argv[1:], "v") except getopt.error, msg: print msg + return for o, a in opts: if o == '-v': verbose = verbose + 1 + if not args: + print "Usage:", sys.argv[0], "file_or_directory ..." + return for arg in args: check(arg) diff --git a/Tools/scripts/tabnanny.py b/Tools/scripts/tabnanny.py index 9af8ecb..b290fb6 100755 --- a/Tools/scripts/tabnanny.py +++ b/Tools/scripts/tabnanny.py @@ -19,9 +19,13 @@ def main(): opts, args = getopt.getopt(sys.argv[1:], "v") except getopt.error, msg: print msg + return for o, a in opts: if o == '-v': verbose = verbose + 1 + if not args: + print "Usage:", sys.argv[0], "file_or_directory ..." + return for arg in args: check(arg) diff --git a/Tools/scripts/tabpolice.py b/Tools/scripts/tabpolice.py index 22005e1..ae97581 100755 --- a/Tools/scripts/tabpolice.py +++ b/Tools/scripts/tabpolice.py @@ -16,6 +16,7 @@ def main(): opts, args = getopt.getopt(sys.argv[1:], "qv") except getopt.error, msg: print msg + return for o, a in opts: if o == '-v': verbose = verbose + 1 @@ -23,6 +24,9 @@ def main(): if o == '-q': quiet = 1 verbose = 0 + if not args: + print "Usage:", sys.argv[0], "file_or_directory ..." + return for arg in args: check(arg) |