python - How to open html file? -
i have html file called test.html
has 1 word בדיקה
.
i open test.html , print it's content using block of code:
file = open("test.html", "r") print file.read()
but prints ??????
, why happened , how fix it?
btw. when open text file works good.
edit: i'd tried this:
>>> import codecs >>> f = codecs.open("test.html",'r') >>> print f.read() ?????
import codecs f=codecs.open("test.html", 'r') print f.read()
try this.
Comments
Post a Comment