Month: May 2021

Python – How to fill Excel cell with image, using python

If you have ever dreamed that it will be possible to fill out an Excel cell with a picture, using Python, then you should probably reevaluate your dreams. Seriously, who dreams of something like that? Without further dreaming, the code

Python – Logging in Python. Formatting with Black

Logging in Python is beautifully implemented with the logging library – https://docs.python.org/3/howto/logging.html It simply does anything you need and you do not need to write something yourself, like I did some time ago here in my VBA Boilerplate. So, if

Tagged with: , , ,

Python – Multisets – A class to count the elements of a set

Ok, so you probably have heard about set in Python – it is a collection with non-repeatable elements – as if you are a stamp collector and you need to collect only the unique stamps into your album. However, in

Tagged with: , ,

Python – Writing a Logger in Python with a decorator

Functions in Python are objects. If this is the first time you read this sentence, then you will not get a lot from this article, but it will show you, that there is quite a lot to learn about Python.

Tagged with: , ,

Python – DefaultDict Object. Or how to avoid the Key Error.

Have you seen the error below?

Of course you have. And you know, that it is because you have written something extremely unwise like this:

Yeah. You cannot increment the value of a non-existent key. Unless… Unless you

Tagged with: , ,
Top