1. urllib worked with read(), thanks very much.
2. I test with some conditions, finally it seems still a bug with jinja2.
    (a), home.html was render by my py file, it is extends base.html.
          template code like {% extends "base.html" %} in home.html
    (b), do u see that? jinja2 will plus the bom of two files. It should be 
merge, not plus, right?

              BOM_size              |  base.html in ANSI     |  base.html 
in UTF-8 
             home.html in ANSI   |              0                  |   
  '\xef\xbb\xbf'(3)   |
             home.html in UTF-8  |           '\xef\xbb\xbf'(3) |     
'\xef\xbb\xbf\xef\xbb\xbf'(6)   |
          
3. I still consider that this problem is issue of jinja2, not related with 
others.

thanks,


在 2014年7月11日星期五UTC+8上午11时50分06秒,Steven Kryskalla写道:
>
> On Thu, Jul 10, 2014 at 7:59 PM, Zarey Chang <[email protected] 
> <javascript:>> wrote:
>
>> well, that urllib seems could not work fine like content of you print.
>>
>> >>> html1[:16]
>>
>> Traceback (most recent call last):
>>
>>   File "<stdin>", line 1, in <module>
>>
>> AttributeError: addinfourl instance has no attribute '__getitem__'
>>
>> Doesn't metter, it should be study the usage with urllib.
>>
>>
> Sorry, I pasted the wrong command, try this:
>
> >>> html1 = urllib.urlopen("http://1.yunzlog.appspot.com/";).read()
> >>> html2 = urllib.urlopen("http://2.yunzlog.appspot.com/";).read()
> >>> html1[:16]
> >>> html2[:16]
>
> However you're saving the file make sure you're not saving a Byte Order 
> Mark / BOM. This is very likely to be the cause of any weird spacing on the 
> page.
>
>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"pocoo-libs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pocoo-libs.
For more options, visit https://groups.google.com/d/optout.

Reply via email to