patternpythonCriticalCanonical
What is the Python 3 equivalent of "python -m SimpleHTTPServer"
Viewed 0 times
theequivalentsimplehttpserverwhatpython
Problem
What is the Python 3 equivalent of
python -m SimpleHTTPServer?Solution
From the docs:
The
So, your command is
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.serverCode Snippets
python3 -m http.serverContext
Stack Overflow Q#7943751, score: 2306
Revisions (0)
No revisions yet.