🐍 add pathlib snippets

This commit is contained in:
dannydannydanny 2021-08-02 14:25:44 +02:00 committed by GitHub
parent b075393dd6
commit ad4af846a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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.