小编典典

“python -m SimpleHTTPServer”的 Python 3 等价物是什么

python

Python 3 相当于python -m SimpleHTTPServer什么?


阅读 272

收藏
2022-02-23

共1个答案

小编典典

文档

SimpleHTTPServer模块已合并到http.serverPython 3.0 中。将源转换为 3.0 时,2to3 工具将自动调整导入。

因此,您的命令是python -m http.server,或者根据您的安装,它可以是:

python3 -m http.server
2022-02-23