Category: Python

How To Check Whether A File Exists Using Python?

Python programming language provides different ways to check file existence. In this tutorial we will examine functions like isFile() and exists() to check file existence. Import os.path Module In order to use isFile() and exists() functions we need to import the os.path module which contains these functions.

isFile() Method isfile() is a function in os.path library. This function will be return true if the

Continue reading

How To Find Python Version?

I want to run some python scripts but want to learn version of the python installed on the system. How can I do that? This works almost all operating systems from Windows to Linux, from Mac OS to Bsd. Get Version Of Default Python Interpreter We can get default python interpreter version like below. As we know that if the

Continue reading

How to Install Pip in Debian, Ubuntu, Kali, Mint

Pip is python package manager .Python packages and libraries can be installed in different ways to the system. We can also use the distribution provided package manager to install Python libraries. Python packages can be get  from pypi.python.org . How can we install pip in Debian, Ubuntu, Kali or similar dpkg, apt based distributions. “Command ‘pip’ not found, but can be installed

Continue reading

C# Programming Language Null Reference Exception and Solution

Null Reference Exception is one of the most occurring exception. Object oriented languages generally creates new object for the variables. But if it is not created and not set by the developer trying to access an variable object will cause Null Reference Exception. In this examples we will use Csharp programming language for Null Reference Exception. Raise Null Reference Exception We

Continue reading

Multiline Strings in Python

Python supports different type and format strings. In this tutorial we will simply look multi line strings. We have following code and want to type it in single expression in multi line. Joining Line By Line The most basic and simplest form is adding string lines step by step like below. We will use . in order to add strings

Continue reading

Pip ffi.h Gcc Error

pip is a tool used to install Python modules from a central python repository. While using pip command there may be some error like ffi.h gcc .This error will look like below.

Install libffi-dev This problem is related to the libffi libraries. If libffi development libraries are not installed we will get this error. To solve the issue install libffi-dev

Continue reading

Python String Variable Type

String is a type used to hold text data in Python programming language. We can hold name, surname, address, text or similar data in strings. There are different functions those can be used with these string data. In this tutorial we will look them in detail. Define String Variable Defining string is easy as just setting string value into a

Continue reading
Open

Enjoy this blog? Please spread the word :)