From 702cad966cdcb7f99dce3541a6c9e269b200b7c3 Mon Sep 17 00:00:00 2001 From: Marcin Chrzanowski Date: Fri, 30 Jul 2021 19:42:25 +0200 Subject: Add some new python stuff --- python.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/python.md b/python.md index 41b202e..0dca522 100644 --- a/python.md +++ b/python.md @@ -20,7 +20,13 @@ Install from requirements: python -m pip install -r requirements.txt -### Jupyter Notebook +## Executing a package + +Create `./package/__main__.py` script you want to execute. Then + + python -m package + +## Jupyter Notebook Setting default browser: @@ -28,3 +34,10 @@ Setting default browser: jupyter notebook --generate-config # edit the newly generated config c.NotebookApp.browser = ' %s' + +Using a venv: + + # once in venv + pip install ipykernel + python -m ipykernel install --user --name + # then select the new kernel in the web app -- cgit v1.2.3