Skip to content

Instantly share code, notes, and snippets.

@acrymble
Created July 5, 2011 19:42
Show Gist options
  • Select an option

  • Save acrymble/1065704 to your computer and use it in GitHub Desktop.

Select an option

Save acrymble/1065704 to your computer and use it in GitHub Desktop.
Python Write HTML 2
# write-html-2.py
import webbrowser
f = open('helloworld.html','w')
message = """<html>
<head></head>
<body><p>Hello World!</p></body>
</html>"""
f.write(message)
f.close()
webbrowser.open_new_tab('helloworld.html')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment