How to Change File Permissions in Python?

Problem Formulation and Solution Overview When a new file or folder is created, it comes with its own set of default permissions. From time to time, you will need to adjust these permissions. To follow this article, download the finxter.csv file and move this file to the current working directory. What are File Permissions? File … Read more

Convert CSV to Excel xlsx in Python

Problem Formulation πŸ’‘ Challenge: Given a CSV file. How to convert it to an excel file in Python? We create a folder with two files, the file csv_to_excel.py and my_file.csv. We want to convert the CSV file to an excel file so that after running the script csv_to_excel.py, we obtain the third file my_file.csv in … Read more

How to Search for Specific Files Only in Subdirectories in Python?

[toc] Problem Formulation: Let’s say we have a directory containing other subdirectories which further contain files. How do we search for a specific file in the subdirectories in our Python script? Scenario: We have a parent folder (Parent) with child folders (child_1, child_2, and child_3). There are files in the parent directory/folder as well as … Read more

Extract File Name From the Path, No Matter What the os/path Format

Summary: os.path.basename(path) enables us to get the file name from the path, no matter what the os/path format. Another workaround is to use the ntpath module, which is equivalent to os.path. ✨Problem: How to extract the filename from a path, no matter what the operating system or path format is? For example, let’s suppose that … Read more

Desktop Developer — Income and Opportunity

Before we learn about the money, let’s get this question out of the way: What Is a Desktop Developer? Let’s have a look at the definition first: A desktop developer is a software developer creating software applications for desktop-based operating systems like macOS, Windows, and Linux. In some cases, these applications don’t require an uninterrupted … Read more

How To Get The Filename Without The Extension From A Path In Python?

[toc] Problem Statement: How to get the filename without the extension from a path in Python? Example: Suppose you have a file with the following path: C:\Users\SHUBHAM SAYON\Documents\folder1 Here, we just need to get the filename, i.e. “demo“.  In Python, files are used to store information.  We can perform many operations on the files- read, write, … Read more

The Ultimate Guide to Installing Ghostscript

In this article we explore how to install Ghostscript on numerous different platforms and operating systems. What is Ghostcript? Why install it? What is Ghostscript, and why would we want to install it? To understand this we should first learn about Postscript. Postscript Postscript is a page description language geared towards desktop publishing documents. If … Read more

.NET Developer – Income and Opportunity

Before we learn about the money, let’s get this question out of the way: What Is .NET? Let’s have a look at the definition from the official .NET website: “.NET is a free, cross-platform, open source developer platform for building many different types of applications. With .NET, you can use multiple languages, editors, and libraries … Read more

VBA Developer Income and Opportunity

Annual Income How much does a VBA Developer make per year? The average annual income of a VBA Excel Developer is between $96,000 and $125,000 according to Salary.com (source): Let’s have a look at the hourly rate of VBA Developers next! Hourly Rate VBA Developers are well-paid on freelancing platforms such as Upwork or Fiverr. … Read more

Read from Stdin in Python

[toc] Problem Statement: Reading from stdin in Python. Reading inputs from the user is one of the fundamental building blocks that we learn while learning any programming language. The output of most codes depends on the user’s inputs. Hence, in this article, we are going to learn how to read from stdin in Python. There … Read more