add a format converter, i.e. to convert from lamedb to sat.xml files
[vuplus_dvbapp] / tools / host_tools / FormatConverter / input.py
diff --git a/tools/host_tools/FormatConverter/input.py b/tools/host_tools/FormatConverter/input.py
new file mode 100644 (file)
index 0000000..7a20627
--- /dev/null
@@ -0,0 +1,23 @@
+import sys
+
+def inputText():
+       input = sys.stdin.readline()
+       return input.strip()
+
+def inputChoices(list, backcmd = "b", backtext = "back"):
+       repeat = True
+       while(repeat):
+               repeat = False
+               count = 0
+               for item in list:
+                       print count, "-", item
+                       count += 1
+               print backcmd, "-", backtext
+               input = inputText()
+               if input == backcmd:
+                       return None
+               
+               action = int(input)
+               if action >= len(list):
+                       repeat = True
+       return action
\ No newline at end of file