Interpreted
A program written in a compiled language like C or C++ is converted
from the source language i.e. C or C++ into a language that is 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 copies the program from hard disk to memory and starts running
it.
Python, on the other hand, does not need compilation to binary. You
just run the program directly 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 computer and then
runs it. All this, actually, makes using Python much easier since you
don't have to worry about compiling the program, making sure that the
proper libraries are linked and loaded, etc, etc. This also makes your Python
programs much more portable, since you can just copy your Python
program onto another computer and it just works!
Extensible
If you need a critical piece of code to run very fast or want to have some
piece of algorithm not to be open, you can code that part of your program
in C or C++ and then use them from your Python program.
Embeddable
You can embed Python within your C/C++ programs to give 'scripting'
capabilities for your program's users.
Extensive Libraries
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),
Tk, and other system-dependent stuff. Remember, all this is
always available wherever Python is installed. This is called the 'Batteries
Included' philosophy of Python.
Besides, the standard library, there are various other high-quality libraries
such as wxPython [http://www.wxpython.org], Twisted
[http://www.twistedmatrix.com/products/twisted], Python Imaging Library
[http://www.pythonware.com/products/pil/index.htm] and many
more.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment