- Async IO in Python: A Complete Walkthrough
- Async Python in real life
- Python Concurrency: The Tricky Bits
- Speed Up Your Python Program With Concurrency — threading, asyncio, and multiprocessing
- Python Concurrency and Multithreading — interactive course on multithreading to multiprocessing using real life examples and hands-on exercises
- Python docs HOWTOs: Argparse Tutorial
- click — creating beautiful command line interfaces in a composable way with as little code as necessary
- Rich — make your command line applications visually appealing and present data in a more readable way
- Textual — Text User Interface framework for Python inspired by modern web development
- stackoverflow: Decorators demystified
- Python Decorators
- Decorator library
- Closures and Decorators in Python
- Python Inner Functions: What Are They Good For?
- Solving Logic Problems with Python Decorators
- stackoverflow: What does the yield keyword do? — also explains iterables and generators
- Yield and Generators Explained
- Python docs: itertools — functions creating iterators for efficient looping
- How to Use Python Lambda Functions
- calmcode.io: lambda — video, includes usage in
- Yet Another Lambda Tutorial
- stackoverflow: Slice notations and assignments
- List comprehensions explained visually
- Comprehensions in Python the Jedi way
- calmcode.io: comprehensions — video
- stackoverflow: How to copy 1-D and multi-D lists
- Python docs: collections — container datatypes
- stackoverflow: How to execute a program or call a system command from Python?
- stackoverflow: difference between subprocess and os.system
- stackoverflow: How to use subprocess command with pipes?
- stackoverflow: when should shell=True be avoided?
- stackoverflow: How to iterate over files in a given directory?
- pathlib module: taming the file system
- Python docs: deterministic profiling of Python programs
- stackoverflow: How can you profile a Python script?
- Speed up your code
- Easy speedup wins with Numba
- How Numba and Cython speed up Python code
- Python re(gex)? — my book on regular expressions, covers built-in
- regex101 — visual aid and online testing tool for regular expressions, select flavor as Python before use
- debuggex — railroad diagrams for regular expressions, select flavor as Python before use
- Awesome Regex — curated collection of libraries, tools, frameworks and software
On newer versions of Python, I use the simple commands shown below to create a new virtual environment. This approach should work out-of-the-box, but might depend upon the OS you are using. I'm on Linux.
# this is needed only once # 'new_project' is the name of the folder, can be new or already existing # use py instead of python3.9 for Windows $ python3.9 -m venv new_project $ cd new_project/ $ source bin/activate (new_project) $ # pip install <modules> (new_project) $ # do some scripting (new_project) $ deactivate $ # you're now out of the virtual environment
Here's some resources on this messy topic:
- Virtual Environments Demystified
- Python Virtual Environments: A Primer
- calmcode.io: virtualenv — video
- stackoverflow: What is the difference between venv, pyvenv, pyenv, virtualenv, virtualenvwrapper, pipenv, etc?
- stackoverflow: What is setup.py?
- Packaging and Distribution
- How to make an awesome Python package in 2021