This is a tutorial that showcases some of Python 3s capabilitied with regards to replacing common tasks in Shell scripting.
So it does not focus much on object orientation, libraries, decorators etc., but more on
- how to call python scripts with the right interpreter (Shebang line)
- basic arithmetics, strings, collections
- how to use iterators to your advantage
- how to do file-IO
- how to call subprocesses from your script and construct pipes and handle exit codes
- how to handle exceptions
- how to collect user input and construct CLI and TUI interfaces
- how to read a configuration file
So the target audience of this can be more thought of as an IT and DevOps department rather than the Django-Backend developer or Python data scientist.
All examples basically fit on one slide and can be tested by yourself, they all should be compatible down to Python 3.6.
I put this here as public domain, so feel free to use it whereever it might be useful. If it is, you can buy me a coffee at the Kofi-Link below.