UnicodeError: ASCII decoding error: ordinal not in range(128)

Alex Martelli aleax at aleax.it
Sat Jul 20 03:37:23 EDT 2002


eugene kim wrote:

> thx again..
> 
> i got PyGreSQL(pyPgSQL gave me error ImportError: No module named libpq)
> i looked at
>>>>help(pgdb)
> that was about all docs i could get including from web

Can't help you much here -- I use psycopg for the same task (interfacing
to PostgreSQL).  You'll find that most DB interface modules more or less
follow the Python DB API, 

http://www.python.org/topics/database/DatabaseAPI-2.0.html

http://www.amk.ca/python/writing/DB-API.html
(excellent, though it explains the previous DBAPI 1.0 so some
detailed differences are inevitable)

http://initd.org/pub/software/psycopg/dbapi20programming.tar.gz
(you need TeX to format this one)

etc, etc.


> python looks really clean(<->perl), and requires a lot less
> coding(<->java) so i'm trying to learn python..

Here we agree.

> compared to other languages such as java/perl
> it seems like it's really hard to find docs about python..

Here we don't.  OK, in google python gives "just" 3,870,000
hits while perl gives 9,900,000 and java 25,800,000 -- but
you're not going to read even 3 or 4 million documents anyway,
are you?   Sympathize rather with the plight of users of
really unnown languages such as cobol (just 619,000 hits),
fortran (1,470,000) or pascal (2,880,000)...:-)

Seriously, if you know how to use google (and it's really
easy) it's never really hard to find docs about anything:
_filtering_ the overwhelming amounts of docs you get is the
main problem, really.  www.python.org has a lot of good
links (and oodles of great docs on the site itself), too.


> should i buy bunch of books? such as python cookbook?

As a co-editor of the Python Cookbook I can hardly be
unbiased, of course.  It's a unique book, combining lots
of recipes from the Python community in general (200+ of
them), chapter introductions from over a dozen leading
Python figures, AND lots of hard editing work from me,
David Ascher, and the unsung heroes in O'Reilly's staff,
putting it all together into a consistent, complete
whole while leaving the distinctive "voices" of the 100+
authors as intact as we could.  I think we made it, but,
of course, what matters is the _readers_' opinion, and
we can't know that yet (the book's going to be formally
launched at OSCON in a few days).

But, while unique, it IS just one book out of many
excellent Python titles!  Steve Holden's "Web Programming
with Python", for example, is an excellent introduction
(I'm biased about it too, because Steve's a friend and I
was a technical reviewer for his book, but to a lesser
extent than for the Cookbook!-) -- not just to Python, but
to the host of technologies you need to build a really
good site, including HTML, HTTP, relational databases
with a bit of entity-relation design and SQL, XML.  Unless
you already master the basics of most of these, it would be
THE book to get even if you planned to use all of these
technologies _except_ Python...!-)

More generally, I'm biased because I just LOVE books.
The web's just fine, and there's a LOT of good stuff out
there, but, ah, a book!  Holding it in my hands, touching
and smelling and hefting it, carrying it around to read
on buses, planes, trains -- it will be a long time before
any technology can really compete with it:-).


Alex




More information about the Python-list mailing list