In this episode, we have special guest Paul Everitt on the show to discuss the new Python Documentary that was released last week.
I find myself in the Python REPL a lot. I open up the REPL to play with an idea, to use Python as a calculator or quick and dirty text parsing tool, to record a screencast, to come up with a code example for an article, and (most importantly for me) to teach Python. My Python courses and workshops are based largely around writing code together to guess how something works, try it out, and repeat.
Free threading in Python, which disables the global interpreter lock (GIL), is now a complete implementation of PEP (Python Enhancement Proposal) 703, a much anticipated feature which makes concurrent programming in Python natural. Free-threaded mode also enables a specialized adaptive interpreter, originally part of the Faster CPython project led by Mark Shannon at Microsoft (though the company axed its support in May).
What's changed about learning Python over the last few years? What new techniques and updated advice should beginners have as they start their journey? This week on the show, Stephen Gruppetta and Martin Breuss return to discuss beginning to learn Python. We share techniques for finding motivation, building projects, and learning the fundamentals. We provide advice on installing Python and not obsessing over finding the perfect editor. We also examine incorporating LLMs into learning to code and practicing asking good questions.
Let's say we have some text that was retrieved from a database, and the original text came from a form submission in a web browser. Web browsers often represent line breaks as a carriage return character, followed by a line feed character: That's what we see in our text as well: \r followed by \n. This is often called CRLF (carriage return and line feed) whereas \n is called LF (line feed).
Python's asyncio.gather function is great for I/O bound parallel processing. There's a simple utility function I like to use that I call gather_in_batches: async def gather_in_batches(tasks, batch_size=100, return_exceptions=False): for i in range(0, len(tasks), batch_size): batch = tasks[i:i+batch_size] for result in await asyncio.gather(*batch, return_exceptions=return_exceptions): yield result
Villager, a new penetration-testing tool linked to a suspicious China-based company and described by researchers as "Cobalt Strike's AI successor," has been downloaded about 10,000 times since its release in July. The package, published on Python Package Index, operates as a Model Context Protocol (MCP) client and integrates multiple security tools. It includes Kali Linux, which legitimate defenders use to automate penetration testing, and it contains hundreds of tools that can also be used to launch cyber attacks at scale.
This quiz helps you practice sorting dictionaries by keys, values, and custom rules in modern Python. You'll revisit how insertion order works, when to use different views, and how to rebuild sorted dictionaries. You'll also learn best practices for sorting dictionaries efficiently. For a complete overview, check out Sorting Dictionaries: Keys, Values, and More. The quiz contains 11 questions and there is no time limit. You'll get 1 point for each correct answer.
VS Code has a search & replace feature that lets you use regex to look for patterns and then reference groups in the replacement... But it lets you do something else that's really cool. Changing casing with special sequences When you are replacing groups, you can use special sequences to change the casing of the group you're inserting, according to the following table: The picture below shows an example of a search & replace operation where I looked for the text "all in one go".
When writing tests in pytest, often there's a need to set environment variables for your tests. Instead of modifying `os.environ` directly, which can lead to side effects and make tests harder to manage, here's how to do it with the [pytest-env](https://pypi.org/project/pytest-env/) package. First, install the package. ```sh pip install pytest-env # classic but works great uv add pytest-env # if you're one of us cool kids using uv uv add pytest-env --group test # if you use a specific test group of dependencies ```
I actually run from my family outdated PC a full scan in realtime of bluesky with some python code. And then later : - AppViews are actual "application backends". Bluesky operates the bsky.app appview, i.e. what people know as the Bluesky app. Importantly, in ATProto, there is no reason for everyone to run their own AppView. You can run one (and it costs about $300/mo to run a Bluesky AppView ingesting all data currently on the network in real time if you want to do that).
Ready to level up your Python code optimization skills? In this quiz, you'll revisit key concepts about profiling, benchmarking, and diagnosing performance bottlenecks. You'll practice with tools like cProfile and timeit, and see how deterministic and statistical profilers differ.