From 2063dfdde314644ee7b482a2efcb060ba165aaa0 Mon Sep 17 00:00:00 2001 From: kalebo Date: Wed, 17 Oct 2018 07:20:12 -0600 Subject: [PATCH] python: new examples (#2457) --- pages/common/python.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pages/common/python.md b/pages/common/python.md index 3de2942a003fa..7260a9d87a816 100644 --- a/pages/common/python.md +++ b/pages/common/python.md @@ -10,10 +10,18 @@ `python {{script.py}}` -- Execute Python language single command: +- Execute script as part of an interactive shell: -`python -c {{command}}` +`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}}`