when I write the directory of the file, Sublime Text shows this annoying red light before some backslashes. How can I get this to go away?
when I write the directory of the file, Sublime Text shows this annoying red light before some backslashes. How can I get this to go away?
Sublime Text highlights raw strings starting with a lowercase r as Regular Expressions, which is why \c and \M are highlighted as an illegal escape character in regex. You'll also notice the different highlighting on \U, \h and \D in your screenshot.
To prevent Sublime Text from treating your raw string as a regular expression, simply use an uppercase R for the raw string, like:

Replace backslash "\" instead of forelash "/"
or
use double backslashes "\\"
In Python, backslash means escape sext character.