Reduced the number of command line switches
This commit is contained in:
+11
-11
@@ -92,7 +92,7 @@ def main(sysArgs=None):
|
|||||||
sysArgs = sys.argv[1:]
|
sysArgs = sys.argv[1:]
|
||||||
|
|
||||||
# Valid Input Options
|
# Valid Input Options
|
||||||
shortOpt = "hidvql:"
|
shortOpt = "hvq"
|
||||||
longOpt = [
|
longOpt = [
|
||||||
"help",
|
"help",
|
||||||
"version",
|
"version",
|
||||||
@@ -118,12 +118,12 @@ def main(sysArgs=None):
|
|||||||
"\n"
|
"\n"
|
||||||
"Usage:\n"
|
"Usage:\n"
|
||||||
" -h, --help Print this message.\n"
|
" -h, --help Print this message.\n"
|
||||||
" --version Print program version and exit.\n"
|
" -v, --version Print program version and exit.\n"
|
||||||
" -i, --info Print additional runtime information.\n"
|
" --info Print additional runtime information.\n"
|
||||||
" -d, --debug Print debug output. Includes -i.\n"
|
" --debug Print debug output. Includes -i.\n"
|
||||||
" -v, --verbose Increase verbosity of debug output. Includes -d.\n"
|
" --verbose Increase verbosity of debug output. Includes -d.\n"
|
||||||
" -q, --quiet Disable output to command line. Does not affect log file.\n"
|
" -q, --quiet Disable output to command line. Does not affect log file.\n"
|
||||||
" -l, --logfile= Specify log file.\n"
|
" --logfile= Specify log file.\n"
|
||||||
" --style= Sets Qt5 style flag. Defaults to 'Fusion'.\n"
|
" --style= Sets Qt5 style flag. Defaults to 'Fusion'.\n"
|
||||||
" --config= Alternative config file.\n"
|
" --config= Alternative config file.\n"
|
||||||
" --data= Alternative user data path.\n"
|
" --data= Alternative user data path.\n"
|
||||||
@@ -162,20 +162,20 @@ def main(sysArgs=None):
|
|||||||
if inOpt in ("-h","--help"):
|
if inOpt in ("-h","--help"):
|
||||||
print(helpMsg)
|
print(helpMsg)
|
||||||
sys.exit()
|
sys.exit()
|
||||||
elif inOpt == "--version":
|
elif inOptin ("-v", "--version"):
|
||||||
print("%s %s Version %s" % (__package__,__status__,__version__))
|
print("%s %s Version %s" % (__package__,__status__,__version__))
|
||||||
sys.exit()
|
sys.exit()
|
||||||
elif inOpt in ("-i", "--info"):
|
elif inOpt == "--info":
|
||||||
debugLevel = logging.INFO
|
debugLevel = logging.INFO
|
||||||
elif inOpt in ("-d", "--debug"):
|
elif inOpt == "--debug":
|
||||||
debugLevel = logging.DEBUG
|
debugLevel = logging.DEBUG
|
||||||
logFormat = "[{asctime:}] {name:>30}:{lineno:<4d} {levelname:8} {message:}"
|
logFormat = "[{asctime:}] {name:>30}:{lineno:<4d} {levelname:8} {message:}"
|
||||||
elif inOpt in ("-l","--logfile"):
|
elif inOpt == "--logfile":
|
||||||
logFile = inArg
|
logFile = inArg
|
||||||
toFile = True
|
toFile = True
|
||||||
elif inOpt in ("-q","--quiet"):
|
elif inOpt in ("-q","--quiet"):
|
||||||
toStd = False
|
toStd = False
|
||||||
elif inOpt in ("-v","--verbose"):
|
elif inOpt == "--verbose":
|
||||||
debugLevel = VERBOSE
|
debugLevel = VERBOSE
|
||||||
logFormat = "[{asctime:}] {name:>30}:{lineno:<4d} {levelname:8} {message:}"
|
logFormat = "[{asctime:}] {name:>30}:{lineno:<4d} {levelname:8} {message:}"
|
||||||
elif inOpt == "--style":
|
elif inOpt == "--style":
|
||||||
|
|||||||
Reference in New Issue
Block a user