Blog

Using namedtuple as a poorman's parser

I needed to parse the routing tables, therefore I needed to parse the command route which gives an output similar to something like this. Kernel IP routing tableDestination Gateway Genmask Flags Me...

Save time creating classmethods using a metaclass

I was wrapping a client rpc which was calling functions on a server rpc. The code looked like this. class RpcClient(object): def rpc_list_users(self,*args,**kwArgs): result = self.call("rpc_list_users&...

Injecting XMLHttpRequests into python selenium

When scraping websites using a headless browser, if it is possible to call the XMLHttpRequest call using Selenium Requests which is an extension of Selenium-Requests. The Selenium Requests Library works by creating a ...

Controlling docker containers with python rpyc

In the post I am going to talk about controlling docker container with the python module rpyc. The main reason you will want to do this is to control multiple processes each running in an isolated virtual machine. I w...