Use open instead of file.
Use bytes literals instead of string literals.