# write-html.py
f = open('helloworld.html','w')
message = """<html>
<head></head>
<body><p>Hello World!</p></body>
</html>"""
f.write(message)
f.close()
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>PyScript</title>
<!-- styles and script dependencies -->
<link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css" />
<script defer src="https://pyscript.net/alpha/pyscript.js"></script>
</head>
<body>
<!-- title -->
<h3>Testing python code in HTML</h3>
<!-- python code -->
<py-script> print('Now you can!') </py-script>
</body>
</html>
Code Example |
---|
Html :: vue cursor focus |
Html :: dropdown bootstrap |
Html :: angular raw html |
Html :: html fieldset color background |
Html :: upload svg to wordpress |
Html :: php prevent form resubmission |
Html :: check button html |
Html :: do you like grepper |
Html :: card button align bottom bootstrap |
Html :: Flutter Embedded Iframe |
Html :: disabled any key in JS |
Html :: salesforce aura toggle input |
Html :: multiple choice checkbox html |
Html :: html format date |
Html :: django base html |
Html :: img src data base64 |
Html :: html align text center |
Html :: display html input datetime-local value |
Html :: how to set limit of words in input type text |
Html :: font awsome |
Html :: la balise center en html |
Html :: insérer pdf dans html |
Html :: autocomplete="off" |
Html :: html table multiple headers |
Html :: bootstrap background color |
Html :: how to preview pdf in html |
Html :: import script html |
Html :: how do i link two pages in html |
Html :: jumbotron |
Html :: html add image from folder |