[mythtv] Notice: Python binding rewrite
Ian Barton
lists at manor-farm.org
Sat Jan 2 09:48:31 UTC 2010
Raymond Wagner wrote:
> On 1/1/2010 5:56 AM, Ian Barton wrote:
>> This looks looks good, even though I will need to rewrite quite a few
>> of my programs:) I welcome the addition of proper logging,as ATM I
>> use my own routine. Putting messages in the standard MythTV logs is
>> much better.
>
> If you had gotten by with direct manipulation of the database, those
> won't cease to function. The only code that would require significant
> rework would be ones that use the old assorted MythVideo functions, and
> you can find translations for most of those attached elsewhere in this
> thread. Other than that, it's just some minor changes to convert old
> programs over.
>
>> ATM I have several routines that access the DB directly to get data,
>> although they do actually use the MythDB class. One example is a
>> routine to make a file name based on the recording's Title and date,
>> but removing any possible illegal characters.
>
> I've got code for a FuseFS program that does basically this. It just
> follows the formatting used by mythrename.pl. I could drop this into
> the Recorded class without significant effort. I'm not sure what other
> 'file oriented functions' one would need.
> _______________________________________________
That would be good. I'll have another look at file functions later. A
quick scan through the new bindings shows that you have already
implemented most of the one that anyone would need:)
One other question. In the 0.21 bindings the init code for the database
connection did a pretty good job of trying to find connection
information somewhere e.g. looking in userdir then in /etc/mythtv. The
0.22 bindings seem to only look for config.xml. Was there a reason for
removing the other methods?
One of my scripts runs in Apache under mod-python. ATM I am having
trouble trying to work out how to pass database information in the
MythTV() object's init method. This is probably obvious, but ATM I have
a stinking cold and am not thinking clearly:)
Ian.
More information about the mythtv-dev
mailing list