From ad4af846a8656a400a06cdcaebab73f1f640d0fa Mon Sep 17 00:00:00 2001 From: Daniel Thoren Date: Mon, 2 Aug 2021 14:25:44 +0200 Subject: [PATCH] :snake: add pathlib snippets --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index c961dcd..9e70686 100644 --- a/README.md +++ b/README.md @@ -126,6 +126,13 @@ Context: ## Python Python is notoriously painful to manage. Use [pipx](https://pypi.org/project/pipx/) or [pyenv](https://mitelman.engineering/blog/python-best-practice/automating-python-best-practices-for-a-new-project/). +### Pathlib +``` +from pathlib import Path +Path('.').iterdir() +Path('.').absolute() +``` + ## Deploying to Servers When deploying to FreeBSD and Linux servers, place the code in the `/home` directory.