浏览代码

create python.md

initial
Michal 4 年之前
父节点
当前提交
5ddfda90f2
共有 1 个文件被更改,包括 28 次插入0 次删除
  1. 28 0
      pages.pl/common/python.md

+ 28 - 0
pages.pl/common/python.md

@@ -0,0 +1,28 @@
+# python
+
+> Python language interpreter.
+> More information: <https://www.python.org>.
+
+- Call a Python interactive shell (REPL):
+
+`python`
+
+- Execute script in a given Python file:
+
+`python {{script.py}}`
+
+- Execute script as part of an interactive shell:
+
+`python -i {{script.py}}`
+
+- Execute a Python expression:
+
+`python -c "{{expression}}"`
+
+- Run library module as a script (terminates option list):
+
+`python -m {{module}} {{arguments}}`
+
+- Interactively debug a Python script:
+
+`python -m pdb {{script.py}}`