Python 1.3 - Introduction to Python
About python
Python is a high
level general purpose programming language. It was developed by “Guido Van
Rossum” in the year 1991 at the Centre for Mathematics and Computer Science,
Netherlands. Actually Python’s development started around 1980 but it was
initially released for the world in 1991.
History - Guido Van Rossum was working on a programming
language called “ABC”. It was also a general purpose language with good
features. But Van Rossum found that ABC did not have Exception handling, which
was a very powerful and mandatory feature. So he decided to develop a new
programming language with exception handling. So he started developing python. Python
is superset/successor of ABC language. This was not the only reason but there were more. It was one
of them. One another reason is that Rossum was working on a project to develop
system utilities in ‘C’ programming language where he had to interact with the
Bourne shell available in Unix. He felt the necessity of developing a language
that would fill the gap between ‘C’ and The Shell. This has led to the creation
of Python.
Where we can use Python
There is no limit
for Python. Python is used in many popular areas such as web applications,
desktop applications, machine learning, artificial intelligence, data science
(handling large data), games etc. You have plenty of options available. Most
popular fields in Python are web development, machine learning, data science
and artificial intelligence. These are the popular companies which use Python
as main or support programming language - Google, Facebook, Instagram, Netflix,
YouTube and many more. Python has a very bright future.
Important (Must know)
Most of the people
think that Python is an interpreted language but it is half-truth. Actually
Python code is first compiled and then interpreted. So Python is a “compiled
interpreted” programming language. The compilation process is hidden from
programmers for the sake of simplicity. Python source code is internally
compiled into byte code and then, that byte code is interpreted by interpreter
and then we get the machine code.
For example, let’s
say we wrote our program in a file named “sample.py” and then we ran it. So
first, compilation will take place internally and the byte code (“sample.pyc”
file) will be created by the Compiler. This byte code will be executed by
Python Interpreter and it will create machine code for computer(processor).
Then the processor will execute the machine code and will give final result.
PVM (Python Virtual Machine)
We have discussed
about Interpreter. We know that interpreter converts the Byte code into machine
code. Actually the interpreter is found inside a program called “Python Virtual
Machine”. Since interpreter does the main job, hence PVM is called an Interpreter. Now
you can say that when Python code is compiled into Byte code then the Byte code
is given to PVM that contains an interpreter which converts the Byte code into
machine code. So in order to execute a Byte code on any machine in the world,
we just need a PVM installed on that machine.
Observe the image
below –
How was the name of this language “Python”?
Most of the people think that the name python was taken from the snake but it is absolutely wrong. Actually at that time, there was a comedy show called “Monty Python’s Flying Circus” and it was Van Rossum’s very favorite show. So Van Rossum picked the name ‘Python’ from the comedy show “Monty Python’s Flying Circus”.
Comments
Post a Comment