How to make website with Python?

How python can help me to make my website?

  • i want to develop a website in Python. Can someone tell me how I can do this. currently I am using ASP.NET MVC for web development. I want to make just the Hello world sample. It should print dynamically.

  • Answer:

    Here is a solution using string Templates: #!/usr/bin/env python import string s=string.Template(""" <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title>My page</title> </head> <body> <p>$text</p> </body> </html> """) s.substitute(text='Hello World') Now, store the output into a file and open it in a browser... For more serious development, have a look at https://www.djangoproject.com/

user928770 at Stack Overflow Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.