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

Hika van den Hoven hikavdh at gmail.com
Wed Oct 15 20:28:22 UTC 2014


>> To answer your other question. Yes, import sys and then
>> if the script fails, use: sys.exit(2), when the card is
>> idle, sys.exit(0) otherwise 1 etc.

> Can I return the state? Like:
>     state = element.findtext('State')
>     sys.exit(state)
> or even:
>     sys.exit(element.findtext('State'))

This works:
     state=int(element.findtext('State'))
     sys.exit(state)
or in one line:
     sys.exit(int(element.findtext('State')))

Tot mails,
  Hika                            mailto:hikavdh at gmail.com

"Zonder hoop kun je niet leven
Zonder leven is er geen hoop
Het eeuwige dilemma
Zeker als je hoop moet vernietigen om te kunnen overleven!"

De lerende Mens



More information about the mythtv-users mailing list