What is the Python 3 equivalent of “python -m SimpleHTTPServer”
问题 What is the Python 3 equivalent of python -m SimpleHTTPServer ? 回答1: From the docs: The SimpleHTTPServer module has been merged into http.server in Python 3.0. The 2to3 tool will automatically adapt imports when converting your sources to 3.0. So, your command is python -m http.server , or depending on your installation, it can be: python3 -m http.server 回答2: The equivalent is: python3 -m http.server 回答3: Using 2to3 utility. $ cat try.py import SimpleHTTPServer $ 2to3 try.py RefactoringTool: