- Improved option parser and friends.
This commit is contained in:
parent
83f2b55f0c
commit
3cd37d25f6
@ -5,7 +5,7 @@
|
|||||||
""" Import externals """
|
""" Import externals """
|
||||||
import wx
|
import wx
|
||||||
import sys
|
import sys
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser, SUPPRESS_HELP
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -17,17 +17,23 @@ import Misc
|
|||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
def parseArgs():
|
def parseArgs():
|
||||||
usage = "usage: %s [optional initial settings]" % sys.argv[0]
|
usage = "usage: %s [options] [inputfile]" % sys.argv[0]
|
||||||
parser = OptionParser(usage=usage)
|
description = "scyther-gui is a graphical user interface for the scyther protocol verification tool."
|
||||||
|
parser = OptionParser(usage=usage,description=description)
|
||||||
|
|
||||||
# command
|
# command
|
||||||
parser.add_option("-V","--verify",dest="command",default=None,action="store_const",const="verify")
|
parser.add_option("-V","--verify",dest="command",default=None,action="store_const",const="verify",
|
||||||
parser.add_option("-s","--state-space",dest="command",default=None,action="store_const",const="statespace")
|
help="Immediately verify the claims of the protocol (requires input file)")
|
||||||
parser.add_option("-a","--auto-claims",dest="command",default=None,action="store_const",const="autoverify")
|
parser.add_option("-s","--state-space",dest="command",default=None,action="store_const",const="statespace",
|
||||||
parser.add_option("-c","--check",dest="command",default=None,action="store_const",const="check")
|
help="Immediately generate the complete characterization of the protocol (requires input file)")
|
||||||
|
parser.add_option("-a","--auto-claims",dest="command",default=None,action="store_const",const="autoverify",
|
||||||
|
help="Immediately verified protocol using default claims (requires input file)")
|
||||||
|
parser.add_option("-c","--check",dest="command",default=None,action="store_const",const="check",
|
||||||
|
help="Immediately check protocol (requires input file)")
|
||||||
|
|
||||||
# misc debug etc
|
# misc debug etc (not shown in the --help output)
|
||||||
parser.add_option("","--test",dest="test",default=False,action="store_true")
|
parser.add_option("","--test",dest="test",default=False,action="store_true",
|
||||||
|
help=SUPPRESS_HELP)
|
||||||
|
|
||||||
return parser.parse_args()
|
return parser.parse_args()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user