From 18327ffd1d065cde5e5ec0d8017e4bdcfb358002 Mon Sep 17 00:00:00 2001 From: Little Starfire <153414530+lsf1re@users.noreply.github.com> Date: Sat, 16 Dec 2023 18:47:45 +0800 Subject: [PATCH] python: add Chinese translation (#11750) --- pages.zh/common/python.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 pages.zh/common/python.md diff --git a/pages.zh/common/python.md b/pages.zh/common/python.md new file mode 100644 index 000000000..5afc82c3d --- /dev/null +++ b/pages.zh/common/python.md @@ -0,0 +1,36 @@ +# python + +> Python 语言解释器。 +> 更多信息:. + +- 启动 REPL(交互式 shell): + +`python` + +- 执行特定 Python 文件: + +`python {{路径/到/文件.py}}` + +- 执行特定 Python 文件后进入 REPL: + +`python -i {{路径/到/文件.py}}` + +- 执行 Python 表达式: + +`python -c "{{表达式}}"` + +- 运行特定模块的脚本: + +`python -m {{模块}} {{参数}}` + +- 使用 `pip` 安装包: + +`python -m pip install {{包}}` + +- 互动调试 Python 脚本: + +`python -m {{pdb}} {{路径/到/文件.py}}` + +- 在当前目录中的端口 8000 上启动内置的 HTTP 服务器: + +`python -m {{http.server}}`