There are two ways to open a text file in Python:
f = open(filename)
And
import codecs
f = codecs.open(filename, encoding=\
I was in a situation to open a .asm file and process the file.
#https://docs.python.org/3/library/codecs.html#codecs.ignore_errors
#https://docs.python.org/3/library/codecs.html#codecs.Codec.encode
with codecs.open(file, encoding='cp1252', errors ='replace') as file:
Without much trouble I am able to read the entire file, any suggestions?