Errata


Print Print Icon

Submit your own errata for this product.


The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.


Color Key: Serious Technical Mistake Minor Technical Mistake Language or formatting error Typo Question



Version Location Description Submitted By
Printed Page 28
2nd paragraph - 8th line from bottom of page

os.getcwd() shows that the current working directory is:
'C:\PP2ndEd\cdrom\WindowsExt'

os.path.abspath(r'..examples') shows:
'C:\PP2ndEd\examples'
but should be:
'C:\PP2ndEd\cdromexamp

Anonymous 
Printed Page 29
2nd paragraph

The third line is missing the verb 'is'. It reads:
'in this chapter, but since this a key concept employed...'

It should read:
'in this chapter, but since this is a key concept employed...'

Anonymous 
Printed Page 32
2nd code line

The "python" is missing. It should be os.system("start python program.py arg arg")
instead of os.system("start program.py arg arg").

Anonymous 
Printed Page 35
last code block

The current directory shown on the command prompt is incorrect in the final section
of the example. It shows "C:PP2ndEdexamplesPP2ESystem>" but that's not the
directory we were left in from the previous step, and if that really was our
directory, the command entered (cd PP2ESystemApp) wouldn't work.

It should be:

C:PP2ndEdexamples>cd PP2ESystemApp
C:PP2ndEdexamplesPP2ESystemApp>python ..whereami.py

Anonymous 
Printed Page 42
3rd paragraph, line -2

Change:

To demonstrate this how this works, we need a couple...

To:

To demonstrate how this works, we need a couple...
(remove the first 'this')

Anonymous 
Printed Page 47
2nd code block: reader.py

The program reader.py says:

print 'Got this" "%s"' % raw_input()

This isn't a bug, but almost surely it was supposed to be:

print 'Got this: "%s"' % raw_input()

The sample output accurately reflects the program, but if you change the program be
sure to change the output:

Got this: "Help! Help! I'm being repressed!"

instead of:

Got this" "Help! Help! I'm being repressed!"

Anonymous 
Printed Page 51
2nd to last paragraph

It should either be "bind a keyboard-press event" or "bind keyboard press events"
instead of "bind keyboard-press event to run callbacks".

Anonymous 
Printed Page 57
Note at bottom of page

The print-to-file statement is missing a comma. It should be "print >>file, stuff".

Anonymous 
Printed Page 60
Example under "Closing" paragraph, just under middle of page

The example currently reads:

open('somefile.txt').write("G'day Bruce
")

This raises an exception. The example should read:

open("somefile.txt", "w").write("G'day Bruce
")

Anonymous 
Printed Page 382
1st paragraph, 3rd line

... ScolledText ...
should be
... ScrolledText ...

Anonymous 
Printed Page 390
1st code listing on the page, 2nd string

Wrong comments in the code:
...# two opposite box corner
...# two opposite oval corner

should be

...# two opposite oval corner
...# two opposite arc corner

Anonymous 
Printed Page 469
3rd-to-last line

Probably line
('ariel', 10+FontScale, 'normal'),
should be:
('arial', 10+FontScale, 'normal'),

This typo exist in file PP2EGuiTextEditor extEditor.py on CD too.

Anonymous 
Printed Page 575
1st paragraph after "Using urllib to FTP files" header

There are URL definition in the 4th line of this paragraph:
... a URL, or Universal Resource Locator...
It's very common problem with URL. Everyone calls it "Universal", but naturally it is
"Uniform". :-) I have seen this typo in many books...
There should be:
... a URL, or Uniform Resource Locator...

Anonymous 
Printed Page 961
3rd 'paragraph' from bottom of page

The word "effected" in the sentence "For DML statements, execute returns the number
of rows effected." should be "affected".

Anonymous 
Printed Page 1098
"else" branch in function "message"

The code contains a possible buffer overflow error

Instead of

strcpy(result, "Hello, ");
strcat(result, fromPython);

a better (and shorter) solution might be

sprintf(result,"Hello, %.56s",fromPython);

Anonymous 
Printed Page 1155
last paragraph of the code example "embed-string.c"

Hi!

Reading your Extending / Embedding Chapters I found the following:

As described the code 'embed-string.c' shall also show the correct use of the
Py_DECREF(obj) usage - to keep the environment clean.

But you cast the return value of the last PyRun_String(...) away:

(void) Py_RunString(...)

like above with the object 'pstr' PyRunString generally returns a new reference
that's lost now, or? So we have produced a memory leak with this kind of code.

The correct code should be IMHO

Py_DECREF( Py_RunString(...) )

INDEX:

Anonymous 
Printed Page 1255
"zipfile module"

zipfile says it's on 1209, but it's really on 1210. I've seen other index
problems like this one.

Anonymous