Single Line Python Webserver

I’m pretty sure you can’t have a webserver using sockets and select() on one line of code. Not even using semicolons, you’d have to have some loops and control structures.

Are you sure this isn’t what you are looking for?

Python 3 version:

$ python -m http.server 8000
Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...

Python 2 version: python -m SimpleHTTPServer 8000

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)