Get Application Version Using Python

Dev Prakash Sharma
Updated on 21-Apr-2021 07:42:48

2K+ Views

In software industries, whenever developers add a new feature, fix bugs in a particular application, they name the application to a new version, as it helps to recognize the recently updated features in that application.Using Python, we can get the version of any application. We will use pywin32 to interact with the executable files. It provides access to the win32 API which gives the ability to create COM and objects.First, install the required package by typing pip install pywin32 in the command shell.Import Dispatch to get the version number of the application.Create a variable to store the location of the ... Read More

Disable Exit or Close in Tkinter Window

Dev Prakash Sharma
Updated on 21-Apr-2021 07:41:25

9K+ Views

The window manager implements the Tkinter window control icons. To hide and show the Tkinter window control icons, we can use the built-in function, which describes whether we want to disable control icons’ functionality.To disable the Exit or [X] control icon, we have to define the protocol() method. We can limit the control icon definition by specifying an empty function for disabling the state of the control icon.Example#Import the tkinter library from tkinter import * from tkinter import ttk #Create an instance of Tkinter frame win= Tk() #Define the geometry of the function win.geometry("750x250") def close_win():    win.destroy() def disable_event(): ... Read More

Difference Between Website and Blog

AmitDiwan
Updated on 21-Apr-2021 07:38:21

308 Views

In this post, we will understand the difference between a website and a blog −WebsiteIt is a collection of webpages and multimedia content.This is made available under one domain on the World Wide Web.The websites are usually hosted using a web hosting service.This allows the web pages and the content of the website to be accessed by people all over the world.It can be an internal site that could be accessed through a secure local area network.The fundamental unit of a website is content.It doesn’t have any kind of order.Commenting on a website is not possible all the time.There are ... Read More

Creating a Prompt Dialog Box Using Tkinter

Dev Prakash Sharma
Updated on 21-Apr-2021 07:34:02

2K+ Views

Dialog Boxes are handy for informing users to perform certain operations. We are already familiar with the dialog boxes and interacted with them many times. In a particular Tkinter application, we can create any type of dialog boxes, such as Message, User Interaction Dialogs, Single Value Entry Dialogs, File chooser, etc. To create dialog boxes, Tkinter has several built-in packages like a messagebox, simpledialog, filedialog, and colorchooser.ExampleIn this example, we will create a message box to inform the user to choose an option.#Import the tkinter library from tkinter import * from tkinter import messagebox #Create an instance of Tkinter frame ... Read More

Convert PDF to CSV Using Python

Dev Prakash Sharma
Updated on 21-Apr-2021 07:33:41

17K+ Views

Python is well known for its huge library of packages. With the help of libraries, we will see how to convert a PDF to a CSV file. A CSV file is nothing but a collection of data, framed along with a set of rows and columns. There are various packages available in the Python library to convert PDF to CSV, but we will use the Tabula-py module. The major part of tabula-py is written in Java that first reads the PDF document and converts the Python DataFrame into a JSON object.In order to work with tabula-py, we must have Java ... Read More

Difference Between Hypertext and Hypermedia

AmitDiwan
Updated on 21-Apr-2021 07:33:28

6K+ Views

In this post, we will understand the difference between hypertext and hypermedia −HypertextIt refers to the system of managing the information related to the plain text.It involves only text.It becomes a part of the link.It is the part of hypermedia.It allows the user to traverse through text in a non-linear fashion.It allows users to move from one document to another in a single click.The user can click on the hypertext or the ‘goto’ links.It helps the user move to the next document.It also helps the user move from one page of a document to the other page.It doesn’t provide a ... Read More

Convert Images to PDFs Using Tkinter

Dev Prakash Sharma
Updated on 21-Apr-2021 07:33:13

647 Views

Python is a scripting language and thus, it helps in many ways to create file converters such as CSV to PDF, PDF to DOC, and vice-versa. With the help of certain libraries, we can also create an application that converts images into PDF. To create such an application, we use the img2pdf module in Python. It helps to parse the image binary and converts it into PDFs.We will follow these steps to create an application, First, make sure the system has img2pdf requirements already in place. Type pip install img2pdf on your terminal to install the package. Import img2pdf in ... Read More

Changing TTK Button Height in Python

Dev Prakash Sharma
Updated on 21-Apr-2021 07:32:52

4K+ Views

Ttk adds styles to the tkinter’s standard widget which can be configured through different properties and functions. We can change the height of the ttk button by using the grid(options) method. This method contains various attributes and properties with some different options. If we want to resize the ttk button, we can specify the value of internal padding such as ipadx and ipady.ExampleLet us understand it with an example, #Import tkinter library from tkinter import * from tkinter import ttk #Create an instance of tkinter frame or window win = Tk() #Set the geometry of tkinter frame win.geometry("750x250") #Create a ... Read More

Counting Number of Triangle Sides in an Array in JavaScript

AmitDiwan
Updated on 21-Apr-2021 07:06:11

241 Views

ProblemWe are required to write a JavaScript function that takes in an array of numbers, arr, as the first and the only argument.The task of our function is to count the number of triplets chosen from the array that can make triangles if we take them as side lengths of a triangle.For example, if the input to the function is −const arr = [2, 2, 3, 4];Then the output should be −const output = 3;Output ExplanationValid combinations are:2, 3, 4 (using the first 2) 2, 3, 4 (using the second 2) 2, 2, 3ExampleFollowing is the code − Live Democonst arr ... Read More

Construct Array of Addition and Subtractions in JavaScript

AmitDiwan
Updated on 21-Apr-2021 07:01:55

163 Views

ProblemWe are required to write a JavaScript function that takes in an array of positive integers. Our function should map this array to an array of string integers.The array should contain the number we should add/subtract to the first element to achieve the corresponding element.For example[4, 3, 6, 2]should return −['+0', '-1', '+2', '-2']ExampleFollowing is the code − Live Democonst arr = [4, 3, 6, 2]; const buildRelative = (arr = []) => {    const res = [];    let num = '';    for(let i of arr){       if(i - arr[0] >= 0){         ... Read More

Advertisements