Answers for "how to open python file in html"

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 "how to open python file in html"

Python Answers by Framework

Browse Popular Code Answers by Language