Python – Page 3 – POFTUT

Category: Python

0

“pip command not found” Error Solution Pip and Pip3 For Linux, Debian, Ubuntu, CentOS, Mint

Linux and Opensource world mainly uses package management software for installing, updating and removing software. Python is using pip or pip3 for Python package management. pip is Python2 package manager where pip3 is Python3 package manager. “pip command not found” Problem We will get an error like pip command not found when we try to run pip  or pip3 like below.

OR

Install pip Package For Python2 In Ubuntu, Debian, Mint, Kali We will...

0

Python Not Boolean Operator Tutorial

Python provides wide range of the logical operators. One type of logical operator is boolean operators where we can check the similarity or equality of the given data or variables. In this tutorial we will examine the not Boolean operator which can be used inequality of the provided values or data. Check If Not Equal We will start with a simple example where we will check whether given variable age is 10 ....

0

How To Run and Use Simple HTTP Server In Python2 and Python3?

Python provides different HTTP and related modules in builtin and 3rd party modules. Python also provides some basic HTTP server modules native. In this tutorial we will learn how to run HTTP server in Python2 and Python3. SimpleHTTPServer In Python2 From Commandline We will use SimpleHTTPServer module for Python2. We will just provide the module name the port number we want to run HTTP server from commandline. In this example...

0

How To Sort List In Python Programming Language?

Python provides lists structures in order to hold multiple elements in a single variable like an array. Generally same type of data is hold in this elements and we may want to sort them for value or key, incremental or decrementally. In this tutorial we will examine sorting Python List structure in different ways. Example Python List Before starting examples with sort operation we will create a simple list like below....

0

How To Copy and Move File with Python shutil Module?

Python provides different modules for copying and moving files. In this tutorial we will learn how to copy, move and operate recursively files with Python shutil Module. Copy Directories and Folders Recursively with copytree() Function We will start by copying source path directories and folders to the destination path recursively. Recursively means copying all current level and sublevel files and folders. We will use copytree() function which will get two parameters where...

0

How To Check Python Version?

Python is dynamic scriptin language which provides rich features. Python have two main version named Python version 2 and version 3. We can call them simply Python2 or Python3 . In this tutorial we will learn how yo check Python version or a script version. Default Python Version Every Python installation have a default version even there is two version of Python. If we can python command and enter to the...

1

Python Glob() Function To Match Path, Directory, File Names with Examples

glob is a general term used to define techniques to match specified pattern according to rules related Unix shell. Linux and Unix systems and shells also supports glob and also provide function glob() in system libraries. In this tutorial we will look glob() function usage in Python programming language. Import Glob Module In order to use glob() and related functions we need to import the glob module. Keep in mind that glob module contains glob() and other...

2

Shell Scripting Languages Examples, Bash, Sh, Python, Powershell, MSDOS, PHP, Tcl, Perl

A scripting language is a programming language supports writing simply to medium level applications in operating systems like Linux, Ubuntu, Debian, CentOS, Windows, MacOS, BSD, Unix. Scripting languages can be used to run complex tasks automatically or manually with very little effort. We can describe actions in a scripting language and run them easily. In this tutorial, we will look at popular scripting languages used by different operating systems and...

0

How Enumerate In Python Programming Language?

Python provides easy to use functions and mechanisms for programmers. While dealing with collection or list types we generally need some way to enumerate them. enumerate() function is used to create an iterable or enumerable type from the given list or collection. After this operation, we can use created object to iterate with for or while structures. Simply Enumerate We will start with a simple enumerate example. We will provide a list...

0

What Is Linux, Unix Socket?

Socket is a mechanism which provides connection between two process or system by using network stacks. In a more clear way we can use sockets communicate and transfer data between two system. As we know Unix and Linux systems works on file logic. Everything in operating system is file where network connections are files too. Use Cases Sockets can be used in different cases. We can use socket to transfer data...

Enjoy this blog? Please spread the word :)