Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Top Posters

Who's Online (2)

Powered by Vanilla. Made with Bootstrap.
One line Python Web server
  • s1n4
    Posts: 88
    Hi guys,

    One line Python Web server (o_O)

    You can create a web server in python.

    Command :
    python -c 'import SimpleHTTPServer;SimpleHTTPServer.test()'


    or

    #!/usr/bin/python

    import SimpleHTTPServer
    SimpleHTTPServer.test()
    #http://localhost:8000/


    This starts a server listening on port 8000, serving files from its launch directory.

    Good Luck
  • Xin
    Posts: 3,251
    Nice i didnt realise python could do that that easily.
    Xin
  • s1n4
    Posts: 88
    Thanks Xinapse, yeah python could do that that easily :)