参考:https://blog.csdn.net/e_Inch_Photo/article/details/80060952

    查看 python 的 http.server 模块:python -m http.server —help

    1. PS D:\downloads> python -m http.server --help
    2. usage: server.py [-h] [--cgi] [--bind ADDRESS] [--directory DIRECTORY] [port]
    3. positional arguments:
    4. port Specify alternate port [default: 8000]
    5. optional arguments:
    6. -h, --help show this help message and exit
    7. --cgi Run as CGI Server
    8. --bind ADDRESS, -b ADDRESS
    9. Specify alternate bind address [default: all interfaces]
    10. --directory DIRECTORY, -d DIRECTORY
    11. Specify alternative directory [default:current directory]
    12. PS D:\downloads>

    进入对应的目录,然后运行 python -m http.server port

    1. PS D:\downloads> python -m http.server 8010
    2. Serving HTTP on :: port 8010 (http://[::]:8010/) ...
    3. ::1 - - [04/Mar/2022 16:21:57] "GET / HTTP/1.1" 200 -
    4. ::1 - - [04/Mar/2022 16:21:58] "GET /favicon.ico HTTP/1.1" 200 -
    5. ::ffff:10.13.30.202 - - [04/Mar/2022 16:23:32] "GET / HTTP/1.1" 200 -
    6. ::ffff:10.13.30.202 - - [04/Mar/2022 16:23:32] "GET /favicon.ico HTTP/1.1" 200 -
    7. ::ffff:10.13.30.202 - - [04/Mar/2022 16:29:24] "GET / HTTP/1.1" 200 -
    8. ::ffff:10.13.30.202 - - [04/Mar/2022 16:29:24] "GET /favicon.ico HTTP/1.1" 200 -

    然后访问服务(老版的 IE 浏览器一定要输入 http://,不然不出来。。。,比如 http://10.13.30.202:8010/
    image.png
    接下来,就可以进行文件下载了。