[mythtv-users] Python Bindings
Michael Watson
michael at thewatsonfamily.id.au
Sun May 27 05:37:18 UTC 2012
I am trying to write a python script to cleanly close the frontend. But
it appears the python bindings are not functioning correctly (or more
likely I am doing something incorrectly)
I have (which doesnt work, other than jump to the main menu):
from MythTV import MythDB
from MythTV import Frontend
db = MythDB()
frontend = db.getFrontend('tv02')
frontend.jump['mainmenu']
time.sleep(5)
frontend.key.escape
time.sleep(5)
frontend.key.down
time.sleep(5)
frontend.key.enter
time.sleep(5)
But if I use: (it works)
tn = telnetlib.Telnet(ipaddr, 6546)
tn.write('jump mainmenu\n')
tn.read_until('OK', 2)
time.sleep(5)
tn.write('key escape\n')
tn.read_until('OK', 2)
time.sleep(5)
tn.write('key down\n')
tn.read_until('OK', 2)
time.sleep(5)
tn.write('key enter\n')
tn.read_until('OK', 2)
tn.close()
Am I doing something wrong, or are the python bindings not working
correctly?
OS: Ubuntu 10.04
MythTV Version : v0.25-111-geb1d4a7
MythTV Branch : fixes/0.25
Network Protocol : 72
Library API : 0.25.20120506-1
QT Version : 4.6.2
Regards
Michael Watson
More information about the mythtv-users
mailing list