Answers for "open html file local browser python"

1

how to open local html file in python

import codecs
file = codecs.open("sample.html", "r", "utf-8")
print(file.read())
Posted by: Guest on September-23-2020
0

how to make html files open in chrome using python

// Also, use the absolute path of the file:

webbrowser.open('file://' + os.path.realpath(filename))
Posted by: Guest on January-01-2021

Code answers related to "open html file local browser python"

Python Answers by Framework

Browse Popular Code Answers by Language