I've been using Perl as a scripting language for a couple of years and I'm new to web development. Last month, I started learning Python and really like the language. As such, I'm not a guru capable of answering your questions based on years of personal experience. If you know PHP and can do everything you want to do in it, I don't know of any particular reason you would want to switch to Python. In my case, I'm interested in learning OO programming techniques and figured this would be a good language to learn on. If you haven't looked a Zope (www.zope.org
) which is an Open Source web application server written in Python, you might want to check it out.
| what needs to be setup (say with apache) in order to use python? |
| Also, I am just wondering what the advantages of using python over php would be?? I have read some where that python is a proper OO language - is this all? |
--First-class functions and first-class everything else. Functions, methods, modules, classes, and other components of Python programs may be passed to functions or stored in data structures.
--Object orientation with multiple inheritance and late binding. Python allows creation of object-oriented class hierarchies, and the object referred to by name.attribute is determined at run time via a dynamic name search. For example, as demonstrated in the chapter on generating HTML, these features allow straightforward expression of complex computational concepts, and a high degree of code-reuse.
--Object-oriented and named exception handling. Errors or other exceptional conditions in Python programs can be trapped using try..except statements, and finalization actions can be specified using try..finally. This greatly simplifies code that may encounter exceptional conditions that interrupt the normal flow of control of the program. Exceptions may also be organized into inheritance structures.
--Dynamic calling sequences. Python callable objects can accept optional arguments, keyword arguments, or unlimited numbers of arguments. These features allow very generic and highly configurable operations to be implemented in terse Python declarations.
--Extendible: Python can be easily extended with interfaces to external programming libraries or new data types via compiled extension modules. Adding new compiled components to Python is easy -- much easier than writing stand-alone compiled programs. On most major platforms new compiled components may also be loaded into the interpreter dynamically, on demand.
--JPython is a re-implementation of Python in Java that compiles Python code into Java bytecodes. The resulting environment has very tight, almost seamless, integration with Java. It's trivial to access Java classes from Python, and you can write Python classes that subclass Java classes. JPython can be used for prototyping Java applications in much the same way CPython is used, and it can also be used for test suites for Java code, or embedded in a Java application to add scripting capabilities.
--New standard library features such as Unicode and XML support.