When I run this helloworld code I get a "No socket could be created" error.
import web
urls = ("/.*", "hello")
app = web.application(urls, globals())
class hello:
def GET(self):
return 'Hello, world!'
app.run()
The same cod works fine if I enclose the call to app.run() inside of an if statement like this
if __name__ == "__main__":
app.run()
My understanding is that it shouldn't make any difference. Anyone have an explanation?