Sunday, July 24, 2011

Python -Future Language

Introduction to Python

Python is a multifaceted, multi-platform, open source, general-purpose and object-oriented programming language like Java, C++ TCL, and Perl, but with a particular affinity towards text processing. Python is a language that maps well to the thought process and abilities of the modern sophisticated programmer. Python has minimal syntax and it is highly scalable, interpreted and readable. It is very easy to use and for maintenance and increases significant productivity.Python is also useful for coding scripts to be embedded in server side technologies such as Microsoft ASP towards generating dynamic Web pages. Python is highly portable that its statements can be interpreted in a number of operating systems including Unix and its variants, Mac and Windows systems. Python is freely available in both source code and compiled form for nearly every hardware platform in this planet. A major deviation of Python from other languages is that Python uses the indentation of lines of code to work out how the lines should be grouped together for processing. Python is highly interactive, and specifically good for XML processing by its string slicing feature.

Python is written in C and has incorporated many robust features of C. Execution of Python programs is similar to Java. Python programs are compiled into an intermediate representation known as Python bytecode, which will be executed by Python Virtual machine. Python uses reference counting as its memory management scheme.

Python is a dynamically typed language, that is, its variables are not restricted to referencing objects of any particular type by the language.

Scripting languages are traditionally used for small tasks, gluing other programs together, and automating processes, Python is unique in its scalability, from small scripts to very large systems. Python incorporates the best features of a variety of other languages, and introduces a few new ideas of its own, into a remarkably elegant, cohesive, and useful whole. Python can help the job done more quickly and simply.

Python Features

Python's features are more inclined toward programmer efficiency and efficacy, sometimes at the expense of program efficiency. That is, Python programs are faster to write, but sometimes slower to run.

Python is a very high level language (VHLL). Python programs are a high level representation of a programmer's ideas. Low-level housekeeping details like memory allocation and reclamation are handled by Python itself. The developers need not worry about them. High level means seeing the big picture and delegating the details. Python with intelligent syntax reduces clutter. The interpreter understands program structure by examining the physical structure of the code; block delimiters are not required. Modules and classes provide exceedingly accessible abstraction, encapsulation and modularity.

Python programs are interpreted and they have only two tasks: edit and run. Normally the compiling languages like C, undergoes edit, compile, link and run cycles. With dynamic loading and some planning, the cycle can be run, edit and reload the edited part into the running process with stopping. The Python interpreter reads source files called modules, which usually have the extension .py, converts them to portable byte codes, and executes them by interpreting the byte codes much like Java does. Python is sometimes referred to as a scripting language.

Python code is clean, simple and powerful. It is remarkably easy to write, read and maintain. Python programs can be read and understood by non-Python programmers and even non-programmers. Python also makes an excellent teaching as it is relatively devoid of the details that make other languages difficult for neophytes to learn. Python's syntax is minimalist. It lacks a lot of the noise characters that other languages suffer from, like semicolons at the end of each statement, special dereferencing symbols and braces or begin/end for nested code blocks. As opposed to some form of start/end indicators ({ and }), begin/end, if/fi, case/esac and for/done in other programming languages, the hierarchy of blocks of code in Python is indicated by that code block's indentation level. Because of its simplicity, Python's syntax is also very powerful. An equivalent task will often require far less Python code than C code. Fewer lines of code also means fewer bugs, greater programmer productivity and far less frustration. Python began as a minimalist language and change to the core language syntax has been planned and deliberately slow. Future versions of Python may even reduce the complexity of the language.