Introduction: List comprehension is a useful Python programming technique that enables you to create a list with minimal lines of code, within a single line of comprehension. List comprehension is useful when you want to create a list by iterating over an iterable object, such as a string or a list, and applying an expression …
python-paramiko
Introduction:Did you know that you can change the text color using Python script? In this tutorial, we’ll explore the different ways to change the terminal text color using Python script. There are multiple ways to change the terminal text color, but we’ll focus on one of the easiest and most common ways – using escape …
BLOGPOST#088 Adding Color to Your Terminal Output with Python: A Beginner’s Guide Read More »
Introduction: Python programming language offers a variety of useful built-in functions that help developers write efficient and concise code. One such function is enumerate(), which is used to iterate through a list or iterable and return the index and the element at that index in the form of a tuple.In this tutorial, we will explore …
BLOGPOST#084 # What is Enumerate in Python? Network Automation Tutorial Read More »
Introduction: Do you want to automate the process of Monitoring an interface using Python and receive notifications when the interface goes down? In this tutorial, we’ll see how to schedule Cisco interface parser function using Python Schedule Library.In the previous tutorial, we learned how to schedule a simple function that wrote the date and time …
BLOGPOST#083 Schedule Cisco Interface Parser Function using Python Schedule Library Read More »
Introduction: If you’re working on a Python project and need to maintain a log of command execution, then enabling logging in Python can be a great solution. In this tutorial, we’ll cover the steps to enable logging in Python, and how to redirect logs to different destinations using handlers and log levels. Logging levels in …
BLOGPOST#078 How to Enable Logging in Python? Network Automation Tutorial Read More »
Introduction: Python is a popular programming language used by developers across the world. One of the interesting features of Python is that it has both mutable and immutable objects. In this tutorial, we will see examples of mutable and immutable objects using strings and lists. What are Mutable and Immutable Objects? In Python, objects are …
BLOGPOST#057 Example of Mutable and Immutable Objects using String and List Read More »
Introduction: Object-oriented programming (OOP) is a popular programming paradigm used in many programming languages, including Python. OOP is based on the concept of objects, which are instances of classes that contain data, called attributes, and functions, called methods. In this tutorial, we will explore the basics of OOP in Python and how to create classes …
Introduction: In this tutorial, we’ll explore how to perform a live HTML file config comparison using the diff lib library in Python. This process is similar to the text file comparison we covered in a previous tutorial. The script we’ll be using is one that I previously explained when demonstrating sending config from a file. …
Introduction: In this blog post, we will explore regular expressions (regex) and how they can be used to parse cisco device configuration. We will start with the fundamentals and then look at real-time use cases of parsing Cisco device configuration using regex. We will also look at the default Python library available for regex matching …
BLOGPOST#031 What is RegEx and How we can we use for Parsing Device Configuration Read More »
Introduction: Python is a popular programming language known for its simplicity and ease of use. It provides built-in functions and libraries for performing various file operations. In this tutorial, we will see how to perform some of the basic file operations using Python. Get the Current Working Directory and List the Files: To get the …
BLOGPOST#021 How to Perform Basic File Operations in Python Read More »