Migrating to perl?

Gerhard Häring gerhard.nospam at bigfoot.de
Fri Jan 5 00:40:04 EST 2001


Joel Ricker wrote:
 
> So basically what I'd like to know is, how do the two compare?  Is there an
> easier learning curve with Python?

I can only speak for myself. I have programmed (chronologically) in
Basic, Pascal, C, x86 Assembler, Modula-2, C++, Java, Ada 95, Python, 
and some that I have already forgotten. The one or two times I wanted to
learn Pearl I came to it from an object-oriented background and tried to
start with Perl OOP. I failed, miserably. For me, Perl is very difficult
to learn, perhaps it just does not correspond to my way of thinking. I
wrote Python scripts that helped me do something useful from day one, so
Python was really easy for me to learn. I guess it really depends on the
backround you have. If you are a Unix guru and speak awk and sed as a
native language, then perhaps Perl is what you will love. If you have a
background from structured programming (Pascal!) or object-oriented
programming (Ada 95, Java, C++), then Python might be just the scripting
language you ever dreamed of.

As far as CGI is concerned, I have successfully implemented an
e-commerce web-application with dynamic generation of HTML in Python
(CGI) + MySQL. The Python DB-API helped me to make the web-application
database-agnostic. The Python MySQL-module is IMO very mature, I have
never had any problems with it. There exist Python modules for a lot of
other databases, most of them conform to the Python DB-API, so they can
be easily interchanged. Should be just like Perl DBI. I haven't done
very much with Graphics and Python, apart from generating buttons for
web-pages (I used wxPython for this, an excellent cross-platform GUI
toolkit). There exist several other Python libraries for graphics, the
most prominent would be PIL (Python Imaging Library), but I haven't
tried these.

All in all, I can really recommend Python for CGI scripting.

Gerhard Häring

PS:

If you need some links, here they are:

The Python tutorial:
http://www.python.org/doc/current/tut/tut.html

Python and databases:
http://www.python.org/topics/database/

Yes, Python 2.0 comes with a CGI and a Cookie module, just download
Python 2.0 and look in the docs.


> Are the modules and add-ons as good as
> perl (ie, Database -- I'm primarily interested in MySQL, CGI, Graphics).

I'd say yes.

> What about OOP?  Is it it a full OO language?

Of course, would you go with anything less? ;-)

> Is it easier than to use than perl?

For me: yes.

> Perl OO just feels like it has been cludged together.

Really? ;-) Or am I just too stupid to get it?

> And lastly, what about the Python community?  Is it friendlier than the perl
> community?  Too many times I've asked questions and all I'll get is pointers
> to documentation, which I've already read and so thats why I'm asking for
> information in the first place.  I understand simple questions for basic or
> novice information will warrant answers like that but not the things I've
> asked.

-- 
Sorry for the fake email, please use the real one below to reply.
contact: g e r h a r d @ b i g f o o t . d e
web:     http://highqualdev.com



More information about the Python-list mailing list