Alexander Belopolsky <belopol...@users.sourceforge.net> added the comment:

The issue is clearly with using print() for bytes' output: 

        if len(args) == 1:
            print(cal.formatyearpage(datetime.date.today().year, **optdict))

I am not sure, however how this can be fixed because calendar interface allows 
user to specify the encoding to be used for HTML and that encoding may not be 
the same or even compatible with sys.stdout encoding.

I would suggest adding -o/--output option to calendar CLI to specify the output 
file and make it required when specified encoding is not "compatible" with that 
of sys.stdout.  What constitutes "compatible" still needs to be defined.

----------
nosy: +haypo

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10087>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to