Threads are independent tasks that run concurrently and unhandled exceptions in threads can lead to unexpected behavior and a crash of the application. The default behaviour of exceptions in a thread is different when compared to the exceptions in the…
Search results for: ""
In any web application, user experience is very crucial. One aspect of this is redirecting the users back to the page they were previously viewing after they log in. For example, When users log in, especially if prompted to do…
The error ImportError: No module named Crypto.Cipher typically occurs when Python cannot find the Crypto.Cipher module. This module is a part of the PyCryptodome library. Install the pycryptodome Install the pycryptodome using the following command. You can install it using…
When working with multiple threads we need to ensure that the main program waits until all spawned threads have completed their tasks. In this article, we will see how to ensure all threads are finished before the main program terminates….
A Docker container is an isolated environment created from a Docker image. It is a lightweight, standalone, executable package that includes everything needed to run an application. In this article, we will see how to automatically start a service when…
Python doesn’t support key press detection by default in its standard library. However, we can use some of the third-party libraries such as pynput and keyboard to do that. Using pynput Library Using the Pynput library we can control and…
Subplots are used to plot multiple plots in a single figure. In Python’s Matplotlib, subplots are used comparative data visualization. Each subplot operates independently, but they share the same figure canvas. By default, Matplotlib leaves some amount of space between…
In XML, Namespaces are used to avoid name conflicts by qualifying the names of elements and attributes in an XML document. They are defined using the xmlns attribute in the start tag of an element and usually looks like URLs…
In Python, we use asyncio library for writing the concurrent code by using the aysnc/await syntax. However, while performing the HTTP requests asynchronously, the requests library does not support asyncio by default. In this article, we will see how to…
In Python, It is common that we access elements in a list by their index. But sometimes, the element which we are trying to access is not present, it may lead to IndexError. In this article, we will see how…