Skip to content

Commit

Permalink
Add usage message when no arguments.
Browse files Browse the repository at this point in the history
  • Loading branch information
gvanrossum committed Apr 6, 1998
1 parent f4b44fa commit 8053d89
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Lib/tabnanny.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 4 additions & 0 deletions Tools/idle/tabnanny.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 4 additions & 0 deletions Tools/scripts/tabnanny.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 4 additions & 0 deletions Tools/scripts/tabpolice.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,17 @@ 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
quiet = 0
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)

Expand Down

0 comments on commit 8053d89

Please sign in to comment.