What is the Python 3 equivalent of python -m SimpleHTTPServer

0 votes
What is the Python 3 equivalent of python -m SimpleHTTPServer?
Nov 27, 2020 in Python by anonymous
• 8,880 points
60 views

1 answer to this question.

0 votes

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
answered Nov 27, 2020 by Gitika
• 65,870 points

Related Questions In Python

0 votes
1 answer

What is the equivalent of NotImplementedError using Python?

Hi, good question! One simple answer to your ...READ MORE

answered Jan 17, 2019 in Python by Nymeria
• 3,520 points
1,180 views
0 votes
1 answer
0 votes
1 answer

What is the most recent version of python 3?

Python 3.7.3 is the latest release of ...READ MORE

answered Jun 7, 2019 in Python by Harsh
• 180 points
121 views
+2 votes
3 answers

what is the practical use of polymorphism in Python?

Polymorphism is the ability to present the ...READ MORE

answered Mar 31, 2018 in Python by anto.trigg4
• 3,440 points
2,694 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 1,983 views
0 votes
0 answers
0 votes
0 answers

How do you install spyder on anaconda?

Is there a way to work with ...READ MORE

Jul 24, 2019 in Python by Waseem
• 4,540 points
178 views
+6 votes
8 answers

What exactly is the function of random.seed() in python?

The seed method is used to initialize the ...READ MORE

answered Oct 29, 2018 in Python by Rahul
105,177 views
0 votes
1 answer

what is the use of // operator in Python? Can anyone explain?

Hi, @Roshni, It is a Floor Divisionoperator, which ...READ MORE

answered Jun 23, 2020 in Python by Gitika
• 65,870 points
182 views