Python Command start port

Source: Internet
Author: User

1, Python analog port to solve fire proof please verify the problem

If the other service does not start while validating the firewall in the production environment, it is very effective to use the Python command to simulate the port, such as a remote IP of 192.168.0.100, and execute the following command on the remote server

Python-m Simplehttpserver PORT


Port for remote service, for example this way is 8080.


Then the firewall is opened when the end of the remote port is tested


Telnet 192.168.0.100 8080


2. Python launches mini Web service

The Linux system wants to share files, it is very convenient to use Python naming (assuming the server IP is 192.168.0.100)


For example, under the folder/data/resource where you want to share files, execute the following command


Python-m simplehttpserver 8080


So we can access the http://192.168.0.100:8080 in the browser and access the files under/data/resource.

This article is from the "Xiaoxiaozhou" blog, make sure to keep this source http://xiaoxiaozhou.blog.51cto.com/4681537/1953409

Python Command start port

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.