10 if bPlusMinus
is False:
11 for index,s
in enumerate(sChoiceList):
12 print (
"%3d : %-20s" % (index+iPlusMinus,s))
14 for index,s
in enumerate(sChoiceList):
15 print (
"%3d/%3d : %-20s" % (index+iPlusMinus,-index,s))
19 for s,v
in optionDict:
20 sMenu=sMenu+s+
" "+v+
" "
25 while bValidResponse
is False:
27 print (
" .. "+sPrompt+
" > ", end=
'')
28 tty =
open(
"/dev/tty",
"r+")
33 for s,v
in optionDict:
42 if bPlusMinus
is False:
43 if iResponse
in range(iPlusMinus, len(sChoiceList)+iPlusMinus):
47 if bPlusMinus
is True:
48 if iResponse
in range(iPlusMinus, len(sChoiceList)+iPlusMinus+1):
50 if iResponse
in range(-len(sChoiceList)+iPlusMinus,iPlusMinus-1):
53 print (
"WARNING : response out of range")