Opened 9 years ago
Closed 9 years ago
#5396 closed defect (fixed)
The ascii media type is rendered as one line bytes string under python3
Reported by: | 宋文武 | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 0.9.0 |
Component: | programming | Keywords: | |
Cc: | Parent Tickets: | 5017 |
Description
Running under python3, I upload a plain text file contains:
oooo #### ==== zzzz
Then view it in the browser, I get:
<div class="ascii-wrapper"> <pre>b'oooo\n####\n====\nzzzz\n'</pre> </div>
I think the correct result should be a multi-line block.
I can get it by using media.media_files['unicode']).read().decode('utf-8')
in ascii.html
, but this may not suitable for python2?
Change History (4)
comment:1 by , 9 years ago
Status: | new → accepted |
---|
comment:2 by , 9 years ago
Milestone: | → 0.9.0 |
---|
comment:3 by , 9 years ago
It indeed works on both Python 3 and 2. Thank you! I pushed and attrributed you appropriately in the commit.
comment:4 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Good confirmed! Python 3 isn't really first class until it supports ascii art :)