Python Features - Features of Python - Python Tutorial
- Python is a simple and minimalistic language. Reading a good Python program feels almost like reading English (but very strict English!).
- This pseudo-code nature of Python is one of its greatest strengths.
- It allows you to concentrate on the solution to the problem rather than the syntax i.e. the language itself.
- There are a lot of features provided by python programming language.
Easy to Use:
- Python is easy to very easy to use and high level language.
- Thus it is programmer-friendly language.
- As you will see, Python is extremely easy to get started with. Python has an extraordinarily simple syntax as already mentioned.
- Python language is more expressive. The sense of expressive is the code is easily understandable.
- Python is an interpreted language i.e. interpreter executes the code line by line at a time. This makes debugging easy and thus suitable for beginners.
- Python can run equally on different platforms such as Windows, Linux, Unix , Macintosh etc. Thus, Python is a portable language.
Free and Open Source:
- Python language is freely available(www.python.org).The source-code is also available. Therefore it is open source.
- Python is an example of a FLOSS (Free/Libre and Open Source Software).
- In simple terms, you can freely distribute copies of this software, read the software's source code, make changes to it, use pieces of it in new free programs, and that you know you can do these things.
- FLOSS is based on the concept of a community which shares knowledge.
- This is one of the reasons why Python is so good - it has been created and improved by a community who just want to see a better Python
- Python supports object oriented language. Concept of classes and objects comes into existence.
- Python supports procedure-oriented programming as well as object-oriented programming. In procedure-oriented languages, the program is built around procedures or functions which are nothing but reusable pieces of programs.
- In object-oriented languages, the program is built around objects which combine data and functionality.
- Python has a very powerful but simple way of doing object-oriented programming, especially, when compared to languages like C++ or Java.
Large Standard Library:
- Python has a large and broad library.
- Graphical user interfaces can be developed using Python.
- It can be easily integrated with languages like C, C++, JAVA etc.
- When you write programs in Python, you never need to bother about low-level details such as managing the memory used by your program.
- Due to its open-source nature, Python has been ported (i.e. changed to make it work on) to many many platforms.
- All your Python programs will work on any of these platforms without requiring any changes at all.
- However, you must be careful enough to avoid any system-dependent features.
- You can use Python on Linux, Windows, Macintosh, Solaris, OS/2, Amiga, AROS, AS/400, BeOS, OS/390, z/OS, Palm OS, QNX, VMS, Psion, Acorn RISC OS, VxWorks, PlayStation, Sharp Zaurus, Windows CE and PocketPC !
- This requires a little explanation.
- A program written in a compiled language like C or C++ is translated from the source language i.e. C/C++ into a language spoken by your computer (binary code i.e. 0s and 1s) using a compiler with various flags and options.
- When you run the program, the linker/loader software just stores the binary code in the computer's memory and starts executing from the first instruction in the program.
- When you use an interpreted language like Python, there is no separate compilation and execution steps.
- You just run the program from the source code.
- Internally, Python converts the source code into an intermediate form called bytecodes and then translates this into the native language of your specific computer and then runs it.
- All this makes using Python so much easier.
- You just run your programs - you never have to worry about linking and loading with libraries, etc.
- They are also more portable this way because you can just copy your Python program into another system of any kind and it just works!
- You can embed Python within your C/C++ program to give scripting capabilities for your program's users.
- The Python Standard Library is huge indeed.
- It can help you do various things involving regular expressions, documentation generation, unit testing, threading, databases, web browsers, CGI, ftp, email, XML, XML-RPC, HTML , WAV files, cryptography, GUI(graphical user interfaces) using Tk, and also other system-dependent stuff.
- Remember, all this is always available wherever Python is installed.
- This is called the "batteries included" philosophy of Python.