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

2005-01-18 Thread Alex Martelli
kery [EMAIL PROTECTED] wrote:
   ...
 Any schedule for publication of 2nd Ed? I just bought 1st Ed.

The 2nd edition Python Cookbook appears to be on-track for PyCon (late
March) for the very first ink-on-paper -- probably April in bookstores.

The 2nd edition Python in a Nutshell is more doubtful, being just
started and all that -- OSCON is a possible target, but it's way too
early to say if I'll manage to hit it.

In both cases, the 2nd ed is meant to focus on versions 2.3 and 2.4 of
Python, while the 1st ed covered all versions up to 2.2 included.  So,
if you're still interested in using Python 2.2 or older versions, you
may want to stock up on 1st editions of Cookbook and Nutshell; if you're
only interested in 2.3 and following versions, in the case of the
Cookbook waiting 2-3 months for the 2nd ed may be worth it, while, in
the case of the Nutshell, I would definitely not recommend a far longer
and more uncertain waiting period of 7 months or more.  Moreover, the
changes in the Nutshell will be less than those in the Cookbook were:
the Cookbook has changed way more than 50% of its contents, the Nutshell
will change substantially less (according to current plans: I'll be able
to give more precise information later this year).


Alex
-- 
http://mail.python.org/mailman/listinfo/python-list


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

2005-01-18 Thread Alex Martelli
Steven Chan [EMAIL PROTECTED] wrote:

 I completely agree. I'm also waiting for an advanced Python/project
 management book that helps folks out with large-scale projects.

I won't schedule that project until the Nutshell 2nd ed is substantially
done... and I'm not _promising_ I'll schedule it right afterwards;-).

 And, for the 2nd edition, may I suggest:
 - coverage of OptionParser module, which is more advanced than the
 getopt module that you discuss on page 141.

I assume you mean optparse -- that's the module; OptionParser is a class
within that module.  Yep, covering that is in the plan.

 - better Mac OS X application building coverage. Tell us how to build
 double-clickable applications.

Python in a Nutshell is a book about *cross-platform* Python.  There is
practically no *WINDOWS*-specific coverage -- 80% of the market or
whatever -- it would be absurd if there was platform-specific coverage
for a (wonderful) system that has less than 1/10th as much volume (and
much as I may be rooting for the mac mini to revolutionize the market, I
suspect it will only make a relatively small, incremental difference).

I *WISH* I could write a book about Python on the Mac -- ever since I
got my iBook, over a year ago, it's been my love and joy, and as soon as
I had to change a desktop machine I got myself a dual processor G5
PowerMac too.  However, when I proposed that idea to O'Reilly, their
reaction was a firm no -- it's too narrow a market, they think (and,
being the premier publisher for both the Mac AND Python, they should
know, if anybody does).

I don't know if this perception of O'Reilly can be changed.  If it ever
does change, I sure hope they'll call me first, to do that book...!!!


 I wish I could ask for wxPython coverage (the whole chapter on tkinter
 is useless to me), but I won't start a flame war here.

As long as Tkinter is distributed with standard Python and not
deprecated, it's unlikely that a reference work about Python can just
quietly ignore it.  If standard Python changed in this respect, I would
of course take that into account in the next following edition!-)


Alex
-- 
http://mail.python.org/mailman/listinfo/python-list


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

2005-01-17 Thread Steven Chan
I completely agree. I'm also waiting for an advanced Python/project
management book that helps folks out with large-scale projects.

And, for the 2nd edition, may I suggest:
- coverage of OptionParser module, which is more advanced than the
getopt module that you discuss on page 141.
- better Mac OS X application building coverage. Tell us how to build
double-clickable applications.

I wish I could ask for wxPython coverage (the whole chapter on tkinter
is useless to me), but I won't start a flame war here.

:: steve ::

Mariano Draghi wrote:
 Alex Martelli escribió:
 
  Yes, good point... I _do_ plan another book after I'm done with the
2nd
  ed Nutshell, though ti will mostly be about Design Patterns and
  development methods so may not meet your exact desires...

 Now I'm anxious! *that* is the book I'm waiting for :)
 I think the Python community really needs such a book; you have
plenty
 of books and articles and papers and resources on-line with (almost)
all
 the bits  pieces. But I really miss a book that focuses in the
 Pythonic way of project management, design patterns, development
 cycles, QA... something targeted to the enterprise.

--
http://mail.python.org/mailman/listinfo/python-list


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

2005-01-12 Thread kery
Alex Martelli wrote:
 Craig Ringer [EMAIL PROTECTED] wrote:

  On Wed, 2004-12-29 at 23:54, Thomas Heller wrote:
 
   I found the discussion of unicode, in any python book I have,
insufficient.
 
  I couldn't agree more. I think explicit treatment of implicit
  conversion, the role of sysdefaultencoding, the u'' constructor and
  unicode() built in, etc would be helpful to many.

 Thanks!  BTW, thanks first and foremost to Holger Krekel (who was a
very
 activist tech reviewer and specifically contributed a recipe for
this
 purpose), there's what I believe is a pretty good treatment of
Unicode
 in the Cookbook's forthcoming 2nd edition -- still insufficient in
 some sense, no doubt (it IS just a few pages), but, I believe, pretty
 good.  Nevertheless, I'll ensure I focus on this in the 2nd ed
Nutshell,
 too.

  It wouldn't hurt to point C extension authors at things like the
'es'
  encoded string format for PyArg_ParseTuple to help them make their
code
  better behaved with non-ascii text.

 Good sub-point, thanks.

 
 Alex

Any schedule for publication of 2nd Ed? I just bought 1st Ed.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: what would you like to see in a 2nd edition Nutshell? A: Unicode aware scrollable message box in Tk

2004-12-31 Thread Pekka Niiranen
Well,
I have not read the previous version, but
I would like to see an example how to redirect console messages
from scripts to Tk windows in UTF-8/16 for debugging purposes.
(I hate those ordinal not in range(128) messages)
This involves setting font (Arial MS Unicode), scrollbar and
Continue -button (allows script to continue execution).
It could be called Unicode aware scrollable message box in Tk
-pekka-
Alex Martelli wrote:
I'm considering proposing to O'Reilly a 2nd edition of Python in a
Nutshell, that I'd write in 2005, essentially to cover Python 2.3 and
2.4 (the current 1st edition only covers Python up to 2.2).
What I have in mind is not as complete a rewrite as for the 2nd vs 1st
edition of the Cookbook -- Python hasn't changed drastically between 2.2
and 2.4, just incrementally.  Language and built-ins additions I'd of
course cover -- decorators, custom descriptors (already in 2.2 but not
well covered in the 1st edition), importing from zipfiles, extended
slicing of built-in sequences, sets, genexps, ... and also major new
standard library modules such as (in no special order) optparse,
tarfile, bsddb's new stuff, logging, Decimal, cookielib, datetime,
email... and new capabilities of existing modules, such as thread-local
storage.  Outside of the standard library, I was thinking of expanding
the coverage of Twisted and adding just a few things (numarray --
perhaps premature to have it _instead_ of Numeric, though; dateutils,
paramiko, py2app...).  Since the book's size can't change much, I'll
also have to snip some stuff (the pre-email ways to deal with mail, for
example; modules asyncore and asynchat, probably) to make space for all
of the additions.
I haven't take any real decisions about it, yet, except one: I'll keep
covering Tkinter, rather than moving to, say, wxPython (no space to
_add_ wx coverage while leaving Tk intact - having to choose, I still
believe Tkinter coverage is going to help more readers).  Just about
everything else is still to be finalized in my mind...
So, if there's any advice or request about a 2nd edition of the
Nutshell, this is the right time for y'all to let me know.  Feedback is
welcome, either privately or right here.  Thanks in advance -- _and_
apologies in advance because I know I just won't be able to accomodate
all the requests/advice, given the constraints on book size c.
Alex
--
http://mail.python.org/mailman/listinfo/python-list


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

2004-12-31 Thread JanC
JoeG schreef:

 I disagree with your Tkinter vs. wxPython
 decision.  I tried a number of programs written with Tkinter and really
 didn't like the interface.  The program I helped develop is Windows
 based and I knew that a program with the Tkinter interface would never
 work as a cross platform environment.  Out existing customers just
 wouldn't accept it.   I can't see anyone using Tkinter for new mass
 market development.  If you've already got an application written with
 it you might want to continue using it but for new projects, wxPython
 seems to have some BIG advantages.

Robin Dunn is writing a wxPython book:
http://article.gmane.org/gmane.comp.python.wxpython/17535


-- 
JanC

Be strict when sending and tolerant when receiving.
RFC 1958 - Architectural Principles of the Internet - section 3.9
-- 
http://mail.python.org/mailman/listinfo/python-list


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

2004-12-30 Thread Dave Cook
On 2004-12-29, Alex Martelli [EMAIL PROTECTED] wrote:

 the coverage of Twisted and adding just a few things (numarray --

I'd rather have a whole book on Twisted :p.  But I'll take a more extensive
section in PiaN if I can't have it.

Dave Cook

-- 
http://mail.python.org/mailman/listinfo/python-list


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

2004-12-30 Thread Alex Martelli
Dave Cook [EMAIL PROTECTED] wrote:

 On 2004-12-29, Alex Martelli [EMAIL PROTECTED] wrote:
 
  the coverage of Twisted and adding just a few things (numarray --
 
 I'd rather have a whole book on Twisted :p.  But I'll take a more extensive
 section in PiaN if I can't have it.

I believe one or more books on Twisted are in the works, but I have no
insider info about them, their timing, and so on.


Alex
-- 
http://mail.python.org/mailman/listinfo/python-list


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

2004-12-30 Thread alecwy
Discussion of GIL and (in)ability to control thread priority.
Thanks for asking!

-- 
http://mail.python.org/mailman/listinfo/python-list


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

2004-12-30 Thread JoeG
I use your book a lot so another version would be helpful.  I know I'll
buy a copy.  Heck, I'd pay you money just to have access to the draft
while you write it.

One suggestion I have is to include chapters that expand on test based
development and lazy functions.  Maybe you could go into some of the
concepts and methods used in the Zope3 project.  That would be useful
to me because I've been reading a lot about  it but still can't seem to
grok any of it.  It's really hard to learn new concepts from books - no
matter how well written.  I usually need to read several different
sources from different authors to get a decent picture.

That gives me an idea for a perfect book.  Take a single short subject
- say doctest.  Get three or four experts to independently write
chapter.  Then combine the chapters into a section.  That way I could
buy one book and get the different perspectives I need to really
understand the subject.

You could keep the books small and inexpensive.  Twenty bucks and 100
to 200 pages.  It would keep the book projects small and specific and
with four people working separately, they could be cranked out quickly.
Combine them all together and you've got a library.

Well anyway, it's probably beyond the scope of your update but I'd like
to see someone do it. Unlike a lot of authors, I can understand most of
what you write.

I've been working with Python for about a year and I still feel like a
beginner.  That probably gives me a different perspective than most of
the people you'll hear from.  I disagree with your Tkinter vs. wxPython
decision.  I tried a number of programs written with Tkinter and really
didn't like the interface.  The program I helped develop is Windows
based and I knew that a program with the Tkinter interface would never
work as a cross platform environment.  Out existing customers just
wouldn't accept it.   I can't see anyone using Tkinter for new mass
market development.  If you've already got an application written with
it you might want to continue using it but for new projects, wxPython
seems to have some BIG advantages.

wxPython takes on more of the native platform's interface.  I say seems
to because I haven't actually written any code with it.

These are just my opinions.  I've been programming for  over twenty
years now so I do have some perspective on the market even if I don't
have much expertise with Linux or Python development.

Good luck with your update.  Let me know when it's published and I'll
buy a copy.

-- 
http://mail.python.org/mailman/listinfo/python-list


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

2004-12-30 Thread Michael Bernstein
Aside from negative indices, I'd also suggest a small (and rather
obvious) example for replacing a substring:
 s='spam'
 s=s[:1]+'xx'+s[3:]
 s
'sxxm'


- Michael

-- 
http://mail.python.org/mailman/listinfo/python-list


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

2004-12-30 Thread Dave Reed
On Wednesday 29 December 2004 18:01, Alex Martelli wrote:
snip

 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

snip

  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...;-).

snip

This discussion is making me think what would be really nice is an 
advanced Python book that discusses many of the topics mentioned in 
this message and earlier messages in the thread. I'd rather see an 
in-depth advanced book than light coverage of the topics added to a 
Nutshell book.  I own at least 8 or 9  Python books now and the 3 that 
I keep within arms reach of the computer are Nutshell, Cookbook, and 
Python Essential Reference. 

Dave

Dave

-- 
http://mail.python.org/mailman/listinfo/python-list


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

2004-12-30 Thread Alex Martelli
On 2004 Dec 30, at 19:19, Dave Reed wrote:
This discussion is making me think what would be really nice is an
advanced Python book that discusses many of the topics mentioned in
this message and earlier messages in the thread. I'd rather see an
in-depth advanced book than light coverage of the topics added to a
Nutshell book.  I own at least 8 or 9  Python books now and the 3 that
I keep within arms reach of the computer are Nutshell, Cookbook, and
Python Essential Reference.
Yes, good point... I _do_ plan another book after I'm done with the 2nd 
ed Nutshell, though ti will mostly be about Design Patterns and 
development methods so may not meet your exact desires...

Alex
--
http://mail.python.org/mailman/listinfo/python-list


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

2004-12-30 Thread Mariano Draghi
Alex Martelli escribió:
Yes, good point... I _do_ plan another book after I'm done with the 2nd 
ed Nutshell, though ti will mostly be about Design Patterns and 
development methods so may not meet your exact desires...
Now I'm anxious! *that* is the book I'm waiting for :)
I think the Python community really needs such a book; you have plenty 
of books and articles and papers and resources on-line with (almost) all 
the bits  pieces. But I really miss a book that focuses in the 
Pythonic way of project management, design patterns, development 
cycles, QA... something targeted to the enterprise.

I think that somehow Python's J2EE equivalent is already out there 
(sort of...), if you have time to look for the bits, and if you manage 
to glue them together. A good book with a higher level approach, focused 
in design, would be an invaluable help in that proccess.

--
Mariano
--
http://mail.python.org/mailman/listinfo/python-list


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

2004-12-30 Thread matiu
I enjoyed the first edition.

Please include:

vpython.org, twisted and pygame

and if you'll consider a gui toolkit do pygtk, we use it to develop and
deploy on both windows and linux, with glade gui designer and libglade
(loads the glade xml files in runtime). It's much easier to use than wx
and looks nicer than tk :)

Thanks for reading.

-- 
http://mail.python.org/mailman/listinfo/python-list


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

2004-12-30 Thread Nick Coghlan
Mariano Draghi wrote:
I think that somehow Python's J2EE equivalent is already out there 
(sort of...),
I think it's called PEAK. . .
Cheers,
Nick.
--
Nick Coghlan   |   [EMAIL PROTECTED]   |   Brisbane, Australia
---
http://boredomandlaziness.skystorm.net
--
http://mail.python.org/mailman/listinfo/python-list


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

2004-12-30 Thread Nick Coghlan
JoeG wrote:
wxPython takes on more of the native platform's interface.  I say seems
to because I haven't actually written any code with it.
While Tkinter is the GUI toolkit shipped *with* Python, then that's the correct 
toolkit for Alex to cover in PiaN. Mentioning other toolkits (and providing 
references for additional information, including books if they're available) 
seems like the most reasonable alternative.

Now, if we could just switch to wxPython and Boa Constructor for Py3K. . .
Cheers,
Nick.
Sorry Kurt!
--
Nick Coghlan   |   [EMAIL PROTECTED]   |   Brisbane, Australia
---
http://boredomandlaziness.skystorm.net
--
http://mail.python.org/mailman/listinfo/python-list


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

2004-12-30 Thread Gregor Horvath
RM wrote:
What you say is true.  However, I didn't think the target audience of
this book was newbies.  Python newbies yes, but not programming
newbies.  For programming newbies I would recommend the Learning
Python book instead.
The availability argument, however, is a good point.
I was/am a python newbie beginning to learn python with this excellent book.
I think it would have been much easier if there were more comparisions 
of features to other mainstream languages which one likely already knows 
 (C, VB, Java ...)

I liked the following Java book especially because of those comparisions:
http://www.amazon.de/exec/obidos/ASIN/0130894680/qid=1104474997/ref=sr_8_xs_ap_i1_xgl/302-1345611-4845666
The included comparisions helped me to get into the Java language more 
quickly.

--
Greg
--
http://mail.python.org/mailman/listinfo/python-list


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

2004-12-29 Thread Alex Martelli
I'm considering proposing to O'Reilly a 2nd edition of Python in a
Nutshell, that I'd write in 2005, essentially to cover Python 2.3 and
2.4 (the current 1st edition only covers Python up to 2.2).

What I have in mind is not as complete a rewrite as for the 2nd vs 1st
edition of the Cookbook -- Python hasn't changed drastically between 2.2
and 2.4, just incrementally.  Language and built-ins additions I'd of
course cover -- decorators, custom descriptors (already in 2.2 but not
well covered in the 1st edition), importing from zipfiles, extended
slicing of built-in sequences, sets, genexps, ... and also major new
standard library modules such as (in no special order) optparse,
tarfile, bsddb's new stuff, logging, Decimal, cookielib, datetime,
email... and new capabilities of existing modules, such as thread-local
storage.  Outside of the standard library, I was thinking of expanding
the coverage of Twisted and adding just a few things (numarray --
perhaps premature to have it _instead_ of Numeric, though; dateutils,
paramiko, py2app...).  Since the book's size can't change much, I'll
also have to snip some stuff (the pre-email ways to deal with mail, for
example; modules asyncore and asynchat, probably) to make space for all
of the additions.

I haven't take any real decisions about it, yet, except one: I'll keep
covering Tkinter, rather than moving to, say, wxPython (no space to
_add_ wx coverage while leaving Tk intact - having to choose, I still
believe Tkinter coverage is going to help more readers).  Just about
everything else is still to be finalized in my mind...

So, if there's any advice or request about a 2nd edition of the
Nutshell, this is the right time for y'all to let me know.  Feedback is
welcome, either privately or right here.  Thanks in advance -- _and_
apologies in advance because I know I just won't be able to accomodate
all the requests/advice, given the constraints on book size c.


Alex
-- 
http://mail.python.org/mailman/listinfo/python-list


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

2004-12-29 Thread TZOTZIOY
On Wed, 29 Dec 2004 11:35:18 +0100, rumours say that [EMAIL PROTECTED]
(Alex Martelli) might have written:

[snip: things to cover in a tentative 2nd edition of the nutshell]

and new capabilities of existing modules, such as thread-local
storage.

...which I most surely missed learning about it.  Sometimes it's hard
following all the changes, and amk's _What's New_ didn't mention it too
(I'm sending a copy of this post to amk).  In case others didn't know
too, Google's first hit using the obvious query points to:

http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/302088

which is providing code and hints how to find out more about
threading.local .

Yes, Alex, I am sure a second version of the Nutshell would be much
needed; now and then there are discussions about good Python books, and
I believe recently someone proposed the Nutshell among others, only to
get the reply but it only covers up to 2.2.
-- 
TZOTZIOY, I speak England very best.
Be strict when sending and tolerant when receiving. (from RFC1958)
I really should keep that in mind when talking with people, actually...
-- 
http://mail.python.org/mailman/listinfo/python-list


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

2004-12-29 Thread Arthur
On Wed, 29 Dec 2004 11:35:18 +0100, [EMAIL PROTECTED] (Alex Martelli)
wrote:

So, if there's any advice or request about a 2nd edition of the
Nutshell, this is the right time for y'all to let me know.  Feedback is
welcome, either privately or right here.  Thanks in advance -- _and_
apologies in advance because I know I just won't be able to accomodate
all the requests/advice, given the constraints on book size c.

I understand in advance that my comments are not fully practical:

The gap in the market against which I am currently bumpiong up
against a wall is in gaining an understanding of threads,
sub-processes, sockets, signals and such in Python - having no
background in these concepts from outside of Python.

Programming concepts up to this level can all (or mostly all)
succesfully be learned and understood from materials out there
speaking in Python. As to these concepts, the implicit point of view
seems to be to leave Python to learn the concepts, and return to
Python to understand its implementation of the details, once the
concepts are well grasped.

It seems to me important that this gap be filled. somehow at some
point.  The advice of go learn threads in Java and come back then
seems a pity. Some of the other concepts which I am confronting I
understand to be basic for the C programmer.  This is how Python
implements these C concepts, which we of course all understand.
My hand has been held nicely, too this point then

Learn C and come back?  Love to. Don't have the time.  I am a
practicing Python programmer, hoping that can be enough.  

If I want to no more than be able to follow, say, the current Idle
code of the PyShell module, I can find very little guidance from
within the canon of Python literature.

Help?

Art

-- 
http://mail.python.org/mailman/listinfo/python-list


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

2004-12-29 Thread TZOTZIOY
On Wed, 29 Dec 2004 14:05:18 +0200, rumours say that Christos TZOTZIOY
Georgiou [EMAIL PROTECTED] might have written:

[snip: things to cover in a tentative 2nd edition of the nutshell]

[Alex]
and new capabilities of existing modules, such as thread-local
storage.

[I]
...which I most surely missed learning about it.  Sometimes it's hard
following all the changes, and amk's _What's New_ didn't mention it too
(I'm sending a copy of this post to amk)

...and most promptly amk replied by pointing to 

http://docs.python.org/whatsnew/node13.html

where it is indeed mentioned.  So I stand corrected, mea culpa etc :)
-- 
TZOTZIOY, I speak England very best.
Be strict when sending and tolerant when receiving. (from RFC1958)
I really should keep that in mind when talking with people, actually...
-- 
http://mail.python.org/mailman/listinfo/python-list


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

2004-12-29 Thread Thomas Heller
[EMAIL PROTECTED] (Alex Martelli) writes:

 I'm considering proposing to O'Reilly a 2nd edition of Python in a
 Nutshell, that I'd write in 2005, essentially to cover Python 2.3 and
 2.4 (the current 1st edition only covers Python up to 2.2).

 What I have in mind is not as complete a rewrite as for the 2nd vs 1st
 edition of the Cookbook -- Python hasn't changed drastically between 2.2
 and 2.4, just incrementally.  Language and built-ins additions I'd of
 course cover -- decorators, custom descriptors (already in 2.2 but not
 well covered in the 1st edition), importing from zipfiles, extended
 slicing of built-in sequences, sets, genexps, ... and also major new
 standard library modules such as (in no special order) optparse,
 tarfile, bsddb's new stuff, logging, Decimal, cookielib, datetime,
 email... and new capabilities of existing modules, such as thread-local
 storage.  Outside of the standard library, I was thinking of expanding
 the coverage of Twisted and adding just a few things (numarray --
 perhaps premature to have it _instead_ of Numeric, though; dateutils,
 paramiko, py2app...).  Since the book's size can't change much, I'll
 also have to snip some stuff (the pre-email ways to deal with mail, for
 example; modules asyncore and asynchat, probably) to make space for all
 of the additions.

 I haven't take any real decisions about it, yet, except one: I'll keep
 covering Tkinter, rather than moving to, say, wxPython (no space to
 _add_ wx coverage while leaving Tk intact - having to choose, I still
 believe Tkinter coverage is going to help more readers).  Just about
 everything else is still to be finalized in my mind...

 So, if there's any advice or request about a 2nd edition of the
 Nutshell, this is the right time for y'all to let me know.  Feedback is
 welcome, either privately or right here.  Thanks in advance -- _and_
 apologies in advance because I know I just won't be able to accomodate
 all the requests/advice, given the constraints on book size c.

I found the discussion of unicode, in any python book I have, insufficient.

Thomas
-- 
http://mail.python.org/mailman/listinfo/python-list


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

2004-12-29 Thread djw

I found the discussion of unicode, in any python book I have, insufficient.
Thomas

+1
Don
--
http://mail.python.org/mailman/listinfo/python-list


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

2004-12-29 Thread terraplane
As an already-experienced programmer, I came to Python via this book
and still use it as my primary reference.

As a Python beginner, I had a difficult time with the section on
Slicing a sequence (p. 47).  In particular, a better explanation and
examples of negative indicies would be helpful.

This is nitpicking in what I consider to be a very good book.  I hope
the second edition flies.

Cheers,
  Steve

-- 
http://mail.python.org/mailman/listinfo/python-list


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

2004-12-29 Thread Scott David Daniels
Alex Martelli wrote:
I'm considering proposing to O'Reilly a 2nd edition of Python in a
Nutshell, that I'd write in 2005, essentially to cover Python 2.3 and
2.4 (the current 1st edition only covers Python up to 2.2).
So, if there's any advice or request about a 2nd edition of the
Nutshell, this is the right time for y'all to let me know.  Feedback is
welcome, either privately or right here.  Thanks in advance -- _and_
apologies in advance because I know I just won't be able to accomodate
all the requests/advice, given the constraints on book size c.
 * code coverage tools for python code (testing your tests).
 * new-style classes forward and old-style shrunk.  best practices
   such as always super(class, self).__init__(...) and why even if
   why is only a forward reference.  Using Left(object), Right(object),
   Top(Left, Right) would be good for the example.
   ** Fix the examples in Inheritance in new-style object model, the
  diagram, and the following example in cooperative superclass
  method calling to use the same hierarchy.  I personally prefer
  the A(object), B(A), C(A), D(B,C) hierarchy, but they should
  match.
 * implementing types/classes in C -- a checklist w/ advice on testing.
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list


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

2004-12-29 Thread Fuzzyman
I second that
Regards,

Fuzzy
http://www.voidspace.org.uk/python/index.shtml

-- 
http://mail.python.org/mailman/listinfo/python-list


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

2004-12-29 Thread beliavsky
I like the current edition. Since it is a reference work, I would like
to see it in a CD-ROM as well as in print, either packaged with a book
or as part of a Python CD Bookshelf, analogous to the other CD
bookshelves O'Reilly offers.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: learning about threads and processes (was Re: what would you like to see in a 2nd edition Nutshell?)

2004-12-29 Thread Aahz
In article [EMAIL PROTECTED],
Alex Martelli [EMAIL PROTECTED] wrote:

Hmmm - have you looked at Deitel, Deitel, Liperi, Wiedermann, Python
how to program, chapters 18 (Process Management) and 19
(Multithreading), pages 613-687?  They seem to do a rather workmanlike
job -- of course, they can't do full justice to the subjects in 75
pages; and if you don't want to buy a vast, costly 1300-pages tome for
the sake of those 75 pages, I can't really blame you, either.  

Except that it's a really, really piss-poor book.  That's an opinion
which I believe you've agreed with previously.

And what about Norman Matloff's
http://heather.cs.ucdavis.edu/~matloff/Python/PyThreads.pdf, the first
google hit if you're looking for
python threads
?  I haven't looked into it, but, again, without some specific
explanation of how it fails to meet your needs, it's hard to offer
alternatives.

That's actually pretty good.
-- 
Aahz ([EMAIL PROTECTED])   * http://www.pythoncraft.com/

19. A language that doesn't affect the way you think about programming,
is not worth knowing.  --Alan Perlis
-- 
http://mail.python.org/mailman/listinfo/python-list


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

2004-12-29 Thread Fernando Perez
Alex Martelli wrote:

 the coverage of Twisted and adding just a few things (numarray --
 perhaps premature to have it _instead_ of Numeric, though; dateutils,

You might want to keep in touch with the scipy/numarray gang on this particular
topic.  An effort is currently under way to make scipy work with numarray, and
matplotlib already works with numarray out of the box.  These two facts will,
I think, greatly accelerate the adoption of numarray and the transition away
from Numeric.  There are a few people (like me, unfortunately), who can simply
not use numarray because of the small array instatiation overhead.  But that
subcommunity tends to know enough to be able to deal with the problems by
itself.  Since numarray is indeed the long-term array core for Python, I think
the book would be better off by covering it.  Numarray is actively developed,
and vastly better documented than Numeric.

A mention of the particular problems with numarray might be a good idea, so
that readers are aware of Numeric and where it may still be preferable to
numarray, but with the understanding that it's a (shrinking) niche.  Hopefully
one day that niche will shrink to zero, but that is going to take time and
work.

Finally, I think in this section a mention of the overall scipy project would
be a good idea.  Scipy is the central meeting point for most scientific
computing projects in python, and therefore a natural reference for most users
of numarray/numeric.  Amongst other useful things at the scipy site, there's a
community maintained wiki of links to python-based projects of scientific
interest:

http://www.scipy.org/wikis/topical_software/TopicalSoftware

Regards,

f

-- 
http://mail.python.org/mailman/listinfo/python-list


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

2004-12-29 Thread Craig Ringer
On Wed, 2004-12-29 at 23:54, Thomas Heller wrote:

 I found the discussion of unicode, in any python book I have, insufficient.

I couldn't agree more. I think explicit treatment of implicit
conversion, the role of sysdefaultencoding, the u'' constructor and
unicode() built in, etc would be helpful to many. 

A clear explanation of why Python strings, despite being assumed to be
ASCII, can contain any 8-bit data in any text encoding (or no text
encoding at all) may also help newbies.

I spent a while fighting to understand the way python handles encodings
a while ago and benefited significantly from it - but there really needs
to be a good explanation. The relationship between 'str' and 'unicode'
objects, the way implicit conversion works with sysdefaultencoding, and
how explicit conversions between encodings and to/from unicode, in
particular, need attention.

It'd also be REALLY good to mention the role of, and importance of, the
coding: line. An explanation of its relationship with the interpretation
of strings in the script, and with the sysdefaultencoding, would also be
helpful, as IMO the script encodings PEP only really makes sense once
you already understand it.

It wouldn't hurt to point C extension authors at things like the 'es'
encoded string format for PyArg_ParseTuple to help them make their code
better behaved with non-ascii text.

--
Craig Ringer 

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: learning about threads and processes (was Re: what would you like to see in a 2nd edition Nutshell?)

2004-12-29 Thread Arthhur
On Wed, 29 Dec 2004 16:41:23 +0100, Alex Martelli wrote:
 
 Hmmm, well, the concepts are reasonably independent of the programming
 language involved.  If anything, threads and processes may be more tied
 to whatever _operating system_ you're using.  A very fundamental but
 good introduction to processes (and other such basics) is for example at
 http://en.tldp.org/HOWTO/Unix-and-Internet-Fundamentals-HOWTO/, but it
 will be only partially applicable if you need to understand in depth the
 process-model of Windows.  But of course this is about the concepts, not
 the practice of programming to interact with them.

Too basic. Doesn't speak to the intermediate.  

I'll have you know, sir, you are speaking to someone who is
quite intermediate, at least in mediocre way.  Hummph ;)


 If I want to no more than be able to follow, say, the current Idle code
 of the PyShell module, I can find very little guidance from within the
 canon of Python literature.
 
 Help?
 
 Hmmm - have you looked at Deitel, Deitel, Liperi, Wiedermann, Python
 how to program, chapters 18 (Process Management) and 19
 (Multithreading), pages 613-687?  They seem to do a rather workmanlike
 job -- of course, they can't do full justice to the subjects in 75
 pages; and if you don't want to buy a vast, costly 1300-pages tome for
 the sake of those 75 pages, I can't really blame you, either.  Still,
 without some clarification of how (if at all) those 75 pages fail to
 meet your learning needs, it's hard to know what else to suggest.  And
 what about Norman Matloff's
 http://heather.cs.ucdavis.edu/~matloff/Python/PyThreads.pdf, the first
 google hit if you're looking for
 python threads

I never gotten to page 613 of any book in my life ;)

But the Matloff piece you site is in fact helpful to the intermediate.  

Frankly not sure how I missed it in past searches.  Python threading as
a google buries it a bit, but not that deeply.

This also comes up on a fresh search, and is to the point and at the level
of interest. It is also recent:

http://linuxgazette.net/107/pai.html


 ?  I haven't looked into it, but, again, without some specific
 explanation of how it fails to meet your needs, it's hard to offer
 alternatives.

The problem is when one starts off explaining threads by reference to
processes, I already have a practical problem.  Which, under what
circumstances.

Again referring back to the Idle code, class ModifiedInterpreter in the
PyShell module:

Within the space of a simple class, we are spawning 
a subprocess via:

self.rpcpid = os.spawnv(os.P_NOWAIT, sys.executable, args)

and a rpc client listening to a socket via:

self.rpcclt = MyRPCClient(addr)

which can be interrupted via a thread ala:

threading.Thread(target=self.__request_interrupt).start()

And then it gets a little complicated, to an intermediate ;)

Guess I am hoping to get to understand it as architecture, as well as as
code.

This happens to be another piece of code I am trying to digest, which
allows one to experiment with building PyGTK widgets from an interactive
prompt:

http://www.pygtk.org/pygtktutorial/examples/pygtkconsole.py

which uses os.fork and signals in its architecture, but no threads, as
opposed to this CookBook recipe:

http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65109

which accomplishes a very similar functionality using threads as a
fundamental part of its strategy.

The closest thing I can think of as the kind of book I would love to see
is one similar to Steve Holden's book on web programming, which explained
lower level internet proctocols at the same time as it explained their
Python implementation.

Wonder what Steve's are doing this week? ;) 

Art
-- 
http://mail.python.org/mailman/listinfo/python-list


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

2004-12-29 Thread Russell E. Owen
In article [EMAIL PROTECTED],
 [EMAIL PROTECTED] (Alex Martelli) wrote:

I'm considering proposing to O'Reilly a 2nd edition of Python in a
Nutshell, that I'd write in 2005, essentially to cover Python 2.3 and
2.4 (the current 1st edition only covers Python up to 2.2).
...

Since you were kind enough to ask...what I'd really like is a better 
better index and better organization, so I can more quickly and easily 
locate info on a particular topic.

Nutshell has some wonderful in-depth discussions of certain topics and 
I'm glad I own it, but I find it too hard to use for everyday questions 
(which was not at all what I expected for a nutshell book). I usually 
start with the html help (if I know the module I need or have a firm 
guess as to which other manual to read) or Python Essential Reference 
(other cases), then go to Nutshell if I'm still lost or if I remember it 
has a good section on the topic of interest.

-- Russell
-- 
http://mail.python.org/mailman/listinfo/python-list


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

2004-12-29 Thread c d saunter
Alex Martelli ([EMAIL PROTECTED]) wrote:
: I'm considering proposing to O'Reilly a 2nd edition of Python in a
: Nutshell, that I'd write in 2005, essentially to cover Python 2.3 and
: 2.4 (the current 1st edition only covers Python up to 2.2).

: So, if there's any advice or request about a 2nd edition of the
: Nutshell, this is the right time for y'all to let me know.  Feedback is
: welcome, either privately or right here.  Thanks in advance -- _and_
: apologies in advance because I know I just won't be able to accomodate
: all the requests/advice, given the constraints on book size c.

Alex,
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 ...

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

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.

Cheers, 
cds
-- 
http://mail.python.org/mailman/listinfo/python-list


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

2004-12-29 Thread RM

Alex Martelli wrote:
 I still
 believe Tkinter coverage is going to help more readers.

Alex,

I know this can be a can of worms.  But honestly, I wonder what do you
base that idea on.

-Ruben

-- 
http://mail.python.org/mailman/listinfo/python-list


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

2004-12-29 Thread Grig Gheorghiu
As a tester, my vote goes to extending the Testing subsection of the
Testing, debugging and optimizing. I'd like to see more testing tools
discussed there. Maybe py.test, PyFIT, and possibly others. 

Grig

-- 
http://mail.python.org/mailman/listinfo/python-list


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

2004-12-29 Thread Steve Holden
RM wrote:
Alex Martelli wrote:
I still
believe Tkinter coverage is going to help more readers.

Alex,
I know this can be a can of worms.  But honestly, I wonder what do you
base that idea on.
-Ruben
Tkinter is a part of the Python core, and so will be available to the 
majority of beginners. Tkinter is also likely to be supported (by Tcl) 
in Linux and other Unix-like environments, although with a slightly 
lower level of ubiquity.

I suspect Alex is considering availability at least as strongly as the 
technical merits of the packages.

And, when all is said and done, beginners shouldn't have to go download 
stuff before beginning to noodle round with GUIs.

regards
 Steve
--
Steve Holden   http://www.holdenweb.com/
Python Web Programming  http://pydish.holdenweb.com/
Holden Web LLC  +1 703 861 4237  +1 800 494 3119
--
http://mail.python.org/mailman/listinfo/python-list


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

2004-12-29 Thread Alex Martelli
Craig Ringer [EMAIL PROTECTED] wrote:

 On Wed, 2004-12-29 at 23:54, Thomas Heller wrote:
 
  I found the discussion of unicode, in any python book I have, insufficient.
 
 I couldn't agree more. I think explicit treatment of implicit
 conversion, the role of sysdefaultencoding, the u'' constructor and
 unicode() built in, etc would be helpful to many. 

Thanks!  BTW, thanks first and foremost to Holger Krekel (who was a very
activist tech reviewer and specifically contributed a recipe for this
purpose), there's what I believe is a pretty good treatment of Unicode
in the Cookbook's forthcoming 2nd edition -- still insufficient in
some sense, no doubt (it IS just a few pages), but, I believe, pretty
good.  Nevertheless, I'll ensure I focus on this in the 2nd ed Nutshell,
too.

 It wouldn't hurt to point C extension authors at things like the 'es'
 encoded string format for PyArg_ParseTuple to help them make their code
 better behaved with non-ascii text.

Good sub-point, thanks.


Alex
-- 
http://mail.python.org/mailman/listinfo/python-list


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

2004-12-29 Thread Alex Martelli
[EMAIL PROTECTED] wrote:

 As a Python beginner, I had a difficult time with the section on
 Slicing a sequence (p. 47).  In particular, a better explanation and
 examples of negative indicies would be helpful.

Good point, thanks.
 
 This is nitpicking in what I consider to be a very good book.  I hope

And thanks for this, too!


Alex
-- 
http://mail.python.org/mailman/listinfo/python-list


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

2004-12-29 Thread Alex Martelli
Fernando Perez [EMAIL PROTECTED] wrote:

 Alex Martelli wrote:
 
  the coverage of Twisted and adding just a few things (numarray --
  perhaps premature to have it _instead_ of Numeric, though; dateutils,
 
 You might want to keep in touch with the scipy/numarray gang on this
 particular topic.  An effort is currently under way to make scipy work
 with numarray, and matplotlib already works with numarray out of the box.
 These two facts will, I think, greatly accelerate the adoption of numarray
 and the transition away from Numeric.  There are a few people (like me,
 unfortunately), who can simply not use numarray because of the small array
 instatiation overhead.  But that subcommunity tends to know enough to be
 able to deal with the problems by itself.  Since numarray is indeed the
 long-term array core for Python, I think the book would be better off by
 covering it.  Numarray is actively developed, and vastly better documented
 than Numeric.

Well, I _am_ going to cover or at least mention numarray -- my
question was on whether I can _drop_ Numeric in favour of numarray.  In
good part _because_ numarray has good docs, it may be less crucial for
me to cover it thoroughly, than I felt it was for Numeric.  Three years
ago, numarray was barely a blip on the radar, if that; three years from
now, the same may be true of Numeric; but right now, I get some sense
that we're in transition -- that numarray needs and deserves coverage
or at least extended mention, BUT nevertheless it might be premature to
drop the coverage of Numeric...


 A mention of the particular problems with numarray might be a good idea, so
 that readers are aware of Numeric and where it may still be preferable to
 numarray, but with the understanding that it's a (shrinking) niche.  Hopefully
 one day that niche will shrink to zero, but that is going to take time and
 work.

Right -- and if I can get the 2nd ed of the Nutshell out within 2005, it
may be too early to say that Numeric has shrunk to the vanishing
point... so I may still need to have both in...


 Finally, I think in this section a mention of the overall scipy project would
 be a good idea.  Scipy is the central meeting point for most scientific
 computing projects in python, and therefore a natural reference for most users
 of numarray/numeric.  Amongst other useful things at the scipy site, there's a
 community maintained wiki of links to python-based projects of scientific
 interest:
 
 http://www.scipy.org/wikis/topical_software/TopicalSoftware

Most definitely a good idea, thanks.  Indeed, the lack of mention of
scipy _is_ a wart in the 1st ed -- as my excuse I can only explain that
I was _so_ focused on being focused... I ended up excising even all
mentions of my own baby, gmpy...!-)  But yes, scipy _will_ most
definitely get a mention this time around -- thanks for reminding me!-)


Alex
-- 
http://mail.python.org/mailman/listinfo/python-list


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

2004-12-29 Thread RM
What you say is true.  However, I didn't think the target audience of
this book was newbies.  Python newbies yes, but not programming
newbies.  For programming newbies I would recommend the Learning
Python book instead.
The availability argument, however, is a good point.

-- 
http://mail.python.org/mailman/listinfo/python-list


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

2004-12-29 Thread Alex Martelli
Russell E. Owen [EMAIL PROTECTED] wrote:

 In article [EMAIL PROTECTED],
  [EMAIL PROTECTED] (Alex Martelli) wrote:
 
 I'm considering proposing to O'Reilly a 2nd edition of Python in a
 Nutshell, that I'd write in 2005, essentially to cover Python 2.3 and
 2.4 (the current 1st edition only covers Python up to 2.2).
 ...
 
 Since you were kind enough to ask...what I'd really like is a better 
 better index and better organization, so I can more quickly and easily
 locate info on a particular topic.

Thanks for the advice!  What I have now is the best organization I was
able to conceive -- and I have no current ideas on how to enhance it.
Any _suggestions_ will be truly welcome; somehow, I don't see make it
better as a _suggestion_... if I _knew_ how to organize it better, I
would, of course.

Indexing is a completely separate issue, mostly done by O'Reilly outside
of my control; can we please focus on _organization_, which _is_ almost
entirely in my hands...

 Nutshell has some wonderful in-depth discussions of certain topics and
 I'm glad I own it, but I find it too hard to use for everyday questions
 (which was not at all what I expected for a nutshell book). I usually

Indeed, this is definitely not what I was aiming for, and if it's a
widespread issue which all reviews of the book I read managed to hide
it's crucial for it to come out -- whence my thanks.  But I need more
help to understand what makes the book's organization so feeble for you,
and whether the issue is widespread so that I need to revolutionize the
book's organization... or whether such a revolution wouldn't hurt the
many readers who appeared sort of OK with the current structure...

Thanks in advance for any further input -- and that applies to others
just as much as to you (meaning: o future potential readers, if you find
the current organization of the book ok, please do speak up -- if only
those who prefer changes are gonna speak, then changes are likely!-).


Alex
-- 
http://mail.python.org/mailman/listinfo/python-list


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

2004-12-29 Thread Alex Martelli
c d saunter [EMAIL PROTECTED] 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
-- 
http://mail.python.org/mailman/listinfo/python-list


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

2004-12-29 Thread Alex Martelli
RM [EMAIL PROTECTED] wrote:

 Alex Martelli wrote:
  I still
  believe Tkinter coverage is going to help more readers.
 
 Alex,
 
 I know this can be a can of worms.  But honestly, I wonder what do you
 base that idea on.

Availability, simplicity, stability, to name three reasons.  The typical
middling-beginning programmer who download a good Python distro is going
to have Tkinter available -- otherwise he or she couldn't be running
IDLE, which is probably the best ways for most Pybeginners to start
playing with Python in a cross-platform way.  Putting up a trivial GUI,
which may not LOOK very good, maybe, but still WORKS, is quite simple.
AND, Tkinter isn't going to keep changing under my feet!-)

On the Cookbook site, selecting recipes for the CB's 2nd ed, I noticed
that a vast majority of GUI recipes posted were for Tkinter -- a
_larger_ dominance than at the time the CB's 1st edition was being
prepared.  Accordingly, poor old maligned Tkinter is the dominant GUI
toolkit in that chapter of the CB.  It would be weird to do otherwise in
the 2nd ed of the Nutshell.  If I had space to add a second toolkit,
despite my personal liking for Qt, it would be wx (with PythonCard
coverage, too).  But I don't: I gotta choose _one_.  Not on the basis of
my personal likes and dislikes (not that I particularly dislike Tkinter,
mind you -- but, even IF I did!), but on the basis of what's gonna help
readers most.  And I'm quite convinced that, in late 2004, the answer to
the latter is still: Tkinter.


Alex
-- 
http://mail.python.org/mailman/listinfo/python-list


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

2004-12-29 Thread Alex Martelli
Grig Gheorghiu [EMAIL PROTECTED] wrote:

 As a tester, my vote goes to extending the Testing subsection of the
 Testing, debugging and optimizing. I'd like to see more testing tools
 discussed there. Maybe py.test, PyFIT, and possibly others. 

Thanks!  Very helpful input.  Testing surely needs AND deserves more
attention all around, yes.


Alex
-- 
http://mail.python.org/mailman/listinfo/python-list


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

2004-12-29 Thread Alex Martelli
RM [EMAIL PROTECTED] wrote:

 What you say is true.  However, I didn't think the target audience of
 this book was newbies.  Python newbies yes, but not programming
 newbies.  For programming newbies I would recommend the Learning
 Python book instead.

Sure (or any of the other excellent tutorials, including Python
Programming for Absolute Beginners).  Such tutorials' coverage of GUI
programming tends to be scarce, though; and moreover, programmers often
come to Python, from other languages, without skills directly applicable
to programming a GUI in Python (as opposed to, say, just painting the
GUI with a tool, as QT Designer or wxGlade may let you do).

Any GUI programming skills that may exist can be Tk-related more often
than one might think... or maybe that's just my own biased observations,
people coming to Python from previous experience with perl or tcl, but
I've known quite a few of those.

 The availability argument, however, is a good point.

It has its importance, yes.  If you want to replace the de facto Python
standard GUI toolkit with wx, gtk or whatever, having an IDLE-or-better
equivalent using your favourite toolkit, and managing to sneak it into
the std Python distro, would be the way to go;-)


Alex
-- 
http://mail.python.org/mailman/listinfo/python-list


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

2004-12-29 Thread Russell E. Owen
In article [EMAIL PROTECTED],
 [EMAIL PROTECTED] (Alex Martelli) wrote:

Russell E. Owen [EMAIL PROTECTED] wrote:

 In article [EMAIL PROTECTED],
  [EMAIL PROTECTED] (Alex Martelli) wrote:
 
 I'm considering proposing to O'Reilly a 2nd edition of Python in a
 Nutshell, that I'd write in 2005, essentially to cover Python 2.3 and
 2.4 (the current 1st edition only covers Python up to 2.2).
 ...
 
 Since you were kind enough to ask...what I'd really like is a better 
 better index and better organization, so I can more quickly and easily
 locate info on a particular topic.

Thanks for the advice!  What I have now is the best organization I was
able to conceive -- and I have no current ideas on how to enhance it.
Any _suggestions_ will be truly welcome; somehow, I don't see make it
better as a _suggestion_... if I _knew_ how to organize it better, I
would, of course.

Fair enough. I was being lazy, but also wanted to be sure the input 
would be considered useful before going into details.

Here are some issues for me:

* A mini table of contents for each major section would be really 
helpful. List the modules, and (if appropriate) sub-modules with maybe a 
one-liner as to what they do, and a page #.

* The discussion of the os module (p171) could especially use such a 
TOC. p171 starts with a nice, thorough explanation of os and all it 
does, but as a quick reference it is tricky; rather than jumping right 
to what I want, I have to get past a discussion of OSError an the errno 
module before any os methods are discussed, and then I have to flip 
through many pages of stuff to find the right section.

* Please cross-reference using page #s, not just chapter #s or covered 
later in this chapter. For instance the os module text refers one to 
chapter 14 for a discussion of os's handling of processes. Ouch. I 
hope that modern writing tools make page # references safe and easy.

* Some of the page breaks are awkward. I know it eats paper to fix it 
everywhere, but... for example, it'd help to have the re special 
characters table all on one page (or at least on facing pages).

* Exceptions:
- I beg you to include a ONE-PAGE table of exceptions that shows the 
inheritance hierarchy via indentation (e.g. like Python Essential 
Reference). The detailed info will probably have to follow.

Such a table is a much easier way of figuring out who inherits from who, 
and I usually find such a table sufficient (and very efficient) for 
picking out which exception to use.

Having the detailed info is much appreciated, but it's a poor substitute 
for a quick reference table.

- Some discussion of which standard modules raise errors that inheriit 
directly from Exception instead of StandardError would be helpful.

- (nit-pick) The try statement, bottom of p104. The two basic forms are 
listed, but a page # for the 2nd form would help jump there.

- Exception objects, p109. Using strings as exceptions would make a nice 
footnote instead of cluttering up the main text. They've been deprecated 
for a long time.


Also, two content requests:

* please describe the new subprocess module in gory detail and move 
discussion of the older modules which it can replace to an appendix or 
the back of the same chapter or in some other way keep it from 
cluttering up the main text. (I'm sure popen, etc. still has to be 
discussed, if only for folks dealing with older code, but subprocess is 
clearly the right way to go for new code).

* Please describe numarray instead of Numeric (or both, or discuss 
numarray and list some changes from Numeric?)


I'm looking forward to the next edition!

-- Russell
-- 
http://mail.python.org/mailman/listinfo/python-list


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

2004-12-29 Thread Robert Kern
Alex Martelli wrote:
Fernando Perez [EMAIL PROTECTED] wrote:

A mention of the particular problems with numarray might be a good idea, so
that readers are aware of Numeric and where it may still be preferable to
numarray, but with the understanding that it's a (shrinking) niche.  Hopefully
one day that niche will shrink to zero, but that is going to take time and
work.
Right -- and if I can get the 2nd ed of the Nutshell out within 2005, it
may be too early to say that Numeric has shrunk to the vanishing
point... so I may still need to have both in...
I think that, for people who are approaching numarray/Numeric for the 
first time through your book, all they need is a discussion about 
numarray and a brief discussion about Numeric's existence, its important 
differences from numarray, and why one might use it instead (small array 
performance, compatibility with other libraries, etc.). I think that the 
core lessons such a person is going to learn from a numarray section of 
your book will transfer just fine to Numeric if they are careful. If 
they're not careful, a book isn't going to keep them from shooting 
themselves in the foot, anyways.  :-)

--
Robert Kern
[EMAIL PROTECTED]
In the fields of hell where the grass grows high
 Are the graves of dreams allowed to die.
  -- Richard Harter
--
http://mail.python.org/mailman/listinfo/python-list