htmlinit (492B)
1 #!/usr/bin/env python3 2 3 import sys 4 5 script_tag = "" 6 script = len(sys.argv) > 1 and sys.argv[1] or None 7 8 if script: 9 script_tag = '<script src="{}"></script>'.format(script) 10 11 12 hello = """ 13 <!DOCTYPE html> 14 <html lang="en"> 15 <head> 16 <meta charset="utf-8"> 17 <meta name="viewport" content="width=device-width, initial-scale=1"> 18 19 <title>Hello World</title> 20 </head> 21 <body> 22 <h1>Hello World</h1> 23 {} 24 </body> 25 </html> 26 """.format(script_tag) 27 28 print(hello)