Programming Articles

Page 136 of 2547

How to create a bar chart and save in pptx using Python?

Mukul Latiyan
Mukul Latiyan
Updated on 27-Mar-2026 2K+ Views

Data visualization is an essential part of data analysis and communication, and Python offers many tools and libraries to create visually appealing and informative charts. Two such libraries are Plotly and python-pptx. Plotly is a powerful library for creating interactive charts, including bar charts, while python-pptx is a library for working with PowerPoint presentations programmatically. Creating a bar chart using Plotly is straightforward — you can specify the data, chart type, and layout, and Plotly will generate a high-quality chart that can be easily customized. Once created, you can save it as an image file and embed it into ...

Read More

How to Create a Backup of a SQLite Database Using Python?

Mukul Latiyan
Mukul Latiyan
Updated on 27-Mar-2026 3K+ Views

SQLite is a popular lightweight and serverless database management system used in many applications. It is known for its ease of use, small footprint, and portability. However, just like any other database, it is important to have a backup of your SQLite database to protect against data loss. Python provides built-in support for SQLite through the sqlite3 module, making it easy to create database backups. In this tutorial, we will explore how to create a backup of a SQLite database using Python's iterdump() method. Prerequisites Before starting, ensure SQLite3 is installed on your system. You can check ...

Read More

How to Package and Deploy CLI Applications With Python

Harshit Sachan
Harshit Sachan
Updated on 27-Mar-2026 4K+ Views

Based on the interface we have two types of applications: CLI (Command Line Interface) applications and GUI (Graphical User Interface) applications. A command line application or console application is one which can be accessed from a shell or command line through a text interface. These accept inputs from the user in text format, unlike GUI applications which provide a graphical interface containing buttons, text boxes and icons. Python is a popular programming language for developing CLI applications. Let's explore the complete process of packaging and deploying CLI applications with Python using built-in and external tools. Step 1: ...

Read More

Command Line File Downloader in Python

Harshit Sachan
Harshit Sachan
Updated on 27-Mar-2026 832 Views

Python provides powerful libraries for creating command line applications. A command line file downloader allows you to download files from the internet directly through your terminal without using a browser. This tutorial shows how to build a simple file downloader using Python's requests and argparse libraries. The application accepts a URL and filename as command line arguments and downloads the file to your local system. Required Libraries We need two Python libraries for this project: requests − For making HTTP requests to download files argparse − For handling command line arguments Install the ...

Read More

Connect new point to the previous point on a image with a straight line in OpenCV-Python

Harshit Sachan
Harshit Sachan
Updated on 27-Mar-2026 1K+ Views

In OpenCV-Python, we can draw lines between points on an image to create paths, track movements, or create interactive drawing applications. This is particularly useful for computer vision applications where user interaction is required. OpenCV (Open Source Computer Vision Library) provides powerful functions for image manipulation and computer vision tasks. In this article, we will learn how to connect mouse-clicked points on an image with straight lines using OpenCV-Python. Understanding the cv2.line() Function To draw a straight line between two points, OpenCV provides the cv2.line() function with the following syntax: cv2.line(image, start_point, end_point, color, thickness) ...

Read More

Convert BGR and RGB with Python and OpenCV

Harshit Sachan
Harshit Sachan
Updated on 27-Mar-2026 13K+ Views

OpenCV is a library of programming functions primarily for real-time computer vision. The library is cross-platform and licensed as free and open source software under the Apache License. It is written in C++ and has Python bindings that make it easy to use in Python applications. In this article, we will learn how to convert between BGR and RGB color formats using Python and OpenCV. Before proceeding, let's understand what BGR and RGB are and why conversion is necessary. What are BGR and RGB? RGB and BGR are both color models used to represent colors in digital ...

Read More

How to Package a Command Line Python Script

Harshit Sachan
Harshit Sachan
Updated on 27-Mar-2026 3K+ Views

Python is a powerful programming language widely used for creating various applications, including command-line interface (CLI) scripts that automate tasks. To share these scripts with others, you need to package and distribute them properly. This article will guide you through the complete process of packaging a Python command-line script, making it easy to distribute and install. Step 1: Create a Virtual Environment First, create an isolated environment for your project to manage dependencies effectively ? python -m venv myproject_env Activate the virtual environment ? # On Windows myproject_env\Scripts\activate # On ...

Read More

Command Line Scripts - Python Packaging

Harshit Sachan
Harshit Sachan
Updated on 27-Mar-2026 441 Views

Python command line interface (CLI) scripts are programs that perform specific tasks when executed from the command line. These scripts help automate repetitive tasks and can be packaged for easy distribution to other developers. This article covers the complete process of creating, packaging, and distributing Python CLI scripts. Creating the CLI Script First, let's create a simple CLI script that accepts command line arguments using the argparse library ? import argparse def greet(name): print(f"Hello, {name}!") def main(): parser = argparse.ArgumentParser(description="A simple greeting CLI tool") ...

Read More

Create a GUI to Get Sunset and Sunrise Time using Python

Tamoghna Das
Tamoghna Das
Updated on 27-Mar-2026 745 Views

In this tutorial, we'll create a GUI application using Python's Tkinter library to display sunrise and sunset times for any location. We'll use the astral library to calculate astronomical data based on geographic coordinates. Prerequisites Before starting, ensure you have: Python 3.x installed − Tkinter comes bundled with Python Astral library − Install using: pip install astral Basic Python knowledge − Functions, classes, and GUI concepts Installing Required Libraries The astral library provides astronomical calculations for sunrise, sunset, and twilight times − pip install astral Importing Required Modules ...

Read More

Create a GUI to Extract Lyrics from a song using Python

Tamoghna Das
Tamoghna Das
Updated on 27-Mar-2026 1K+ Views

Lyrics are the words that are sung in a song that conveys the meaning and emotions of a song. Python offers several libraries to extract lyrics from a song. In this tutorial, we will create a Graphical User Interface (GUI) using Python's tkinter library that extracts lyrics from a song. Prerequisites Before we dive into the details of creating a GUI, you should have a basic understanding of Python programming, object-oriented programming (OOP) concepts, and how to work with the Tkinter module. Required installations and setup − Install required libraries: pip install lyricsgenius (tkinter comes ...

Read More
Showing 1351–1360 of 25,469 articles
« Prev 1 134 135 136 137 138 2547 Next »
Advertisements