<br><br><div class="gmail_quote">On Sat, Oct 24, 2009 at 1:53 PM, Richard Fearn <span dir="ltr">&lt;<a href="mailto:richardfearn@gmail.com">richardfearn@gmail.com</a>&gt;</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>
&gt; Here&#39;s a quick twenty minute rewrite using the python bindings.<br>
<br>
</div>Thanks for that! I&#39;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&#39;ve opted to stick with the dictionaries<br>
for holding program information.<br>
<br>
I&#39;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 &quot;./mythcal&quot;, line 107, in &lt;module&gt;<br>
    recordings = get_recordings_from_backend()<br>  File &quot;./mythcal&quot;, line 99, in get_recordings_from_backend<br>    if mythtv.isRecording(recorder):<br>  File &quot;/usr/local/lib/python2.6/dist-packages/MythTV/MythTV.py&quot;, line 295, in isRecording<br>
    res = self.backendCommand(&#39;QUERY_RECORDER &#39;+BACKEND_SEP.join([recorder,&#39;IS_RECORDING&#39;]))<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(&#39;QUERY_RECORDER &#39;+BACKEND_SEP.join([str(recorder),&#39;IS_RECORDING&#39;]))<br><br>changing &#39;recorder&#39; from an int to a string and, lo and behold, I had entries in my calendar. However, I don&#39;t know what I am breaking by changing this.  Any ideas?<br>
<br>Regards,<br><br>Ken E.<br></div></div>