Message80030
formatyearpage is returning "bytes", not "str"
Python 3.0 (r30:67507, Dec 3 2008, 20:14:27) [MSC v.1500 32 bit
(Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> import calendar
>>> calendar.HTMLCalendar().formatyearpage(2009)[0:50]
b'<?xml version="1.0" encoding="utf-8"?>\n<!DOCTYPE h'
>>> type(calendar.HTMLCalendar().formatyearpage(2009)[0:50])
<class 'bytes'>
# For the time being, to fix it I can use "decode"...
>>> calendar.HTMLCalendar().formatyearpage(2009).decode("utf-8")[0:50]
'<?xml version="1.0" encoding="utf-8"?>\n<!DOCTYPE h'
>>> type(calendar.HTMLCalendar().formatyearpage(2009).decode("utf-8")[0:50])
<class 'str'> |
|
Date |
User |
Action |
Args |
2009-01-17 17:57:55 | mnewman | set | recipients:
+ mnewman |
2009-01-17 17:57:54 | mnewman | set | messageid: <1232215074.9.0.340477624129.issue4973@psf.upfronthosting.co.za> |
2009-01-17 17:56:54 | mnewman | link | issue4973 messages |
2009-01-17 17:56:54 | mnewman | create | |
|