[issue10087] HTML calendar is broken

Alexander Belopolsky report at bugs.python.org
Wed Oct 13 18:00:39 CEST 2010


Alexander Belopolsky <belopolsky at 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 <report at bugs.python.org>
<http://bugs.python.org/issue10087>
_______________________________________


More information about the Python-bugs-list mailing list