Newer
Older
twander / twander.py
@tundra tundra on 28 Oct 2002 3 KB Initial revision
#!/usr/local/bin/python
# twander.py
# Copyright (c) 2002 TundraWare Inc.  All Rights Reserved.


PROGNAME = "twander"
RCSID = "$Id: twander.py,v 1.1 2002/10/28 23:03:23 tundra Exp $"
VERSION = RCSID.split()[2]




############################################################
###          Variables User Might Change                 ###
############################################################

#------------------- Nothing Below Here Should Need Changing ------------------#

############################################################
###                     Imports                          ###
############################################################

import getopt
import sys


############################################################
###               Aliases & Redefinitions                ###
############################################################



############################################################
###              Constants & Literals                    ###
############################################################



####################
# Constants
####################

FALSE = 0 == 1                # Booleans
TRUE = not FALSE



####################
# Literals
####################



############################################################
###            Prompts, & Application Strings            ###
############################################################


####################
# Error Messages
####################



####################
# Informational Messages
####################



####################
# Prompts
####################



############################################################
###        Global Variables & Data Structures            ###
############################################################



#---------------------------Code Begins Here----------------------------------#

############################################################
###           Object Base Class Definitions              ###
############################################################

    

############################################################
###           Supporting Function Definitions            ###
############################################################


#####
# Print An Error Message
#####

def errmsg(emsg):
    print PROGNAME + " " + VERSION +" ERROR: " + emsg

# End of 'errmsg()'


#####
# Print Usage Information
#####

def usage():
    print PROGNAME + " " + VERSION + " - Copyright 2002, TundraWare Inc., All Rights Reserved\n"
    print "usage:  " + PROGNAME + " [-hv] where,\n"
    print "          -h       print this help information"
    print "          -v       print detailed version information"

# End of 'usage()'


############################################################
###                  Program Entry Point                 ###
############################################################

# Command line processing

try:
    opts, args = getopt.getopt(sys.argv[1:], '-hv')
except getopt.GetoptError:
    usage()
    sys.exit(1)

    
for opt, val in opts:
    if opt == "-h":
        usage()
        sys.exit(0)
    if opt == "-v":
        print RCSID
        sys.exit(0)