advice for perl expert wanting to learn python
Harry George
harry.g.george at boeing.com
Fri Aug 6 09:45:35 EDT 2004
David Fraser <davidf at sjsoft.com> writes:
> Zeljko Vrba wrote:
> > Now, why would I like to learn Python: because of IronPython port to CLR.
> > Perl port to CLR doesn't seem to be coming soon. First Perl6 for Parrot has
> > to be written, and then other backends..
> > What's the easiest way of learning python knowing perl?
For experienced scripters, I find Beazley's "Python Essential
Reference" is excellent. You already know what you want, just need to
see how Python does it, and don't need a lot of handholding. Get a
copy of "Python Cookbook" too, and scan that. Then rewrite one of
your exsiting perl scripts.
> > Is there
> > somewhere
> > a 'how-to' cookbook with parallel examples of frequent idioms in perl and
> > python?
An interesting variant on that is my pyperlish module, at
http://www.seanet.com/~hgg9140/comp/index.html
You can either use it as-is, or read the code to see how to emulate
perl in python. NOTE: I do not recommend using pyperlish once you get
the hang of python.
> > And most important thing, how does Python deal with database
> > connectivity?
> > Is there a single API (akin to DBI) for connecting to databases?
> > How does Python support the following databases:
> > - Oracle
> > - Postgres
> > - MySQL
> > - SQLServer (maybe using freetds?)
> > - ODBC connectivity (connecting to MS Access)
> >
>
> I have used Oracle, SQLServer and Access via ADO - try adodpapi.sf.net
> which is a wrapper for ADO to the Python DB-API.
> But note that you may well not be able to use any of this database
> stuff from IronPython
>
> David
More cross-platform and cross-DBMS is to code to the DB-API 2.0:
http://www.python.org/topics/database/
--
harry.g.george at boeing.com
6-6M21 BCA CompArch Design Engineering
Phone: (425) 342-0007
More information about the Python-list
mailing list