You can use 'sys.readline()' function to read the escape characters, and further, you can also define the parameter to read characters.