It’s finally happened, after years of complaining and told “it will never happen”, I got my darn switch statement! And honestly, calling it only a “switch” statement is really underselling it. It’s much more powerful than most people will ever use! You might have already heard...
Continue reading...coding
Keep Windows from going to sleep, no power settings needed!
Say you have a long running process that you let go overnight, only to come back the next morning and realize “Oh no, only an hour into it, my computer went to sleep!”. Thanks to some Windows internals, it’s possible to make it realize there is...
Continue reading...ThreadPools explained – In the deep end
Thread and Multiprocessing Pools are an underused feature of Python. In my opinion, they are the easiest way to dip your feet into concurrency, and yet still the method I use most often. They allow you to easily offload CPU or I/O bound tasks to a...
Continue reading...Is it easier to ask for forgiveness in Python?
Is Python more suited for EAFP or LBYL coding styles? It has been debated across message boards, email chains, stackoverflow, twitter and workplaces. It’s not as heated as some other battles; like how spaces are better than tabs, or that nano is indisputably the best terminal...
Continue reading...