[mythtv-users] Python Bindings and mythvidexport

David Herman dherman516 at gmail.com
Sun Jan 31 14:48:18 UTC 2010


I have found a handful of things with the Python bindings...


#1, tuples -- I have found a few spots where attempts to are made to pop or
append a tuple. Based on the reference below, that won't work.

http://diveintopython.org/getting_to_know_python/tuples.html

[image: 1]<http://diveintopython.org/getting_to_know_python/tuples.html#odbchelper.tuple.2.1>
You
can't add elements to a tuple. Tuples have no append or extend method.  [image:
2]<http://diveintopython.org/getting_to_know_python/tuples.html#odbchelper.tuple.2.2>
You
can't remove elements from a tuple. Tuples have no remove or pop method.

In MythData.py, the storage group function sgs =
db.getStorageGroup(groupname=sgroup, hostname=host) the resultant tuple
can't be .pop'd and then has processing failures. You need to make the
return type of getStorageGroup to a list datatype


#2, ttvdb - the api HATES "&" and other special chars. I know this is a
hack, but I recommend something like this (in searchEpisode -- mythdata.py)

        subclean = subtitle.replace("&","and")
        res = self.command('-N', '"%s"' % title, '"%s"' % subclean)



-- 
--Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mythtv.org/pipermail/mythtv-users/attachments/20100131/c2aa2d0b/attachment.htm>


More information about the mythtv-users mailing list