Rajendra Dharmkar has Published 453 Articles

How to get the device major number from a raw device number using Python?

Rajendra Dharmkar

Rajendra Dharmkar

Updated on 20-Jul-2023 13:00:25

204 Views

Have you ever anytime wondered how the complex world of low-level system programming deals with the issue of device identification in Python? One essential item of data is the device major number; this plays a crucial role in identifying different devices in a system. In this article, we will set ... Read More

How to get the current open file line in Python?

Rajendra Dharmkar

Rajendra Dharmkar

Updated on 20-Jul-2023 12:59:02

2K+ Views

If a file is open in Python and you want to find the current line number of the open file; we explore different ways, in this article, how you can perform this task using certain modules, functions and methods. Along the way, we discuss some code examples with detailed explanations ... Read More

How to get stat of a file using Python?

Rajendra Dharmkar

Rajendra Dharmkar

Updated on 20-Jul-2023 12:29:48

567 Views

We have to realize that in the world of Python programming, obtaining file statistics plays a critical role in processing and manipulating files effectively. It does not matter if you are a novice or an experienced coder; this article will surely guide you through the process of retrieving file stats ... Read More

How to get a file system information using Python?

Rajendra Dharmkar

Rajendra Dharmkar

Updated on 20-Jul-2023 12:23:56

737 Views

Filesystem information, in Python, is defined as the attributes and metadata linked with a file or directory, such as its name, size, timestamps, permissions, ownership, and type. There are various modules in Python like os and os.path to work with the file system and fetch this information. Obtaining access to ... Read More

How to create a filesystem node using Python?

Rajendra Dharmkar

Rajendra Dharmkar

Updated on 17-Jul-2023 15:49:14

495 Views

In the realm of Python programming, a filesystem node holds significant prominence as it encompasses the essence of file and directory representation within the intricate file system. This construct acts as a means to interact with files and directories programmatically. Each node bears multiple attributes like names, sizes, permissions, and ... Read More

How to create and use a named pipe in Python?

Rajendra Dharmkar

Rajendra Dharmkar

Updated on 17-Jul-2023 15:38:14

8K+ Views

Consider a pipeline that allows for seamless data flow and communication between various components of a complex system. Named pipes are similar conduits in Python programming, making it easier for programs to communicate with each other and other processes. Named pipes, which are also referred to as FIFOs (First-In, First-Out), ... Read More

How to create a directory recursively using Python?

Rajendra Dharmkar

Rajendra Dharmkar

Updated on 17-Jul-2023 15:18:33

3K+ Views

In Python programming, operations on files and directories are routine tasks that you carry out daily and are a common requirement. Having a rich set of libraries and intuitive syntax, Python provides a simple and straightforward way to carry out such tasks. Here, in this article, we will explore and ... Read More

How to copy files to a new directory using Python?

Rajendra Dharmkar

Rajendra Dharmkar

Updated on 17-Jul-2023 15:00:33

5K+ Views

The act of copying files to a new directory is a basic skill that every developer in Python should invariably possess. Whether it is the process of backing up data, organizing files or creating a new project, there are powerful tools provided by Python to make file copying an easy ... Read More

How to concatenate two files into a new file using Python?

Rajendra Dharmkar

Rajendra Dharmkar

Updated on 17-Jul-2023 14:50:30

7K+ Views

In Python, concatenation is a process that refers to combining two or more strings, lists, or such sequence-like objects into a single object. The concatenation operation when performed is denoted by using the "+" operator. Concatenating two files into a single file can be a useful process when you ... Read More

How to Compose a Raw Device Number from the Major and Minor Device Numbers?

Rajendra Dharmkar

Rajendra Dharmkar

Updated on 17-Jul-2023 14:40:46

148 Views

In identifying and interacting with hardware devices, device numbers have a significant role in the domain of low-level systems programming. Every device or peripheral that is connected to a computer system is given or assigned a unique pair of numbers called the major and minor device numbers. You have to ... Read More

Advertisements