Perl Basics
Introduction to Perl
FAQ's
CGI
Regular Expressions

PC Overview
Cool Stuff
My Modules
Success Stories
Links
Perl in the News
Logos
Perl @ msn
Perl Chat

PC Internals
About
Contact
Guest Book
Handy Logos
What's new

Perl vs. Python

Perl vs. Python
P-friendly

[ home ] - [ search ] - [ sitemap ]

PowerPoint Slide Show

Python does not resemble C very much, nor in fact does it resemble awk, sh, sed, or any other Unix utility really at all (whereas Perl does). It doesn't have assignment operators or autoincrement operators or anything like that, all of which seem to deeply confuse non-C programmers.

It is nearly as fast as Perl, but doesn't have so powerful regular expression stuff as Perl.

  • Perl has currently a better multi-platform support

  • If you don't like "side effects", Python also tolerates newline as a statement separator. That means that you're going to have to do some surprising things at times. For example this:

    a = 3 * 5
    - 12;
    won't work.

  • Python doesn't take that long to learn, but reading Python to take on someone else'se project just isn't much *fun*.


Related Links


Python's Big Picture

V0.80.00

Python's goal is to be a language that's easy to learn, and easy for development of correct applications, even when multi-person teams are involved.

Particular Modules and Applications

Python Package Index

Overview: http://www.python.org/pypi/.

Database Access

Database API Overview: http://www.python.org/pypi?:action=browse&asdf=256

PostgreSQL: pyPgSQL 2.3
pyPgSQL - A Python DB-API 2.0 compliant interface to PostgreSQL.
MySQL-python 0.9.2
Python interface to MySQL
SQL statement wrapper class - pSQL 0.9.2
http://software.fionet.com/pSQL
pSQL currently works with MySQLdb only. This will change in a future version and an abstraction layer will be added which allows the use of any DB 2.0 API compliant SQL module, e.g. for postgres.
bsddb3 3.3.0
Python interface for BerkeleyDB 3.1 and 3.2

XML Processing

Byline 0.5beta Multi-protocol XML-RPC weblog client
Byline is a weblog authoring tool that uses the XML-RPC APIs found in popular weblog systems to allow you to write weblog entries on your desktop in your favorite editor.

elementtree 1.0 Light-weight components for XML
Light-weight components for working with XML and similar formats. This includes the Element and ElementTree types, XML parsers and writers, HTML tools, etc.


Networking

pycurl 7.10.6 PycURL -- cURL library module for Python

Development Status
3 - Alpha
5 - Production/Stable
6 - Mature


Further Thoughts...

Ruby

eruby in Apache
You can set up an Apache Web server to automatically parse Ruby-embedded documents using eRuby, much in the same way that PHP does.

Improving Performance with mod_ruby
You can use Ruby to write CGI programs for the Web, but, as with most CGI programs, the default configuration has to start up a new copy of Ruby with every cgi-bin page access. That's expensive in terms of machine utilization and can be painfully slow for Web surfers. The Apache Web server solves this problem by allowing loadable modules.

Typically, these modules are dynamically loaded and become part of the running Web server process---there is no need to spawn another interpreter over and over again to service requests; the Web server is the interpreter.

And so we come to mod_ruby (available from the archives), an Apache module that links a full Ruby interpreter into the Apache Web server itself. The README file included with mod_ruby provides details on how to compile and install it. Once installed and configured, you can run Ruby scripts just like you could without mod_ruby, except that now they will come up much faster.

Database Independent Interface for Ruby
This is much like Perl's DBI and it's a necessity for Ruby as well.
http://ruby-dbi.sourceforge.net/ License: GPL

[ See also http://www.perl.com/pub/a/language/versus/python.html ] - [ Perl vs. Python @ Google ]

home - feedback - search - web jobs
© 1998-2004 retoh :)