Untitled
By: a guest | Jul 25th, 2010 | Syntax:
None | Size: 1.29 KB | Hits: 46 | Expires: Never
[mythtv@naruto python]$ more hello2.py
#!/usr/bin/python
from MythTV import MythTV, MythDB, Job, Video, VideoGrabber, MythLog, MythError
db = MythDB()
myth = MythTV()
mList = myth.getRecordings()
for item in mList:
print item
[mythtv@naruto python]$ ./hello2.py
2010-07-25 13:00:33.515 Python Database Connection: Using connection settings from /home/mythtv/.mythtv/config.xml
2010-07-25 13:00:33.541 Python Database Connection: Using connection settings from /home/mythtv/.mythtv/config.xml
2010-07-25 13:00:33.541 Python Database Connection: Using connection settings from /home/mythtv/.mythtv/config.xml
<Program 'CSI: Crime Scene Investigation','2009-09-24 21:00:00' at 0x152bdd0>
<Program 'Smallville','2009-09-25 20:00:00' at 0x152bf50>
<Program 'Desperate Housewives','2009-09-28 00:00:00' at 0x1549110>
<Program 'Trauma','2009-09-29 00:00:00' at 0x1549290>
<Program 'CSI: Crime Scene Investigation','2009-10-01 21:00:00' at 0x1549410>
<Program 'Smallville','2009-10-02 20:00:00' at 0x1549590>
...... tons of these entries ......
<Program 'Made','2010-06-08 16:00:00' at 0x2483350>
Traceback (most recent call last):
File "./hello2.py", line 8, in <module>
print item
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 12: ordinal not in range(128)