python or python3 进入python命令解释器,在同时装有python3.0以下及以上的版本时区分,否则用python
quit() | exit() 退出python解释器(python解释器有很多:CPython、Jython、PyPy等)
python -v | -V 查看安装的python版本号
python -h 查看python命令帮助
python hello.py 执行python文件
python -m pip install --upgrade pip 升级pip到最新版本
pip3 install requests_html 使用pip安装插件
python -> help() -> keywords 查看python中的关键字,Ctrl + C或enter退出help命令,exit()或quit()退出python命令行

python -> help() -> modules 查看python中的模块,包括自己定义的

python -> help() -> symbols 查看python中的运算符

python -> help() -> topics 查看python中主题

本文介绍了如何使用Python命令行进行各种操作,包括启动不同版本的Python解释器、退出解释器、查看已安装版本、获取帮助信息、执行Python脚本、升级pip工具、安装第三方库以及查询Python的关键字、模块和符号等内容。
971

被折叠的 条评论
为什么被折叠?



