<br><br><div class="gmail_quote">On Sat, Oct 24, 2009 at 1:53 PM, Richard Fearn <span dir="ltr"><<a href="mailto:richardfearn@gmail.com">richardfearn@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello,<br>
<div class="im"><br>
> Here's a quick twenty minute rewrite using the python bindings.<br>
<br>
</div>Thanks for that! I've changed mythcal to use the Python bindings<br>
rather than go directly to the database. (Thanks also to Michael for<br>
suggesting the bindings.) I've opted to stick with the dictionaries<br>
for holding program information.<br>
<br>
I've used pytz (<a href="http://pypi.python.org/pypi/pytz" target="_blank">http://pypi.python.org/pypi/pytz</a>) to convert the local<br>
times in the Program objects to UTC.<br>
<br>
The new version is on Google Code:<br>
<div class="im"><br>
<a href="http://code.google.com/p/mythcal/" target="_blank">http://code.google.com/p/mythcal/</a><br>
<br>
</div>Regards,<br>
<br>
Rich<br>
<div><br></div></blockquote><div><br>Rich:<br><br>I downloaded your script and followed your instructions, but I got an error from the MythTV python bindings:<br><br>Traceback (most recent call last):<br> File "./mythcal", line 107, in <module><br>
recordings = get_recordings_from_backend()<br> File "./mythcal", line 99, in get_recordings_from_backend<br> if mythtv.isRecording(recorder):<br> File "/usr/local/lib/python2.6/dist-packages/MythTV/MythTV.py", line 295, in isRecording<br>
res = self.backendCommand('QUERY_RECORDER '+BACKEND_SEP.join([recorder,'IS_RECORDING']))<br>TypeError: sequence item 0: expected string, int found<br><br>So, just for grins, I changed line 295 to be:<br>
<br>res = self.backendCommand('QUERY_RECORDER '+BACKEND_SEP.join([str(recorder),'IS_RECORDING']))<br><br>changing 'recorder' from an int to a string and, lo and behold, I had entries in my calendar. However, I don't know what I am breaking by changing this. Any ideas?<br>
<br>Regards,<br><br>Ken E.<br></div></div>