HOME/Articles/

socket example views (snippet)

Article Outline

Python socket example 'views'

Functions in program:

  • def blog():
  • def index():

python views

Python socket example: views

def index():
    with open('templates/index.html') as template:
        return template.read()

def blog():
    with open('templates/blog.html') as template:
        return template.read()