what would you like to see in a 2nd edition Nutshell?

Alex Martelli aleaxit at yahoo.com
Wed Dec 29 18:01:40 EST 2004


c d saunter <christopher.saunter at durham.ac.uk> wrote:

>       Probably not a practical sugestion, but have you considered 
> ctypes?  I know it's proved invaluable to our group at university - we
> like to make Python work with so many bits of weird hardware with vendor
> supplied libraries etc ...

Yes, I was considering mentioning or covering ctypes as part of an
expansion of the "Extending Python *without* Python's C API" section
which currently mentions pyfort, f2py, SCXX, CXX, Boost, SWIG, pyrex,
weave/blitz, and the use of COM (on Windows only).  All of those
mentions are on p. 545, meaning that it's a very crowded section, of
course;-) [[ and yet it's missing lots of stuff such as sip etc...!-)
]].  I do have a ctypes recipe in the "extending and embedding" chapter
of the Cookbook's 2nd edition, and I was really glad to get it because I
like ctypes a lot (the Pyrex recipe I had to request specifically from
my good friend Peter Cogolo -- requests mailed to the pyrex mailing list
having produced no answer whatsoever).

So -- ctypes is definitely getting a _mention_, at least... the issue
remains of whether we're talking one paragraph, like for all other
extending-tools that were already thus mentioned in the 1st edition, or
a couple of pages (I can't possibly spend 2-3 pages on each of a dozen
extending tools, much as I'd love to!).


> Perhaps a more resonable sugestion would be a short section on integration
> with native systems, e.g. an intro/overview to (non exhaustive list):
> 
> psyco
> scipy.blitz/weave
> ctypes
> pyrex

I'm missing psyco, out of these -- unsure whether it should be in the
optimization chapter or in the extending one.  But again, mostly, the
issue is "just mention -- or _cover_...?".  
 
> A detailed look at these is probably outside the scope of Nutshell, but
> they all represent intreresting areas.  Perhaps the section could end with
> some words on PyPy.

Speaking as somebody who's participated in more than half of the pypy
sprints and hopes for more, I think pypy needs to be mentioned much
earlier, together with other "alternate implementations of Python".

I do agree that vast coverage is outside the scope that the Nutshell's
size lets me aim for.  However, mere mention appears to lead to a
serious risk of the pointer being entirely missed -- e.g. despite being
interested in these issues you appear to be unaware of p. 545 (1st ed).
Hmmm -- maybe I need to strike some kind of balance here (so what else
is new...;-).


Thanks!

Alex



More information about the Python-list mailing list