Share Pastebin
Guest
Public paste!

Untitled

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