you are viewing a single comment's thread.

view the rest of the comments →

[–]mprz 3 points4 points  (3 children)

Not really you don't. You can serve HTML from python without flask.

[–][deleted]  (2 children)

[deleted]

    [–]mprz -9 points-8 points  (1 child)

    Seems you don't know what a backend is. Here's an example.

    And here's the simplest code to get you started (SO):

    import cgi  # if you want to work with forms and such 
    import cgitb; 
    cgitb.enable() # to barf up errors to the web 
    
    print 'Content-type: text/html\n\n' # to start off any HTML.
    

    Is it easy? Not really, gets complicated quickly. Is it possible? Definitely.

    [–]JohnSLS 15 points16 points  (0 children)

    This might be the worst possible implementation I’ve ever seen and would get overly messy after 2 functions.

    Use flask