To write a binary file on Windows, you need to explicitly open it as a binary, i.e.:
xkcdpicfile=open("C:\\Documents and Settings\\John Gann\\Desktop\\xkcd.png",
"wb")
b : "wb", "w"!
print chunk, , , . - - , , print repr(chunk), . - , , . len(chunk) , , .