This week we welcome Amber Brown (@hawkieowl) as our PyDev of the Week. Amber is one of the core developers of the Twisted package. She has a fun little twisted blog that you might enjoy checking out. You can also see what Amber's been up to by checking out her Github profile. She has also […]
Redirecting stdout to something most developers will need to do at some point or other. It can be useful to redirect stdout to a file or to a file-like object. I have also redirected stdout to a text control in some of my desktop GUI projects. In this article we will look at the following: […]
Earlier this year or late 2015, Packt Publishing asked me to be technical reviewer for a book called "Modular Programming with Python" by Erik Westra. It sounded really interesting and it ended up being one of the best books I've read from Packt. Note that I am the sole technical reviewer of the book. I'm […]
This week we welcome Georg Brandl (@birkenfeld) as our PyDev of the Week. Georg is a core developer of the Python language and has been for over 10 years. He is also a part of the Pocoo team. You can see what projects get him excited by checking out his Github profile. Let's take a […]
Descriptors were introduced to Python way back in version 2.2. They provide the developer with the ability to add managed attributes to objects. The methods needed to create a descriptor are __get__, __set__ and __delete__. If you define any of these methods, then you have created a descriptor. The idea behind the descriptor is to […]
The other day, I decided I wanted to create a decorator to catch exceptions and log them. I found a rather complex example on Github that I used for some ideas on how to approach this task and came up with the following: # exception_decor.py import functools import logging def create_logger(): """ Creates a logging […]