Explore Courses Blog Tutorials Interview Questions
+1 vote
in Python by (2.6k points)
edited by

Can someone tell me a python -m SimpleHTTPServer equivalent Python 3?

2 Answers

0 votes
by (2k points)
edited by

For Python 3 use the command:

python3 -m http.server

Check Python help docs for more or comment down below.

0 votes
by (106k points)
edited by

By using 2to3 utility:-

$ cat

import SimpleHTTPServer

$ 2to3

RefactoringTool: Skipping implicit fixer: buffer

RefactoringTool: Skipping implicit fixer: idioms

RefactoringTool: Skipping implicit fixer: set_literal

RefactoringTool: Skipping implicit fixer: ws_comma

RefactoringTool: Refactored

---  (original)

+++  (refactored)

@@ -1 +1 @@

-import SimpleHTTPServer

+import http.server

RefactoringTool: Files that need to be modified:


You can use the following video tutorials to clear all your doubts:-

If you are looking for upskilling yourself in python you can join our Python Training and learn from the industry expert.

Related questions

0 votes
1 answer
+1 vote
2 answers
0 votes
1 answer
0 votes
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers!

29.3k questions

30.6k answers


104k users

Browse Categories