NEWBIE: Confussed about Python!

Alex Martelli aleax at aleax.it
Mon Jan 14 11:46:49 EST 2002


"Max Adams" <RubberDucky703 at hotmail.com> wrote in message
news:eJD08.97$Tu1.24501 at news1.cableinet.net...
> Thanks, That was quick.
>
> So there are libraries to access MySQL and MS Access?  I assume that only
> the latter would work under windows. - Can these both be used together in
> the same script.  From what you have said I see no reason why not -
correct.

MySQL runs fine under Windows (as does, of course, MS Access).  It's
perfectly possible to access both databases from the same script.


> So it would be feasible for a client running Linux to connect to a NT web
> server over port 80 and then using the python CGI script pull data from
both
> databases (say list tables in a MySQL db and a MS Acc DB [using ADO i
> assume]).  Would this work?

Yes, for properly-written "Python CGI Scripts".  An "Access DB" (more
specifically, the engine is called Microsoft JET) can well be accessed
with ADO (probably best), and MySQL can best be accessed with dedicated
Python modules (although you may choose to use different technologies
in each case).

> Most of what you have said (although useful) is stuff i though was related
> to perl.

Perl is often used to implement CGI scripts, but CGI is in no way
tied to Perl.

> How is python different to perl?  Are the two miles apart? - i'll

In terms of power, Python and Perl are roughly equivalent.  In terms
of syntax and general philosophy they are indeed "miles apart".  Perl
is "executable linenoise" (lots and LOTS of punctuaction characters
used for subtle and clever purposes), Python is "executable pseudo
code" (readability, simplicity, and clarity first and foremost at
all times).  Perl focuses on "convenience at all costs", as many ways
to perform a task as you can possibly think of plus quite a few,
clever tricks, context-dependent semantics, conciseness.  Python
focuses on simplicity, one obvious way to perform a task, simplicity,
regular and uniform semantics, clarity, readability.


Alex






More information about the Python-list mailing list