You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
662 B

  1. # python
  2. ## référence
  3. <https://github.com/gto76/python-cheatsheet/blob/master/README.md>
  4. Afficher les warning:```python -Wd```
  5. Mode développement :`-X dev`
  6. </details>
  7. </details>`
  8. ## Virtual env
  9. - create virtual env: `python3 -m venv /path`
  10. - enter in virtual env: `source env/bin/activate`
  11. - leave venv: `deactivate`
  12. - list all installed package in file: `pip freeze > requirement.txt`
  13. - install package list in file: `pip install -r requirement.txt`
  14. ## tips
  15. - pprint permet d afficher vos structure de données
  16. - la fonction dir() permet de lister les attribut d un
  17. ## unitest
  18. ### lancer une suite de tests
  19. ```python -m unittest tests.suite```