Today, I have finished the implementation of a new open-source bencoding library. It is named cpp-bencoding and written in C++11. In the present blog post, I would like to briefly introduce it.
Read More
Author: Petr Zemek
Unit-Testing With unittest.mock.patch()
Sometimes, you need to unit-test functions that call functions from the standard library that rely on side effects. In this post, I show a way of doing so in Python with unittest.mock.patch()
. More specifically, we implement two context managers that use os.chdir()
to perform actions in the given directory, and show a way of unit-testing them without relying on the file system.
Read More
Restarting a Python Script Within Itself
Sometimes, you may wish to check within a script when a configuration file or the script itself changes, and if so, then automatically restart the script. In this post, you will see a way of doing this in Python.
Read More
Welcome To My Blog!
My name is Petr Zemek and I am a software developer and researcher from Brno, Czech Republic. I am currently finishing my Ph.D. studies at the Faculty of Information Technology, Brno University of Technology (FIT BUT). Since I will loose access rights to my student web page after I receive my Ph.D., I have decided to create a brand new website and blog that I can use after my studies are done. In this post, I would like to briefly introduce you to the new website and blog.
Read More