Replace characters that Python can't wrap itself around.
Ignore binary Python files.
Make sure the python file can be imported as part of a package.