What could be better than regex? Of course TTP – Template Text Parser – Python module for parsing of semi-structured text data using templates. Installation: Here is...
Continue reading...Python
Web: Flask and Jinja2
Flask Flask a microframework written in Python that makes it easy to get a simple web application up and running with some features that can be...
Continue reading...Python: Processes and Threads
top – show all processes: Find the proccess: ps aux | head -1; ps aux | grep 1248 How to create a process in Python os.fork()...
Continue reading...Python Logging
I decided to take a look into Python Logging and start using it instead of print(). Everything is here: Logging HOWTO. Task you want to perform...
Continue reading...Python: Stealthwatch and Alarms API
It’s been a while since my last post. So many things going on, but I am still here:) Working with ISE Monitoring API I like an...
Continue reading...Jinja2 in Python – Render Config
Jinja2 is a full-featured template engine for Python. The first time I used it with Flask, it comes packaged with the powerful Jinja templating language. But...
Continue reading...Python: Iterators, Generators, and Coroutines
Iterator An iterator is an object that contains a countable number of values and consists of the methods __iter__ and __next__. __iter__: This method is called...
Continue reading...Python: Magic Methods, Context Manager
Magic methods __new__: Called to create a new instance of class cls. What is happening at the moment of class creation (like checking if there should...
Continue reading...Python: Files, Exceptions, and Errors
Files Opening files using the with statement is recommended because it ensures that the file is automatically closed at the ends of the with the statement....
Continue reading...Python: Class Inheritance and Compositions
Inheritance A Derived class inherits from a Base class and is a specialized version of Base. It allows defining a class that inherits all the methods...
Continue reading...