fork download
  1. from os import mkdir
  2.  
  3. mkdir('www')
  4. mkdir('www/css')
  5. mkdir('www/images')
  6.  
  7. html_code = """
  8. <!DOCTYPE html>
  9. <html>
  10. <head>
  11. <title>Заглавная страница</title>
  12. <meta charset='utf-8'>
  13. <meta http-equiv="X-UA-Compatible" content="IE=Edge">
  14. <link rel="stylesheet" href="css/styles.css" type="text/css">
  15. </head>
  16. <body>
  17.  
  18. </body>
  19. </html>"""
  20.  
  21. index_page = open('www/index.html', 'w')
  22. index_page.write(html_code)
  23. index_page.close()
  24.  
  25. styles_page = open('www/css/styles.css', 'w')
  26. styles_page.close()
  27.  
Runtime error #stdin #stdout #stderr 0.02s 9984KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 3, in <module>
PermissionError: [Errno 13] Permission denied: 'www'