Python build Httpserver

Source: Internet
Author: User

Because the mobile phone to download files on the computer, using mobile phone helper What often haunt response, so online check, directly using Python to build a simple HTTP server, then in its running directory to throw files on the line. The list of related files can be displayed directly when the browser is accessed. Refer to the following article: http://www.cnblogs.com/yili16438/p/d3209323913c6d53e6060fcd8d27e4c0.html

If you are using 2.x, then you simply need to run the command:

Python-m Simplehttpserver 80

The last parameter is the port number, which uses port 80, which defaults to 8000. However, if you are using 3.x, then the command will be different:

Python-m Http.server 80

Python build Httpserver

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.