[Pythonmac-SIG] Re: ok how about some book suggestions

Bob Ippolito bob@redivi.com
Mon, 17 Feb 2003 13:26:26 -0500


On Monday, Feb 17, 2003, at 13:01 America/New_York, Jeff Harmon wrote:

> On Monday, February 17, 2003, at 09:00  AM, 
> pythonmac-sig-request@python.org wrote:
>
>> I want to do database work, a little crypto for the math, general
>> internet programing. Are there any books that would fulfill my needs?
>
> Python is rather like a weakly-typed C (this can be good and bad).  
> ...with some forced structure to eliminate the Perl/C-esque "let's see 
> how obtuse we can make this stuff" temptation.  One thing that comes 
> out of this forced structure (albeit something you don't tend to see) 
> is that the language is very open to being composed programmatically 
> (a la PostScript).  There are services for creating basic OO 
> constructs (but be careful with complex constructs thereof since they 
> may not perform as you expect).  The more I use it (Python) the more I 
> like it.  One of its strengths is the _large_ collection of std apis.

Well, IMHO, it can do some pretty complex constructs with ease.. 
however, you do have to construct them differently than elsewhere.  You 
make a good point with the fact that it's easy to compose 
programmatically -- although, I've never had a specific need to other 
than win32 COM stuff, which I just used and didn't write myself.

> If you know C++ et al. go straight for the best book out there "Python 
> Essential Reference, David Beazley, New Riders, ISBN: 0-7357-1091-0".  
> If you're new to languages (which doesn't seem to the be the case, 
> but...) go to the online docs at python.org.  LOTS of the books out 
> there are nothing more than re-prints of the stuff a python.org (with 
> a little window dressing).  I find myself using O'Reilly's Python 
> Cookbook and their Python Standard Library book (employing the later 
> as an adjunct to PER).  Many of the Python std apis are direct or 
> otherwise higher-level wrappings of other APIs (from other sources).  
> For example, Win32 APIs, Mac Toolbox, POSIX, Unix networking (various 
> RFCs), etc.  I haven't played with the crypto APIs.  That said, if 
> what you want "isn't there" it's relatively straightforward to add it 
> (either via C++ or Python itself ... or often the best form is a 
> combination of both).

As far as crypto goes, there's a couple hashing algorithms in the std 
library from what I remember, but what you want for 'real' crypto is 
PyCrypto ( http://www.amk.ca/python/code/crypto.html ).  A full SSH 
implementation (server and client) using PyCrypto is included in 
Twisted ( http://www.twistedmatrix.com/ ).  Also, if you know C++ you 
may likely want to look at Boost.Python ( 
http://www.boost.org/libs/python/doc/index.html ), I've never used it 
myself but it sounds really slick, especially if you have that need to 
add functionality.

For database work, there's not anything you want in the std library.. 
you'll need to find a particular 3rd party module for your RDBMS of 
choice (ODBC, PostgreSQL, etc).  They all pretty much conform to the 
same API though, so that's nice.  Google or look in the vaults for 
those.

-bob