git.cweiske.de
/
enigma2.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Merge branch 'bug_673_dvdburn_keyerror'
[enigma2.git]
/
tools
/
host_tools
/
FormatConverter
/
input.py
1
import sys
2
3
def inputText():
4
input = sys.stdin.readline()
5
return input.strip()
6
7
def inputChoices(list, backcmd = "b", backtext = "back"):
8
repeat = True
9
while(repeat):
10
repeat = False
11
count = 0
12
for item in list:
13
print count, "-", item
14
count += 1
15
print backcmd, "-", backtext
16
input = inputText()
17
if input == backcmd:
18
return None
19
20
action = int(input)
21
if action >= len(list):
22
repeat = True
23
return action