linux - python -m参数
迷茫
迷茫 2017-04-18 10:25:26
0
2
763

平时自己安装都是直接pip install安装
但今天看到一个python -m pip install pymongo,请问这个-m有什么作用吗?

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(2)
黄舟
python -h

-m mod : run library module as a script (terminates option list)

-m runs the specified module

Commonly used:

Enable static server python -m SimpleHTTPServer 8888

View python documentation python -m pydoc -p 8888

pydoc server ready at http://localhost:8888/

Format json

echo '{"name":"python","version":"2.7"}' | python -m json.tool
{
    "name": "python",
    "version": "2.7"
}

more

Ty80

You can refer to: http://www.cnblogs.com/xuewei...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template