diff --git a/twander.py b/twander.py index 10b731d..56f9acf 100755 --- a/twander.py +++ b/twander.py @@ -4,7 +4,7 @@ PROGNAME = "twander" -RCSID = "$Id: twander.py,v 1.34 2002/11/09 06:07:28 tundra Exp $" +RCSID = "$Id: twander.py,v 1.35 2002/11/09 06:20:15 tundra Exp $" VERSION = RCSID.split()[2] @@ -17,7 +17,6 @@ import os import sys - #----------------------------------------------------------# # Variables User Might Change # #----------------------------------------------------------# @@ -26,6 +25,12 @@ # Defaults ##### +# Booleans + +FALSE = 0 == 1 # Booleans +TRUE = not FALSE + + # Configuration file CONF = os.path.join(os.getenv("HOME"), # Name of default config file @@ -52,6 +57,9 @@ FSZ = 12 FWT = "bold" +# Warnings + +WARN = TRUE #------------------- Nothing Below Here Should Need Changing ------------------# @@ -73,9 +81,6 @@ # Constants ##### -FALSE = 0 == 1 # Booleans -TRUE = not FALSE - ##### # General Literals @@ -136,6 +141,7 @@ " -f color foreground color (default: green)", " -h print this help information", " -n name name of font to use (default: courier)", + " -q quiet mode - no warnings (default: warnings on)", " -s size size of font to use (default: 12)", " -v print detailed version information", " -w wght weight/style of font to use (default: bold)", @@ -304,7 +310,8 @@ ##### def WrnMsg(wmsg): - print PROGNAME + " " + VERSION + " " + wWARN + ": " + wmsg + if WARN: + print PROGNAME + " " + VERSION + " " + wWARN + ": " + wmsg # End of 'WrnMsg()' @@ -404,7 +411,7 @@ # Command line processing try: - opts, args = getopt.getopt(sys.argv[1:], '-b:c:f:hn:s:vw:x:y:') + opts, args = getopt.getopt(sys.argv[1:], '-b:c:f:hn:qs:vw:x:y:') except getopt.GetoptError: Usage() sys.exit(1) @@ -423,6 +430,8 @@ sys.exit(0) if opt == "-n": FNAME = val + if opt == "-q": + WARN = FALSE if opt == "-s": FSZ = val if opt == "-v":