Pradeep Elance has Published 417 Articles

How to Create a Shared Directory for All Users in Linux?

Pradeep Elance

Pradeep Elance

Updated on 03-Nov-2023 03:46:34

38K+ Views

When multiple users need access to the same set of directories of files then we need to create shared folders to be used by the users. In Linux there is concept of users and groups which can be given certain level of permissions that will enable them to share the ... Read More

Python program to find the IP Address of the client

Pradeep Elance

Pradeep Elance

Updated on 25-Aug-2023 00:22:01

60K+ Views

In this tutorial, we are going to find the IP address of the client using the socket module in Python. Every laptop, mobile, tablet, etc.., have their unique IP address. We will find it by using the socket module. Let's see the steps to find out the IP address of a device.Algorithm ... Read More

Add a key value pair to dictionary in Python

Pradeep Elance

Pradeep Elance

Updated on 23-Aug-2023 13:10:11

68K+ Views

Python dictionaries are an unordered collection of key value pairs. In this tutorial we will see how we can add new key value pairs to an already defined dictionary. Below are the two approaches which we can use.Assigning a new key as subscriptWe add a new element to the dictionary ... Read More

Generating random number list in Python

Pradeep Elance

Pradeep Elance

Updated on 22-Aug-2023 00:49:42

174K+ Views

There is a need to generate random numbers when studying a model or behavior of a program for different range of values. Python can generate such random numbers by using the random module. In the below examples we will first see how to generate a single random number and then ... Read More

How to Copy File Permissions and Ownership to Another File in Linux?

Pradeep Elance

Pradeep Elance

Updated on 27-Jul-2023 13:29:22

1K+ Views

Many times while taking back up of data from one location to another or configuring software, we need to maintain the same level of ownership and permission of the files. Creating those permissions and granting ownership to individual files can be error prone of done by typing commands for each ... Read More

XML Processing Modules in Python

Pradeep Elance

Pradeep Elance

Updated on 25-Jan-2021 07:51:34

1K+ Views

XML stands for "Extensible Markup Language". It is mainly used in webpages, where the data has a specific structure. It has elements, defined by a beginning and an ending tag. A tag is a markup construct that begins with < and ends with >. The characters between the start-tag and ... Read More

XMLRPC server and client modules in Python

Pradeep Elance

Pradeep Elance

Updated on 25-Jan-2021 07:51:19

4K+ Views

We can create our own cross-platform, language-independent server using the XML-RPC protocol.We use the SimpleXMLRPCServer to create the SimpleXMLRPCServer instance and tell it to listen for incoming requests. Next we define some functions to be part of the service and register those functions so that the server knows how to ... Read More

The Null Object in Python

Pradeep Elance

Pradeep Elance

Updated on 25-Jan-2021 07:46:49

3K+ Views

Python does not have a null object. But the most closely related similar object is none. In this article, we will see how how None behaves in Python.Checking the type of Null and None we see that there is no Null Type and the None object is of type NoneType.Exampleprint(type(None)) ... Read More

Python Type Object

Pradeep Elance

Pradeep Elance

Updated on 25-Jan-2021 07:44:57

8K+ Views

Everything in Python is an object including classes. All classes are instances of a class called "type".The type object is also an instance of type class. You can inspect the inheritance hierarchy of class by examining the __bases__ attribute of a class object. type() method returns class type of the ... Read More

Python Code Objects

Pradeep Elance

Pradeep Elance

Updated on 25-Jan-2021 07:40:16

2K+ Views

Code objects are a low-level detail of the CPython implementation. Each one represents a chunk of executable code that hasn’t yet been bound into a function. Though code objects represent some piece of executable code, they are not, by themselves, directly callable. To execute a code object, you must use ... Read More

1 2 3 4 5 ... 42 Next
Advertisements