python – Page 2 – POFTUT

What Is Socket In Linux?

What Is Socket In Linux?

The socket is a mechanism that provides a connection between the two-processor system by using network stacks. In a more clear way, we can use sockets to communicate and transfer data between two systems. As we know Unix and Linux systems work on file logic. Everything in the operating system is a file where network connections … Read more

How To Install Python Pip For Linux?

Python provides a tool named pip in order to install python modules. Most of the python applications use pip in order to install dependencies. In order to use pip we should install it.  In this tutorial, we will look at how to install pip  for Python 2 and Python 3. Install For Python 2 On Ubuntu, … Read more

How To Download, Install, and Use Python Idle Editor?

How To Download, Install, and Use Python Idle Editor?

Python is a popular programming language used by a lot of people from different professions. Python is a scripting language supported by different platforms and operating systems like Windows, Linux, MacOS, BSD, etc. Developing and running python can be done in different ways but in a practical way, we generally need some editor. Python Idle … Read more

How To Delete and Remove File and Directory with Python?

Python provides different methods and functions in order to remove files and directories. As python provides a  lot of functionalities we can remove files and directories according to our needs. For example, we can remove files those sizes are bigger than 1 MB. Check If File or Directory Exist Before removing a file or directory … Read more

How To Get Input From Keyboard with Python raw_input with Examples

Python provides different functions and methods in order to get input from user, system, network etc. raw_inputis a method used to get input from user from interactive shell. We will look different use cases for raw_input for python. Syntax The syntax of the raw_input changes according to python version. We will look for both of … Read more

How To Get Current Date Time with Now() Function In Python?

How To Get Current Date Time with Now() Function In Python?

Date and time is an important part of application development. We generally need to set, get, and change some data time information to our records. In this tutorial, we will examine the python date time now functions and use cases with examples. For more information about Python date-time functions can be get from the following … Read more

How To Control Python For Loop with Break Statement?

How To Control Python For Loop with Break Statement?

Python provides for loops in order to iterate over the given list, dictionary, array, or similar iterable types. During iteration, we may need to break and exit from the loop according to the current condition. In this tutorial, we will look at how to break a python for loop with break statement with different examples. Break Syntax break statement … Read more

How To Loop and Iterate Over Python Dictionary?

How To Loop and Iterate Over Python Dictionary?

Dictionaries provide simple data types with value and key. Dictionary data may be used in an iteration with for loop. By using for mechanism we can iterate over dictionary elements easily. In this tutorial, we will look at different ways to iterate over dictionary elements. Example Dictionary We will use following dictionary type named mydict in this … Read more

How To Install and Use OpenSSL Library In Python Applications?

OpenSSL is popular security library used by a lot of products, applications, vendors. OpenSSL provides libraries for the most of the programming languages. Python is popular programming language too. We can use OpenSSL library in Python applications. In this tutorial we will develop an example application that uses OpenSSL Python Library and bindings. Install OpenSSL … Read more

Memcached Increment and Decrement Operations with Python Example

As we see before we have done Set CAS operation to increment counter key value. Here is a operator to increment and decrement values directly. incr key incrementvalue incr  is the operation key is the key we want to increment incrementvalue the value we want to increment Example Let’s do simple example add counter 0 0 3 … Read more