Simple Python server setup

前端 未结 2 1638
你的背包
你的背包 2021-01-06 03:07

I am trying to learn python (coming from PHP), and want to set up the simplest web server so I can start coding.

I found the integrated HTTP server, so I figured it

2条回答
  •  一整个雨季
    2021-01-06 03:33

    Python is for writing programs in general, not only web-sites.

    SimpleHTTPServer is really just a trivial HTTP server, it serves files. It doesn't try to interpret code.

    If you want to do web-development with Python, you should be using a web framework. web.py is a good choice, you can check its tutorial. Another option is Django, which also has a brilliant tutorial.

    Both of them have simple development servers built in, so you'll be able to start experimenting easily.

提交回复
热议问题