The editor wrongly interprets python raw string. Any occurrence of "\" is interpreted as escape, while in raw string it is not.
root = r"M:\"
in python this means that the content of variable root is the path of the root directory on disk M:
In Sublime Text this is wrongly interpreted as if the second double-quote was part of the string, not a delimiter. Therefore the string is unterminated and all following text is broken.
Customer support service by UserEcho