Sunday, February 27, 2011

why should we use python

1. Although no one language is the right choice for every possible situation, Python is a good choice for a large number of programming problems.

2. It’s a true cross-platform language, running equally well on Windows, Linux/UNIX, and Macintosh platforms, as well as others, ranging from supercomputers to cell phones.

3. It can be used to develop small applications and rapid prototypes, but it scales well to permit development of large programs.

4. It comes with a powerful and easy-to-use graphical user interface (GUI) toolkit, web programming libraries, and more. And it’s free.

5. Python is a very expressive language. Expressive in this context means that a single line of Python code can do more than a single line of code in most other languages.advantages is the fewer lines of code you have to write, the faster you can complete the project. the easier the program will be to maintain and debug.

6. Python is easy to use. Types are associated with objects, not variables.
Python typically operates at a much higher level of abstraction.  Syntax rules are very simple.


What Python doesn’t do as well :

1. Python doesn’t have the most libraries.
2. Python doesn’t check variable types at compile time.
         >>> x = “2”
>>> print(x)
'2'
>>> x = int(x)
>>> x = int(x)
2                                 (x is now integer 2)

3. Python is not the fastest language.

                         A possible drawback with Python is its speed of execution. It isn’t a fully compiled language. Instead, it’s first semicompiled to an internal byte-code form, which is then executed by a Python interpreter.

                  There are some tasks, such as string parsing using regular expressions, for which Python has efficient implementations and is as fast as, or faster than, any C program you’re likely to write. Nevertheless, most of the time, using Python results in slower programs than a language like C. But you should keep this in perspective. Modern computers have so much computing power that for the vast majority of applications, the speed of the program isn’t as important as the speed of development, and Python programs can typically be written much more quickly.

Python is a modern, high-level language, with many features:
  1. Dynamic typing
  2. Simple, consistent syntax and semantics
  3. Multiplatform
  4. Well-planned design and evolution of features
  5. Highly modular
  6. Suited for both rapid development and large-scale programming
  7. Reasonably fast and easily extended with C or C++ modules for higher speeds
  8. Easy access to various GUI toolkits
  9. Built-in advanced features such as persistent object storage, advanced hashtables, expandable class syntax, universal comparison functions, and so forth
  10. Powerful included libraries such as numeric processing, image manipulation, user interfaces, web scripting, and others
  11. Supported by a dynamic Python community
  12. Can be integrated with a number of other languages to let you take advantage of the strengths of both while obviating their weaknesses.