notebook/IT/Python/index.md
vincent a065caf8cc
All checks were successful
continuous-integration/drone/push Build is passing
correct uppercase
2022-10-09 17:11:12 +02:00

34 lines
723 B
Markdown

# python
## référence
<https://github.com/gto76/python-cheatsheet/blob/master/README.md>
[python pateterns](https://github.com/faif/python-patterns)
Afficher les warning:```python -Wd```
Mode développement :`-X dev`
</details>
</details>`
## Virtual env
- create virtual env: `python3 -m venv /path`
- enter in virtual env: `source env/bin/activate`
- leave venv: `deactivate`
- list all installed package in file: `pip freeze > requirement.txt`
- install package list in file: `pip install -r requirement.txt`
## tips
- pprint permet d afficher vos structure de données
- la fonction dir() permet de lister les attribut d un
## unitest
### lancer une suite de tests
```python -m unittest tests.suite```