An Overview Of Python

Introduction



Figure 1:
Python

Python is a high level, open source general purpose, object-oriented, interpreted and interactive language. Python supports multiple programming paradigm such as object-oriented, functional programming and procedural style. It is an interpreted language, so we don’t require code compilation. It also supports large number of libraries that makes it more functional and provides automatic memory management.

History of Python

Python developed by Guido van Rossum in late eighty and early nineties. Python is developed from many other language such as C , C++ , Algol-68, SmallTalk and Unix shell. It is copyrighted and the source code available under the GNU General Public License (GPL).

Features of Python

Python contain many advantages over other language. Now I will tell you several features of Python and explain how Python is the best programming language.

Easy to Learn

We are all familiar with C and C++ language. Syntax and structure of Python are similar to C and C++ language. Python has few keywords, clear define structure and keywords. So these properties make Python easy to learn and understand. Programs written in Python are much shorter than any other programming language such as C, C++ and java.

Supports broad library

Python supports broad standard libraries. These libraries are portable and cross platform compatible on Windows, Unix and Macintosh.

Automatic Garbage Collector

Python contains automatic garbage collector, so programmer do not require to worry about memory wastage or memory leakage; garbage collector handles it automatically.

Portable

Python is a portable language. It can run on various hardware platforms, operation systems and provide same interface.

Multiple Programming Paradigm

Python supports object-oriented, functional and procedural programming paradigm that makes it a more powerful language.

Reusability

In python we can divide or split our code in several modules and can be used later in other programs.

Interpreted

Python is an interpreted language. It doesn’t use compiler, instead of this Python uses interpreter. Now I will explain how interpreter differs from compiler.


Figure 2: Compiler

Compiler first convert the source code to intermediate form or target program. If the target program is an executable machine language program, it can be called by the user to process inputs and produce outputs. Compilation process also requires assembler and linker.

Figure 3: Interpreter

Interpreter directly execute the operation specified in the source program on input supplied by the user and generate output.

Python is an interpreted language, so it saves our considerable time during program development because now we don't need any type for compilation and linking.

Open-Source

Python is an open source, so we can read it’s source code and make changes in it.

Easy integration

Python can be easily integrated with any other programming language such as C,C++ , Java and C#.

Extendable

Low level language can easily add to Python interpreter to increase the functionality of Python code.

Dynamic Type Checking

Python provide high level dynamic data type and also provide dynamic type checking.

Advantage and Disadvantages of Python

No language is 100 percent perfect, each language have some cons, so now we consider some advantages and disadvantages of Python.

Advantages

Open Source: Python is open source and freely available.

Need Less Code: Python works with very little code the way most common “use cases” require, reserving lengthy explicit coding for outliers and exceptions.

Multiparadigm: Python support multiple programming paradigm, modules and reusability of code.

Internet of things opportunities: Raspberry Pi platform available for Python to connect with real world (IOT’s).

Asynchronous Coding: Python support asynchronous coding, so Python is easy to code without confusing about deadlock and resource contention.

Disadvantages

Slow Speed: Python is a interpreted language, so sometimes it becomes slower than compiled language.

Database Access Limitation: Python’s database access layer seems a bit primitive and underdeveloped compared to other technologies such as JDBC and ODBS, you don’t need to worry it is changing.

Design Restriction: Python is dynamically typed, it requires more testing and has errors that only show up at runtime.

Absence of Mobile Computing: Python is mainly worked for server and desktop platform but it does not work for mobile development. There are very few mobile applications that are developed on Python.

Installation Python on Window

Now I will explain how to install Python on windows in some simple steps.

Step 1

Firstly, go to Python’s official website and download Windows x86 MSI installer Software.

You can use the following link: Python



Figure 4: Download

Step 2

After successful download the software will now run .MSI file.



Figure 5: Successful download

Step 3

Specify installation location.



Figure 6: Installation location

Step 4

Now go to “Add python.exe to Path” option and select “Will be installed on local hard drive” option and press “Next.”



Figure 7: Add python

Step 5

Now installation process will start. Python installS Pip management tool that allow us to install other Python packages.



Figure 8: Installation Process

After successful completion of installation click finish button.

Step 6

Now we add Python to System Path Variable. If you are using a higher version of Python then you don't required to set a  Path. Because path is automatically saved during installation process. But if you are using a earlier version like 2.7 then you must set the path. But it is better to set a alternative path. For this go to “System Properties” and select “Environment Variables” option.



Figure 9: System Properties

Step 7

Now select New option from System Variables to create a new variable. Now a window will pop up. In this window we will find two option: Firstly, one is Variable name, to provide name of path you can provide any name.
Second option is Variable value. Copy the following string and paste in Variable value option “C:\Python34\;C:\Python34\Scripts;” . Here version of my Python software is 3.4. So replace 3.4 with your Python version. Like if your Python version is 2.7 then use following string “C:\Python27\;C:\Python27\Scripts;”


Figure 10: Variable Value

After that press OK and complete the process. After successful completion of installation and path setting, now we are ready to run Python and start programming.

Now you can start Python either in Command line or in GUI mode.

Command Line Mode

Press “Window+R” and run “Python” .



Figure 11: Run

Now a command line mode of python will start and you can start your programming



Figure 12: Command

GUI Mode

To start the GUI mode press “Start” and type “Python” and select “IDLE(Python 3.4 GUI)” option.



Figure 13: StartGUI

Now a GUI mode of Python will open.


Figure 14: GUIMode

Python installed successfully, now you can start programming.

After a brief discussion about feature, advantages and disadvantages of Python I can say that Python is a powerful language and similar to C and C++. So if a person has basic knowledge of C and C++, then he can easily learn Python.

Up Next
    Ebook Download
    View all
    Learn
    View all