add a format converter, i.e. to convert from lamedb to sat.xml files
[vuplus_dvbapp] / 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