This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author martin.panter
Recipients docs@python, martin.panter
Date 2014-05-26.05:52:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
At the bottom of the “tkinter” doc page it mentions the “data” option is available. However I was unable to get it to work well when passing a plain bytes() string in. It seems the bytes() string gets interpreted as UTF-8 somewhere along the line, although the underlying TCL library apparenly handles byte strings fine itself. Passing binary GIF and PNG data in Python would usually produce strange exceptions, crashes, and blank images for me.

I found this message with a simple patch which might be useful, though I’m not familiar with the code involved to understand the implications:

Even if that fix is not appropriate, can I suggest adding to the documentation to say the data should be encoded with one of these options that seem to work? The Base-64 one is probably better.

Date User Action Args
2014-05-26 05:52:24martin.pantersetrecipients: + martin.panter, docs@python
2014-05-26 05:52:24martin.pantersetmessageid: <>
2014-05-26 05:52:24martin.panterlinkissue21580 messages
2014-05-26 05:52:23martin.pantercreate