I have a file test1.py. I am using web.py to display it in a webpage.
import web
urls = ('/', 'hello','/bye', 'bye')
app = web.application(urls, globals(), True)
class hello:
def GET(self):
return """<html>
<head>
</head>
<body>
<img src="smile.png" alt="SAP Logo" width="500px" height="100px"/>
</body></html>"""
However, when run it will display:
127.0.0.1:59558 - - [28/Sep/2015 15:52:32] "HTTP/1.1 GET /" - 200 OK
127.0.0.1:59558 - - [28/Sep/2015 15:52:32] "HTTP/1.1 GET smile.png" - 404 Not Found
Image is placed in Desktop.