Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python2和python3开启服务端的命令不同 #6

Open
Valuebai opened this issue Jul 31, 2019 · 1 comment
Open

python2和python3开启服务端的命令不同 #6

Valuebai opened this issue Jul 31, 2019 · 1 comment

Comments

@Valuebai
Copy link
Owner

简易Web Server
你是否想过通过网络快速共享文件?好消息,Python为你提供了这样的功能。进入到你要共享文件的目录下并在命令行中运行下面的代码:

python2:
python -m SimpleHTTPServer 6666  ——这个命令是python2的


python3:
python -m http.server   ——这个命令是python3才有的,在centOS执行会报错:/usr/bin/python: No module named http.server
@Valuebai
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant