Dealing with communications across programs, processes or even threads can be a real pain in the patella. Each situation usually calls for something slightly different and has to work with a limited set of options. On top of that, a lot of tutorials I see are people...
Continue reading...code
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...Reusables – Part 2: Wrappers
Spice up your code with wrappers! In Python, a wrapper, also known as a decorator, is simply encapsulating a function within other functions. @wrapper def my_func(a, b=2): print(b) @meta_decorator(foo=”bar”) def my_other_func(**kwargs): print(kwargs) In Reusables, all the wrappers take arguments, aka meta decorators, so you will at...
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...First steps into GUI design with Kivy
Boring Background I have always had in interest in making a local photo organization tool, that supports albums and tagging the way I want to do it. Maybe down the line allowing others to connect and use it too. So I started on one a few...
Continue reading...