aboutsummaryrefslogtreecommitdiff
path: root/tools/host_tools/FormatConverter/input.py
diff options
context:
space:
mode:
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>2009-06-11 12:46:49 +0200
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>2009-06-11 12:46:49 +0200
commit510fe63aa7bf232fcca7f2a3d0fdab2c45307b78 (patch)
tree1d1fabf5758a4db48982d7dafd37d9d0c51bce2d /tools/host_tools/FormatConverter/input.py
parent30562d78ee2be5fe628a88cce45f7671ff0644bb (diff)
downloadenigma2-510fe63aa7bf232fcca7f2a3d0fdab2c45307b78.tar.gz
enigma2-510fe63aa7bf232fcca7f2a3d0fdab2c45307b78.zip
add a format converter, i.e. to convert from lamedb to sat.xml files
the main destination format of this converter is a sat.xml file easily extendable with further datasources
Diffstat (limited to 'tools/host_tools/FormatConverter/input.py')
-rw-r--r--tools/host_tools/FormatConverter/input.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/tools/host_tools/FormatConverter/input.py b/tools/host_tools/FormatConverter/input.py
new file mode 100644
index 00000000..7a206273
--- /dev/null
+++ b/tools/host_tools/FormatConverter/input.py
@@ -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