admin管理员组

文章数量:1316514

I'm new to html and webpages I have a simple tester html document with two variables at different locations:

testpanel = """<!DOCTYPE html>
<html>
    <head> <title>tester Pico W</title> </head>
    <body> <h1>tester Pico W</h1>
        <p>%s<p>
        <p>"hello from tester"<p>
        <p>%s</p>
    </body>
</html>``
"""

I want to update both %s values before I send the html doc, using the code below

        response = testpanel % sentence1 % sentence2
        cl.send('HTTP/1.0 200 OK\r\nContent-type: text/html\r\n\r\n')
        cl.send(response)

I can't find the correct syntax for updating the two variables. With the above I get " TypeError: format string needs more arguments" Help please.

Ive tried several combinations of sequences in the upadate and send code.

本文标签: