All pastes #374691 Raw Edit

Unnamed

public text v1 · immutable
#374691 ·published 2007-02-27 19:36 UTC
rendered paste body
#!/usr/bin/python

import sys
import getopt

def Usage ():
    print "usage called"
    sys.exit(0)

try:
    optlist, list = getopt.getopt(sys.argv[1:], ':bvphfy:')
except getopt.GetoptError:
    print "called exception"
    sys.exit(1)

for opt in optlist:
    if opt[0] == '-h':
        Usage()
    if opt[0] == '-v':
        print "verbose found"
    if opt[0] == '-p':
        print "probeonly found"
    if opt[0] == '-f':
        print "file option found"
    if opt[0] == '-b':
        print "bug-me"
    if opt[0] == '-y':
        print "option y"