User Tools

Site Tools


other:python:misc_by_jyp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
other:python:misc_by_jyp [2024/08/27 12:47]
jypeter [String formatting] Improved the section
other:python:misc_by_jyp [2024/09/25 13:37] (current)
jypeter [Extra tutorials] Multithreading and Multiprocessing tuto
Line 11: Line 11:
   * [[https://​medium.com/​@yaduvanshineelam09/​ultimate-python-cheat-sheet-practical-python-for-everyday-tasks-8a33abc0892f|Ultimate Python Cheat Sheet: Practical Python For Everyday Tasks]]   * [[https://​medium.com/​@yaduvanshineelam09/​ultimate-python-cheat-sheet-practical-python-for-everyday-tasks-8a33abc0892f|Ultimate Python Cheat Sheet: Practical Python For Everyday Tasks]]
   * [[https://​medium.com/​pythoneers/​16-hacks-that-will-take-your-python-skills-to-the-next-level-12e7a9b97421|16 Hacks That Will Take Your Python Skills to the Next Level]]   * [[https://​medium.com/​pythoneers/​16-hacks-that-will-take-your-python-skills-to-the-next-level-12e7a9b97421|16 Hacks That Will Take Your Python Skills to the Next Level]]
 +  * [[https://​levelup.gitconnected.com/​modular-coding-in-python-finally-solve-your-import-errors-af2fd172fcf7|Modular Coding in Python: Finally Solve your Import Errors]] (understanding and fixing ModuleNotFoundError and ImportError)
 +  * [[https://​medium.com/​@moraneus/​understanding-multithreading-and-multiprocessing-in-python-1ed39bb078d5|Understanding Multithreading and Multiprocessing in Python]]
 ===== Reading/​setting environments variables ===== ===== Reading/​setting environments variables =====
  
Line 31: Line 33:
  
  
 +===== Using log files (aka logging) =====
 +
 +It is always possible to display information messages using the ''​print()''​ command, but it is more efficient to use //logging// tools when you want to **display correctly a lot of information about a script progress
 +**
 +  * [[https://​loguru.readthedocs.io/​|Loguru]] is a library which aims to bring enjoyable logging in Python
 +    * See also [[https://​betterstack.com/​community/​guides/​logging/​loguru/​|A Complete Guide to Logging in Python with Loguru]]
 +  * More on [[https://​betterstack.com/​community/​guides/​logging/#​python|logging with python]]
 +  * The default (but not easy to use) Python ''​[[https://​docs.python.org/​3/​library/​logging.html|logging]]''​ module
 ===== Stopping a script ===== ===== Stopping a script =====
  
other/python/misc_by_jyp.1724762835.txt.gz · Last modified: 2024/08/27 12:47 by jypeter