Replace print statement with `warnings.warn`.

Also so that it doesn't need to be converted for Python3 compat.
Remove trailing whitespace (PEP8 W293).

This commit resolves 613 PEP8 W293 (trailing whitespace) warnings
throughout the repository. If my git-fu is correct, this reduces total
repository size by about 0.4MB.
Make all indentation spaces (PEP8 E101).
Use 'in' instead of 'has_key()' (PEP8 W601)
Use Py3K-compatible exception raising. (PEP8 W602)
Remove extra trailing newlines (PEP8 W391)
Ensure one blank newline (PEP8 W292)
Use 'cond is' instead of 'cond ==' (PEP8 E712)
Only one statement per line (PEP8 E701)
Remove redundant backslashes (PEP8 E502)
Remove unneccessary blank lines (PEP8 E303)
Add whitespace around modulo operators (PEP8 E228)
Add whitespace around operators. (PEP8 E225)
Only one space after operators (PEP8 E222)
Remove whitespace before ':' (PEP8 E203)
Remove whitespace before brackets. (PEP8 E202)
Whitespace around arithmetic operators (PEP8 E226)
Two spaces before inline comment (PEP8 E261)
Inline comments start with '# ' (PEP8 E262)
Add spaces after ',' (PEP8 E231)