[mythtv-users] How to check if a tuner is in use

Bill Meek keemllib at gmail.com
Wed Oct 15 23:28:22 UTC 2014


On 10/15/2014 05:45 PM, Hika van den Hoven wrote:
...
 > OK, your url returns <String>GentooServer</String> so I'll ad a query
> just in case. But how to I retrieve the string? Just with:
> response.findtext('String')? So then it becomes:
>
> URL0 = 'http://{}:6544//Myth/GetHostName'.format(args.host)
> response = ET.parse(urlopen(URL0))

It's a bit different. Consider this:

response = ET.parse(urllib.request.urlopen(URL0))
root = response.getroot()
print('tag = {}, text = {}'.format(root.tag, root.text))

So you could say: myHost = root.text

-- 
Bill


More information about the mythtv-users mailing list